Repository navigation
CORE (signing sitting): tripwire for the line-ending-dependent matcher stamp - #68
Merged
Merged
Conversation
matcherVersionHash() digests Function.toString() text exactly as checked out, so an autocrlf clone stamps c4165ee9ff7612bd at 5198a07 while an LF clone of the same commit stamps e0877fab0f459e0c. This test asserts the current defective behaviour and fails when the core fix lands; the fix recipe is in the header and the PR body, queued for a signing sitting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… says how to turn each test around - Test 2 compared digests of two strings the test built itself, so it held before and after any fix. It now copies the policy module out twice (LF and CRLF) into temp ESM packages, imports each, and asserts the module's own matcherVersionHash() differs between them, after a control that the copy reproduces this checkout's live stamp. Checked in throwaway clones: passes on an LF checkout and a CRLF checkout, and fails on both once the PR's fix recipe is applied. - Header: "invert the assertions" would have made test 2 fail forever and test 4 skip forever. It now says what to do per test after the fix: keep 1, flip 2 to equal, invert or delete 3 depending on how the fix is written, rewrite 4 to assert the live stamp equals the LF copy with no skip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Review fixes pushed in 9ea3718. Both findings re-checked against the code first; both held. Fixed
Checked in throwaway clones of this branch (not pushed):
One line of the PR body is now stale. Doubt 2 says that on LF CI "test 3 is the only one that detects the fix". Test 2 now detects it on LF too, behaviourally, without depending on how the fix is spelled. The body's recipe line "invert this tripwire" should be read as "turn it around per the header". |
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>
This was referenced Oct 22, 2026
Merged
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, 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
Applied in the live install, each step signed by the owner: - store: tail-only append (proposals/store-tail-append, #72); PENDING_LANDING flipped in the same change. Precondition: live chain 37,173 entries, seq continuous. - hooks: V3-02 session-open reach certificate (#70), V3-04 per-step reasoning (#69), V3-03 tool I/O digest (#71), applied from git's stored patches. - chain: canonicaliser keeps an own __proto__ key in the hash (found while fixing #70); existing hashes unchanged (live chain had zero such keys). - tests: hook-wiring todo markers removed. npm test: 1292 tests, 1292 pass, 0 fail, 0 todo. Deferred to the post-merge evaluation: the #68 matcher line-ending fix, the KNOWN-LIMITS pin re-stamp (needs re-verification of every limit), verifyChain seq continuity, keyed digests, R2 on every tool call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
WO
WO-EOL-TRIPWIRE-01 (lotor lane run 40). Addresses the line-ending limit found in run 39 and recorded in #67 (numbered 75 there; 75 is also claimed by #61 and #62, so the number settles at merge). This PR adds no KNOWN-LIMITS text of its own, because the entry lives in #67.
What it is
A tripwire, not the fix. One new file:
test/policy-matcher-stamp-eol.test.js. It asserts the current defect and fails when the fix lands, the same pattern as the KNOWN-LIMITS 63 stamp-coverage tripwire.The defect:
matcherVersionHash()is sha256 ofmatcherHashInputs(), which joinsFunction.prototype.toString()source text exactly as checked out. Acore.autocrlf=trueclone stamps different bytes than an LF clone of the same commit. Every receipt from a Windows autocrlf machine carries amatcherHashthat no LF clone or CI run can reproduce, so comparing stamps across machines silently tells you nothing.Why CORE
The fix is in the policy module, which is non-delegable core. An executor edit there is gated, so following #48 and #49 this lane ships the tripwire plus the exact recipe and queues the change for the signing sitting.
The fix recipe (for the sitting)
In
matcherHashInputs(), before caching:Then bump
MATCHER_SCHEMAtomatcher/3, update the twomatcher/2assertions (policy-matcher-stamp-coverage,stamp-reach-coverage), invert this tripwire, and amend the limit.The correction to run 39's note: this does not move every stamp. LF clones already hash LF, so their stamp is byte-identical before and after (
e0877fab0f459e0cat 5198a07). Only CRLF-clone stamps move, onto the canonical LF value. The schema bump is still right, because it is how a reader tells amatcher/2CRLF stamp (not comparable across machines) from amatcher/3one.The existing "stamp IS the digest of the exported inputs" control still holds after the fix, because normalization happens inside the exported function.
Tested
npm test: 1060/1060 (+4) on this autocrlf checkout. Test 4 took its assert path rather than skipping, so the defect is confirmed live here.core.autocrlf=falseclone of 5198a07 with the test copied in: 3 pass, 1 skip (the CRLF-only test). That clone stampse0877fab0f459e0c, which matches run 39's measurement.b2f783ef, chain seq 36526. It touched only this file. Its sandbox could not run node, so the orchestrator ran every test.Eval
None of E1-E6 applies; this is stamp integrity (trust), not v3 granularity.
What a reviewer should doubt
matcherHashInputs's source contains a backslash-r anywhere. A fix that normalizes some other way (saysplit(/\r?\n/)) would also contain one, which is intended. A fix written outside that function would not trip it, but tests 2 and 4 would catch that on a CRLF machine.\r(classic Mac) is not handled by the recipe. Git autocrlf never produces it, so I judged it out of scope..gitattributes(* text=auto eol=lf)? That would fix every clone's bytes, but it changes repo config and does nothing for a stamp computed from an already-CRLF working tree. I recommend the in-hash normalization; the call is yours.🤖 Generated with Claude Code