Skip to content

limit 53: a matcherHash resolves to its commit; found limit 77 (stamp is line-ending-sensitive) - #67

Merged
githubscum merged 3 commits into
mainfrom
lotor-lane/matcher-history
Oct 22, 2026
Merged

githubscum merged 3 commits into
mainfrom
lotor-lane/matcher-history

Conversation

@githubscum

@githubscum githubscum commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

WO: KNOWN-LIMITS 53, reader half (lane run 39). v3 is still blocked on rulings, so this is the next KNOWN-LIMITS item.

What it does. New non-core reader src/views/matcher-history.js: for every commit that touched the policy directory it imports that commit's own policy code into a temp dir and calls that commit's own matcherVersionHash. findMatcherHash(repo, hash) then maps a receipt's matcherHash to the commit(s) that produced it, so "the matcher changed" becomes "here is the diff". On this clone: 28 policy commits, 15 stamped, 8 distinct stamps, ~2 s.

New limit found and recorded (KNOWN-LIMITS 77). matcherHash depends on the checkout's line endings. toString() returns source as loaded, and a Windows core.autocrlf=true checkout is CRLF. At 5198a07 the live stamp on this machine is c4165ee9ff7612bd, while the same commit as LF is e0877fab0f459e0c. So a hash difference proves a source-text difference, not a matcher change. The reader recomputes both LF and CRLF and reports eol. The real fix belongs in core (normalize inside the hash inputs), so it is left for a signing sitting and is not in this PR. It would move only CRLF-checkout stamps, onto the LF stamp: matcherHashInputs does not hash its own source, so LF checkouts keep theirs. (Corrected after review; this sentence first said every machine's stamp would move.)

Tested. npm test 1065/1065 (+9). The real-repo smoke test ran on this machine (not skipped) and asserts the live stamp equals the LF or CRLF recompute of HEAD. That test failed before the CRLF change, which is how limit 77 was found. Fixtures: literal-hash repos, pre-stamp commit, a crashing historical file, a self-hashing multi-line fixture that proves LF and CRLF diverge and that each resolves with the right eol, temp-dir cleanup count, and a bogus eol that throws a TypeError.

Eval served. None of E1-E6; this is limit work, not a v3 WO.

Executor. glm-5.3-flash:cloud through dispatch-to-ollama.ps1, two passes (r1 plus a CRLF revision). Its sandbox could not run node or npm, so the orchestrator ran every test. Orchestrator-written: the KNOWN-LIMITS prose, plus a mechanical renumber of the limit citation from 77 to 75, then back to 77 (2026-10-22) to follow the merge order.

What a reviewer should doubt.

  1. Numbering (settled 2026-10-22). The numbering test requires contiguity, so numbers follow the merge order limit 60: a deleted or edited thought sidecar no longer goes unread #65, limit 54: the text receipt states the thought channel, absence as unrecorded #66, limit 68: subagent reader no longer reads a moved sidecar as no subagents #64, v3 V3-08: planted-intent corpus with a held-apart answer key #63, v3 V3-05: observe reach rungs from the response, never the request #60, limit 75/76: one edited file no longer counts twice in touched #62, limit 75: a refused write no longer reads as touched #61, limit 53: a matcherHash resolves to its commit; found limit 77 (stamp is line-ending-sensitive) #67, CORE (signing sitting): tripwire for the line-ending-dependent matcher stamp #68, CORE (signing sitting): v3 V3-04: reasoning trace chained per step (R3) #69, CORE (signing sitting): v3 V3-02: reach certificate, measured not declared, on session receipts #70, CORE (signing sitting): v3 V3-03: tool I/O digest on post-tool-use receipts (R2) #71: limit 75/76: one edited file no longer counts twice in touched #62 takes 75, limit 75: a refused write no longer reads as touched #61 takes 76, this PR takes 77. On this branch alone known-limits-numbering reports 75 and 76 missing until limit 75/76: one edited file no longer counts twice in touched #62 and limit 75: a refused write no longer reads as touched #61 are on main.
  2. null means two things: "predates the stamp" and "historical import failed" (for example, an old policy file importing something outside its directory). Against this history the nulls are all older than the first stamped commit, so neither one hides a real stamp. A future refactor could change that.
  3. It executes historical repo code. That is fine on your own clone. It is not a verifier for a stranger's tree, and the header says so.
  4. No CLI. A new bin/ file is a protected write. The executor's attempt was gated (request 708d7248) and left to lapse. A CLI wrapper needs a signature.
  5. No mutation probe this run. The eol-specific test is the guard against dropping the CRLF column. I did not flip the code to watch it fail.

@githubscum

Copy link
Copy Markdown
Owner Author

Review fixes pushed in 056f3f2. All three findings re-checked against the code first; all held.

