AntFleet

Disagreement · c9663187-anthropic-6

BasePlatform `len_param_names > 3` check excludes valid handlers with default args

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

Opus finding

BasePlatform `len_param_names > 3` check excludes valid handlers with default args

mediumbughigh
  • backend/wonderwall/simulations/base.py:175-189
`func_code.co_varnames[:func_code.co_argcount]` includes all named positional/keyword args including defaults. A handler with `(self, agent_id, message, optional_flag=False)` will be rejected even though it is callable. This is a strict-fragile dispatcher; co_argcount includes self, so the limit of 3 is exactly (self, agent_id, message). Any subclass adding a fourth optional arg breaks at runtime, and the crash kills the message loop (see related finding).

Recommendation

Either pass `message` as the second positional and unpack inside handlers, or only count parameters without defaults. Document the contract explicitly.

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 →