Skip to content

KNOWN-LIMITS 76: three readers stop reporting a refused write as touched - #98

Open
githubscum wants to merge 4 commits into
mainfrom
lotor-lane/l76-readers
Open

githubscum wants to merge 4 commits into
mainfrom
lotor-lane/l76-readers

Conversation

@githubscum

@githubscum githubscum commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

WO: WO-L76-READERS, source tier 3 (KNOWN-LIMITS). Limit 76's "Still open" list. No core files, nothing under bin/.

The problem. A refused write still read as a touched file in three of the places people and agents read the record from. The record already held the answer: the tool_result that refused it. These readers never joined the two.

Reader Before Now
MCP query_receipts session rows touchedCount included refused attempts, with no way to tell adds touchedRefused; omitted when no item has an outcome, because then it is unrecorded, not zero. touchedCount still counts attempts.
Chapters view, Claude Code read paths off tool_use, never the result a chapter gains refused when it has one; the rendered line reads 3 files, 1 refused
Since-view touchedCount summed per receipt, so one file counted once per SessionEnd firing distinct paths per session

Serves. No v3 eval (E1-E6) applies. This is R1 legibility: an attempt must not read as a change.

Tested.

  • First pass, npm test in the clone: 1405 tests, 1399 pass, 0 fail, 6 skipped. limits-pin --check clean after --stamp.
  • First pass, fail-first: the 12 new tests in test/known-limits-76-readers.test.js run against the old source: 7 fail, 5 pass. The 5 are the digest, the shape, the failure counts, the absent-key case and the then-tripwire, all of which should hold either way.
  • Probe on the 400 most recent real Claude Code transcripts on this machine (under 40 MB each), old code against new: the chapters/1 digest moved on 0 of 400. That is the check that matters, since a moved digest would make real receipts read DOES NOT match.
  • Same probe against parseSession: all 3 paths the parser calls refused appear as refused in some chapter. 8 paths are refused in a chapter across 4 transcripts; the other 5 are paths the parser calls landed, which is the per-chapter rule working (refused in one chapter, landed in another). Only 4 of the 400 had any refusal, so this is thin on the refusal side.

Executor. glm-5.3-flash, 54 model stamps, read from its transcript, no other model. It could not run shell (denied, and it stopped as the WO says), so every test run above is mine. The code and limit prose were specified in the WO, the same as #97; the test bodies are its own. Diff read line by line against the WO.

Added 2026-11-04, second pass: the since-view count fault is now fixed here (9c7189f). The first pass of this PR found that turns, toolCalls and failures were summed across a session's cumulative receipts, and left it because the largest value would be wrong for a session continued in a new transcript, unmeasured. Now measured, read-only, on this machine's chain of 4,110 sessions: 252 wrote more than one receipt (589 receipts); in none did a count fall between receipts, per-tool ran tallies never fell, and startedAt was constant except on one placeholder unknown id with zero counts. So the view now takes the largest. The sum reported 140,148 tool calls against 124,769, 12.3% over; median 2x and worst 5.32x inside the 252. Only 3 of the last 7 days' 227 sessions had more than one receipt, so recent output barely moves.

Second-pass checks: npm test on the committed tree in the clone, 1406 tests, 1400 pass, 0 fail, 6 skipped; s3, s4 and the old since-view test fail against the old source, 3 of 21 in those two files; new view against the real chain, 4,111 sessions, 0 mismatches with the last receipt's toolCalls, 245 differ from the old sum. Executor glm-5.3-flash, 42 model stamps, read from its transcript; code, tests and limit prose were specified verbatim in the WO and a script confirmed all 7 blocks landed byte-identical. No second model verified; that was my read and the probes.

Doubt in this pass: the largest value would under-report a session id reused across transcripts, nothing detects that, and "not seen" is one machine's harness behaviour. One session's touched list shrank between receipts (39 to 32, 17 gone, none a respelling); I left that unexplained and recorded it. This widens a PR about refused writes; I put it here rather than open a tenth PR on the same file and limit. Strike it into its own PR if you prefer.

What a reviewer should doubt.

  • refused is left out of the chapters/1 digest so old receipts keep verifying. The marks are therefore bound only through the transcript hash. The alternative is a chapters/2 schema; I judged that not worth it for a display field. Strike it if you disagree.
  • Settling per chapter means one path can show refused in chapter 1 and landed in chapter 2 of the same session, while the parser's session-level answer is landed. Both are true, but a reader could trip on it.
  • refused appears only when non-empty, so absence on a chapter means none refused, which bends the house rule that absent is not zero. It holds here only because chapters are computed from the transcript each time, and it keeps the shape test and every existing consumer unchanged.
  • Since-view distinct counting compares strings as written, so a pre-limit-75 receipt can still count one file twice.
  • The pin moves to today's date with its commit unchanged. Only limit 76 was re-read for this stamp, the same caveat as KNOWN-LIMITS: amend 29, 65, 66, 70, 77 to match the code; add 87 (tool-form scheduling) #97. This PR will conflict with KNOWN-LIMITS: amend 29, 65, 66, 70, 77 to match the code; add 87 (tool-form scheduling) #97 on the pin header, and on nothing else as far as I can tell. I did not test that merge.

Still open under 76: retcon's charter reconciliation (core, signing sitting), Codex chapters.

🤖 Generated with Claude Code

githubscum and others added 4 commits November 4, 2026 08:41
…g a refused write as touched

MCP session rows gain touchedRefused, omitted when no item has an outcome.
A chapter gains refused when it has one, settled per chapter and left out of
the chapters/1 digest so receipts already on the chain keep verifying. The
since-view's touchedCount is distinct paths, not a per-receipt sum.

Found doing it, recorded, not fixed: since-view turns, toolCalls and failures
sum across cumulative receipts. Test s3 pins the wrong number as a tripwire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stamp in f419f11 was taken before that commit existed, so it named
main's last source commit and the committed-pin tripwire read diverged on
every CI job. Stamp only; the body digest is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cumulative receipts

Every subsession receipt re-parses the whole transcript, so summing turns,
toolCalls and failures reported the same work once per SessionEnd firing.
Measured on the local chain first: 252 sessions with more than one receipt,
none where a count fell. Test s3 was a tripwire pinning the wrong number; it
now pins the right one, and the limit's entry moves with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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