Repository navigation
A chunked Audit under-reports its model-call count by one - #73
Merged
Merged
Conversation
A chunked Audit makes one call per Section chunk plus a synthesis call, but reported only the chunk count. Per the Writer's decision on #54, `chunks` is how many model calls the Run took (story 131): N chunk calls plus one for the synthesis. A Document that fits one call still reports 1. The harness's chunked Audit case now checks the reported count against the calls the fixture transport recorded, and the Audit report line names both the chunks and the calls. Closes #54. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54.
Per the Writer's decision on the issue,
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.src/core/audit.ts: a chunked Audit reportschunks.length + 1. Doc comments updated to match.src/storage/auditAccounts.ts,harness/constitution.ts: field docs now say "model calls".src/editor/BandPanel.tsx: the Audit report line was "Read in N overlapping chunks, then synthesized." and would now have been off by one. It now reads "Read in N−1 overlapping chunks, then synthesized: N calls."harness/constitution.test.ts: new test on the existingcharacterLimit: 250chunked Audit case. It checks each case's reported count against the requests its fixture transport recorded.src/core/audit.test.ts: the existing unit test asserted the old meaning (requests.length === chunks + 1). It now assertsrequests.length === chunks.Acceptance criteria
finishAuditpath, and the existing tests that expectchunks: 1still pass.characterLimitharness case that forces a chunked Audit. The new harness test failed before the fix (5 reported, 6 calls made) and passes after it.Checks:
pnpm test(998 passed),pnpm typecheck,pnpm run gates(clean),pnpm build: all pass. There is no Dexie migration, the findings schema is unchanged, and there is no new affordance.🤖 Generated with Claude Code
Generated by Claude Code