AntFleet

Disagreement · 6e0f16bf-openai-1

Hidden coupling: get_open_markets() depends on agent.signals import side effects

solo GPT-5
repo 703f69ec·PR #2·reviewed 5 days ago

GPT-5 finding

Hidden coupling: get_open_markets() depends on agent.signals import side effects

mediummaintainabilityhigh
  • agent/tools/markets.py:191
  • agent/signals.py:30-32
markets.get_open_markets() imports is_geopolitics_market from agent.signals at call time. Importing agent.signals executes module-level code that reads and converts an environment variable to float and could raise. Thus, a market-fetching path unexpectedly depends on and can be broken by an unrelated scoring configuration. This tight coupling increases the blast radius of configuration errors and makes markets harder to reuse independently.

Recommendation

Decouple the geopolitics classifier from the scoring module: - Move is_geopolitics_market and its regex into a lightweight module (e.g., agent.geo) with no import-time env parsing. - Or move the env parsing in agent.signals behind a function so importing it is side-effect-free. This confines configuration errors to signal processing and keeps market listing robust.

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 →

From the same review

These findings passed the unanimous gate on the same PR review. The disagreement above was filtered out; the findings below were posted.