AntFleet

Disagreement · d9ae4fa5-anthropic-11

BudgetCheck warning flag inconsistent: returns warning:true when ok=false but also when warnAtPercent==0

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

Opus finding

BudgetCheck warning flag inconsistent: returns warning:true when ok=false but also when warnAtPercent==0

lowbugmedium
  • src/budget.ts:88-124
If a caller passes warnAtPercent=0 (or it defaults to 0), the warning flag is true from turn 0 with totalTokens=0, since 0 >= 0. This will spam the warning UI immediately. Validate warnAtPercent > 0 in the constructor, or use strict '>'.

Recommendation

Clamp warnAtPercent into (0, 100] in constructor or use strict comparison.

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 →