Skip to content

fix(audit): close the OX low table against its own list (OX-L1..L19) - #43

Merged
ojassug merged 1 commit into
mainfrom
audit/lows
Aug 29, 2026
Merged

fix(audit): close the OX low table against its own list (OX-L1..L19)#43
ojassug merged 1 commit into
mainfrom
audit/lows

Conversation

@ojassug

@ojassug ojassug commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Audit OX-L1 through OX-L19. DECISIONS §69. Six fixed, five recorded at their sites, three
already "no action" in the audit itself
— every row dispositioned.

max_audit.md's LOW table went unscheduled and was found open weeks later (§55). The lesson
recorded then was close a document against its own list of findings, not against the list of work
that was done
. So the "not fixed" half is written down too — that is the half that goes missing.

Fixed

id what
L6 The per-session seen-hash cap was a bare 1000 inside capSeenBlockHashes while sessionTtlMs, maxSessions and maxContentEntriesPerSession were all settable — the one bound that grows with conversation length was the one nobody could tune. Now GatewayConfig.maxSeenBlockHashesPerSession, same default.
L7 The MCP overflow check ran before processBuffer and then cleared the whole buffer, so a chunk carrying complete requests followed by one oversized partial discarded the complete ones too. They were well-formed, already received, answerable. Draining first leaves exactly the un-terminated remainder for the limit to judge.
L9 The bench loader's limits merge could never fire — ResolvedConfig has no such field, which is why it needed two as unknown as Record<string, unknown> casts. Deleting it also removed an as unknown as ResolvedConfig that was disabling type checking for every other key in that literal.
L10 Dataset routing matched includes('humaneval') before checking for a real path, so ./fixtures/humaneval-comparison-2026.jsonl was silently answered with the bundled dataset. Now exact name → path → substring as last resort.
L12 package.json and src/version.ts are hand-synced; a test now pins them equal. Not restructured — version.ts stays the single source per the release procedure — so this closes the drift class rather than the duplication.
L19 .gitignore was the full GitHub Python template: 245 lines, ~111 entries, Django through pdm, none of it used, with the dozen working entries buried at the bottom. Now 44 lines / 25 entries, keeping a real Python block for tokendamper-benchmark/.

L6, L7, L10 and L12 are pinned by test/unit/audit-ox-low-findings.test.ts. L6 and L7 were
mutation-checked
— reverting either source file fails its test and only its test. L19 was verified
by diffing git status --porcelain across the change: nothing became newly visible.

Recorded at their sites, not fixed

  • L1expectedSavings: 0.45 is unconsumed, and the number isn't a measurement either (the
    same corpus reduces ~20% on TypeScript, ~16% on Python). Left per the frozen-model precedent H4
    set and OX-H5 followed: nobody can set it, so it misleads no caller. Wiring it means deriving a
    real estimate from the selected stages — a planner change.
  • L8 — the MCP shutdown flush race. The fix is to stop forcing the exit and let the loop drain,
    but stop() only removes the data listener; whether the process then exits depends on stream
    state that file doesn't control, and getting it wrong hangs tokendamper mcp on Ctrl+C.
    Delivering SIGINT to exercise that isn't something this suite can do. Same call as L4.
  • L13/health exposing sessionCount is M8/M9's question. On loopback it isn't a leak;
    on an exposed bind it is, and that's exactly the configuration those two decide. Answering it
    twice in two places is how two answers drift.
  • L17, L18 — architecture import linting and coverage tooling both need a new devDependency.
    The audit calls both optional; adding dependencies to someone's package on the strength of a LOW
    finding isn't a call to make unasked. Both are one command away when wanted.
  • L14, L15, L16 were "no action" in the audit itself and remain so.

What this does not establish

  • Nothing about M8, M9 or M15 — all three are decisions rather than work, and all three are
    still open. L13 is now explicitly folded into M9.
  • L19's prune is verified only against the current tree. git status showing nothing newly
    visible proves no existing file lost its ignore. A file type that doesn't happen to exist right
    now, covered by a removed template line, wouldn't have been caught.

Verification

npm run typecheck, npm run lint, npm run build and npx vitest run all pass: 91 files /
826 tests
.

🤖 Generated with Claude Code

Audit OX-L1 through OX-L19, DECISIONS §69. Six fixed, five recorded at
their sites, three already "no action" in the audit itself.

max_audit.md's LOW table went unscheduled and was found open weeks later
(§55). The lesson recorded then was: close a document against its own list
of findings, not against the list of work that was done. So every row is
dispositioned here, including the ones not fixed -- that is the half that
goes missing.

Fixed:

L6  the per-session seen-hash cap was a bare 1000 inside
    capSeenBlockHashes while sessionTtlMs, maxSessions and
    maxContentEntriesPerSession were all settable. The one bound that
    grows with conversation length was the one nobody could tune. Now
    GatewayConfig.maxSeenBlockHashesPerSession, same default.

L7  the MCP overflow check ran BEFORE processBuffer and then cleared the
    whole buffer, so a chunk carrying complete requests followed by one
    oversized partial discarded the complete ones too. They were
    well-formed, already received and answerable. Draining first leaves
    exactly the un-terminated remainder for the limit to judge.

L9  the bench loader's `limits` merge could never fire -- ResolvedConfig
    has no such field, which is why it needed two
    `as unknown as Record<string, unknown>` casts. Deleting it also
    removed the `as unknown as ResolvedConfig` laundering that disabled
    type checking for every other key in that literal.

L10 dataset routing matched includes('humaneval') BEFORE checking for a
    real path, so ./fixtures/humaneval-comparison-2026.jsonl was silently
    answered with the bundled dataset. Now exact name, then path, then
    substring as a last resort.

L12 package.json and src/version.ts are hand-synced; a test pins them
    equal. Not restructured -- version.ts stays the single source per the
    release procedure -- so this closes the drift class, not the
    duplication.

L19 .gitignore was the full GitHub Python template: 245 lines, ~111
    entries, Django through pdm, none of it used, with the dozen working
    entries buried at the bottom. Now 44 lines / 25 entries, keeping a
    real Python block for tokendamper-benchmark/. Verified by diffing
    `git status --porcelain` across the change: nothing became newly
    visible.

L6, L7, L10 and L12 are pinned by a new test file. L6 and L7 were
mutation-checked -- reverting either source file fails its test and only
its test.

Recorded, not fixed:

L1  expectedSavings: 0.45 is unconsumed and is not a measurement (the same
    corpus reduces ~20% TS, ~16% Python). Left per the frozen-model
    precedent H4 set and OX-H5 followed; nobody can set it, so it misleads
    no caller.
L8  the MCP shutdown flush race. The fix depends on stream state that file
    does not control, and getting it wrong hangs `tokendamper mcp` on
    Ctrl+C -- which this suite cannot exercise. Same call as L4.
L13 /health exposing sessionCount is M8/M9's question. Answering it twice
    in two places is how two answers drift.
L17 architecture import linting and L18 coverage tooling both need a new
    devDependency. Not a call to make unasked on a LOW finding.

Verified: typecheck, lint and build clean, 91 files / 826 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ojassug
ojassug merged commit 0a0e380 into main Aug 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant