You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to re
8000
fresh your session.Dismiss alert
{{ message }}
Repository navigation
A chunked Audit under-reports its model-call count by one #54
For a chunked Audit, the reported call count is one short of the number of model calls actually made.
src/core/audit.ts:396 — chunkedResults(...) returns one result per Section chunk.
src/core/audit.ts:402 — an extra synthesis call is made over the chunk accounts.
src/core/audit.ts:423 — the result reports chunks: chunks.length.
Spec story 131 describes chunks as how many calls the Run took. With one chunk it is 1 and correct
(src/core/audit.ts:489); with N chunks the Run makes N + 1 calls but reports N.
Impact
Small but it is a number shown to the Writer and used to reason about cost. It under-reports exactly
when the Run was expensive enough to chunk.
Fix
Decide what the field means and make it true — either report the true call count (chunks + 1 when a
synthesis ran), or rename it to what it is (the chunk count) and expose the synthesis separately.
Whichever, add a test using the existing characterLimit harness case, which already forces a
chunked Audit.
Decision (Writer, 2026-09-26): report the true call count.chunks is how many model calls the Run took (story 131): N chunk calls plus 1 when a synthesis ran. The one-chunk case stays 1. Add the test through the existing characterLimit case that forces a chunked Audit.
Fixed in #73 (merged into v1.3), per the decision: a chunked Audit reports N + 1 calls; one chunk stays 1; tested through the characterLimit harness case. The Audit panel line now reads "Read in N−1 overlapping chunks, then synthesized: N calls."
Known edge: an Audit account stored before this change still holds the old chunk count, so it will display one call short in that line. No migration was added (none allowed this increment).
Activity
kiran-brahma commentedon Sep 26, 2026
Decision (Writer, 2026-09-26): report the true call count.
chunksis how many model calls the Run took (story 131): N chunk calls plus 1 when a synthesis ran. The one-chunk case stays 1. Add the test through the existingcharacterLimitcase that forces a chunked Audit.Report a chunked Audit's true model-call count (#73)
kiran-brahma commentedon Sep 26, 2026
Fixed in #73 (merged into
v1.3), per the decision: a chunked Audit reports N + 1 calls; one chunk stays 1; tested through thecharacterLimitharness case. The Audit panel line now reads "Read in N−1 overlapping chunks, then synthesized: N calls."Known edge: an Audit account stored before this change still holds the old chunk count, so it will display one call short in that line. No migration was added (none allowed this increment).
Generated by Claude Code