AntFleet

Disagreement · 8ff8c1af-anthropic-13

types.ts comment 'Must perfectly match concatenated streamed chunks' is not enforced and currently violated on abort

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

Opus finding

types.ts comment 'Must perfectly match concatenated streamed chunks' is not enforced and currently violated on abort

lowdocs-gaphigh
  • src/providers/types.ts:27-33
  • src/providers/anthropic.ts:116-134
Comment claims final UnifiedResponse.text/thinking must match the concatenation of streamed chunks. In the abort path of Anthropic, the function returns whatever was accumulated, which DOES match concatenated chunks — but only if onTextDelta callbacks didn't throw. In the success path, the code returns the locally-accumulated string rather than reading from finalMessage.content, which is correct but undocumented. The comment is a strong invariant that needs either enforcement or a softer rewording, especially when finalMessage from Anthropic may include cached or transformed final text different from raw deltas.

Recommendation

Document that responseText is the deterministic source of truth; clarify mismatch behavior.

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.