AntFleet

Disagreement · c9663187-anthropic-8

`do_nothing` handler signature mismatches BasePlatform dispatch contract — will crash dispatcher with annotated agent_id

solo Opus
repo 193af03f·PR #2·reviewed 1 week ago

Opus finding

`do_nothing` handler signature mismatches BasePlatform dispatch contract — will crash dispatcher with annotated agent_id

mediumbughigh
  • backend/wonderwall/simulations/base.py:233-236
  • backend/wonderwall/simulations/base.py:175-195
BaseAction.do_nothing calls `await self.perform_action(None, "do_nothing")`. On platform side, `do_nothing(self, agent_id)` has 2 params (self+agent_id) → len_param_names=2 → dispatcher passes only `agent_id`. That's fine. But agent-side `BaseAction.do_nothing` sends message=None; if a subclass overrides to take `(self, agent_id, message)` they need to expect message=None. Looks OK. However, this is a fragile contract — the dispatcher silently drops the second tuple element. Combined with the >3 param hard rejection, this dispatcher is brittle.

Recommendation

Document and unit-test the platform handler signature contract clearly. Consider a typed decorator or explicit registry instead of introspection.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →