AntFleet

Disagreement · 44bd7a66-anthropic-0

getEffort() warns but accepts unknown effort flags after returning to default; valid 'h' alias not handled

solo Opus
repo 56f59a0d·PR #1·reviewed 4 days ago

Opus finding

getEffort() warns but accepts unknown effort flags after returning to default; valid 'h' alias not handled

lowbughigh
  • src/config.ts:136-146
VALID_EFFORTS contains 'h' as a shortcut for high, but getEffort() never explicitly handles 'high' or 'h'. Passing 'high' or 'h' falls through to the default 'return high' which is fine. However, the function uses different membership semantics: only 'low' and 'medium' (and their aliases) trigger explicit returns; everything else (including legitimate 'h' / 'high') is mapped to high silently, which is correct. The real issue is the inconsistent shape: a user passing 'l' returns low, but 'L' or 'LOW' (uppercased) is rejected with a warning and defaulted to high — silently changing the user's intent. Case-sensitivity is undocumented.

Recommendation

Lowercase the flag before comparison, or document case-sensitivity. Consider failing fast rather than silently defaulting to the most-expensive tier.

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.