Fixed

  1. "Would move the stamp on every machine" was wrong. matcherHashInputs() is not one of the functions it hashes, so normalizing line endings there leaves an LF checkout's hashed text byte-identical and its stamp unchanged. Only CRLF-checkout stamps move, onto the LF stamp. KNOWN-LIMITS 75 is reworded, with the condition that keeps it true (if the normalization were put inside one of the hashed rule functions instead, every stamp would move). The PR body sentence is corrected in place and marked as corrected.
  2. (nit) "An argv vector means a sha can never fragment into extra git arguments." Not just a nit: the argv vector stops splitting, not option parsing. Probed on this clone before the fix: matcherHistory(repo, { ref: '--output=<file>' }) made git log write that file. A ref or sha starting with - is now refused before git runs (matcherHashAt returns null, matcherHistory returns [], so findMatcherHash reads not-found). I chose rejection over --end-of-options because it does not depend on the git version. The comment now says what the guard is for. New test; confirmed it fails with the guard removed.

npm test: 1066 pass, 0 fail (was 1065; +1).

Not renumbered: limit 75 is claimed three times. Per the instruction, nothing was renumbered. Open PRs that each add a ## 75. entry to KNOWN-LIMITS.md:

The owner picks the merge order; whichever lands later renumbers, along with the in-text citations (in this PR: the KNOWN-LIMITS 53 paragraph, caveat 4 in src/views/matcher-history.js, and a comment in test/matcher-history.test.js).

githubscum added a commit that referenced this pull request Oct 22, 2026
The KNOWN-LIMITS numbering test requires contiguous entries, so numbers
follow the merge order #65, #66, #64, #63, #60, #62, #61, #67, #68, #69,
#70, #71: #62 takes 75, #61 takes 76, this PR takes 77. Every citation on
this branch moves with it (KNOWN-LIMITS.md heading and the limit 53 note,
src/views/matcher-history.js header, test/matcher-history.test.js comment).

On this branch alone the numbering test reports 75 and 76 missing; that
clears once #62 and #61 are on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
githubscum added a commit that referenced this pull request Oct 22, 2026
The KNOWN-LIMITS numbering test requires contiguous entries, so numbers
follow the merge order #65, #66, #64, #63, #60, #62, #61, #67, #68, #69,
#70, #71: #62 takes 75, #61 takes 76, #67 takes 77, this PR takes 78.
Every citation on this branch moves with it: KNOWN-LIMITS.md heading,
CHANGELOG.md, docs/receipt-coverage.md, and the V3-03 proposal note. The
staged .patch carries no limit number and is unchanged.

On this branch alone the numbering test reports 75, 76 and 77 missing;
that clears once #62, #61 and #67 are on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@githubscum githubscum changed the title limit 53: a matcherHash resolves to its commit; found limit 75 (stamp is line-ending-sensitive) limit 53: a matcherHash resolves to its commit; found limit 77 (stamp is line-ending-sensitive) Oct 22, 2026
@githubscum

Copy link
Copy Markdown
Owner Author

Merge-order fix: limit renumbered 75 -> 77 (commit d3ba724)

Numbers assume the owner's merge order: #65, #66, #64, #63, #60, #62, #61, #67, #68, #69, #70, #71. #62 takes 75, #61 takes 76, this PR takes 77, #71 takes 78.

Expected conflict at merge time: after #61 lands, KNOWN-LIMITS.md conflicts at the end of the file (both append). Keep both sides, #61's 75 and 76 first, then this PR's 77, with a blank line before ## 77.. Checked in a local simulation of the full order: that resolution plus the others leaves the suite at 0 fail.

#68's body says the limit "is numbered 75 there"; that is now 77. #68 itself cites no number in code, so it was left alone.

githubscum and others added 3 commits October 22, 2026 15:27
…tamped it

New non-core reader src/views/matcher-history.js re-derives the stamp at
each commit that touched the policy directory by importing that commit's own
code. Building it found KNOWN-LIMITS 75: the stamp depends on checkout line
endings (CRLF vs LF), so the reader computes both and reports which matched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… stamp-move claim

- matcher-history: a ref or sha starting with '-' is refused before git
  runs. The argv vector stopped splitting, not option parsing: before
  this, matcherHistory(repo, { ref: '--output=<file>' }) made git log
  write that file (probed on this clone). matcherHashAt returns null and
  matcherHistory returns [] for such input. The comment claiming an argv
  vector alone was enough is corrected. New test fails without the guard.
- KNOWN-LIMITS 75: the core fix would not move the stamp on every
  machine. matcherHashInputs() does not hash its own source, so LF
  checkouts keep their stamp and only CRLF checkouts move, onto the LF
  stamp. Reworded, with the condition that makes it true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The KNOWN-LIMITS numbering test requires contiguous entries, so numbers
follow the merge order #65, #66, #64, #63, #60, #62, #61, #67, #68, #69,
this branch moves with it (KNOWN-LIMITS.md heading and the limit 53 note,
src/views/matcher-history.js header, test/matcher-history.test.js comment).

On this branch alone the numbering test reports 75 and 76 missing; that
clears once #62 and #61 are on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@githubscum
githubscum force-pushed the lotor-lane/matcher-history branch from d3ba724 to ac717a6 Compare October 22, 2026 20:28
@githubscum
githubscum merged commit d26ad3b into main Oct 22, 2026
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