AntFleet

Disagreement · 528e46ce-anthropic-2

loadCrossRepoReceipts may return total counts that disagree with `recent` due to two unsynchronized queries

solo Opus
repo e24ef98c·PR #10·reviewed 1 week ago

Opus finding

loadCrossRepoReceipts may return total counts that disagree with `recent` due to two unsynchronized queries

lowmaintainabilitymedium
  • apps/web/lib/outgoing-prs.ts:188-225
Two separate SELECTs against outgoing_prs with no transaction. A pollOutgoingPrs run in between could flip a row to merged, making `value` larger than `recent.length` even when recent.length < limit. Not strictly a correctness bug because total is allowed to exceed recent.length, but the displayed 'N merges upstream' in CrossRepoSection uses rows.length not total — so this is only minor.

Recommendation

Either wrap both queries in a single transaction or compute total from the same fetched set if limit is sufficient.

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.