Repository navigation
CORE (signing sitting): verifyChain checks seq continuity (queued patch + rehearsal test) - #74
Merged
Merged
Conversation
…a patch verifyChain checked hash, signature, genesis prevHash and prevHash linkage, never seq, so an entry signed with a skipped, duplicated or non-integer seq verified ok. The fix is core, so it is queued as proposals/verifychain-seq-continuity.patch (11 added lines) with test/chain-seq-continuity.test.js: the seq cases are todo on the live module until the patch lands, and a rehearsal block applies the patch to a temp copy and runs every case against it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
githubscum
added a commit
that referenced
this pull request
Oct 26, 2026
…e under signature Applied in the live install, each step signed by the owner: - precondition: live chain 42,567 entries, seq continuous (scan signed, 13668b04). - chain: verifyChain checks seq continuity (proposals/verifychain-seq-continuity, #74), signed 008521ce. - gate and hooks: subagent tool calls carry agentId/agentType on gate receipts (proposals/agent-id-attribution, #73), signed 74885c4c. - policy: matcher/3 folds CRLF so one commit has one stamp (proposals/l77-matcherhash-eol, #82, KNOWN-LIMITS 77), signed 7f124e65. - tests: agent-id describe todo marker removed; seq and l77 tests detect the landing on their own. Found during the sitting: KNOWN-LIMITS 82. The first apply, `git apply <patch>`, rewrote src/chain/index.js with no gate stop and no receipt, because the matcher reads paths from argv and the patch carries them in its bytes. It was reverted under signature (34b2dca0) and every patch was re-applied with its targets named via --include, which the matcher sees. Pin re-stamp follows in its own commit; mechanical, not a re-verification of every limit. 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-SEQ-CONTINUITY (lane run 54). First core item carried from the 2026-10-22 sitting (Isaac's ruling, POST-MERGE-EVAL-PLAN section 0): sequence continuity in
verifyChain. Write-up:proposals/store-tail-append/PROPOSAL.md, section "Separate core item ... seq continuity" (Finding 2 of the second-family review of #72).The hole.
verifyChainchecks hash, signature, genesis prevHash and prevHash linkage, neverseq. An entry signed with a skipped, duplicated or non-integerseqverifies{ ok: true }, and every reader that reportsentry.seqas a receipt's position (receiptSeq, which the gate returns on every decision) is then off by an unknown amount. The hash coversseq, so the hole is write-time only.What is here. No core file is edited. Core change is queued as a patch for the signing sitting:
proposals/verifychain-seq-continuity.patch: 11 added lines inside theverifyChainloop, after the signature check and before the prevHash check:Number.isSafeInteger(entry.seq) && entry.seq === i, else{ ok: false, brokenAt: i, reason: 'seq discontinuity at entry i: expected i, got <seq>' }.test/chain-seq-continuity.test.js: six cases (normal chain, skip, duplicate, string seq, genesis offset, precedence of the hash-mismatch check). Block 1 runs them against the live module, with the four seq casestodountil a landing tripwire (the reason string in the live source) flips them. Block 2 rehearses the landing: copies today's source into a temp dir (LF-normalized),git applys the patch there, asserts it is pure addition (original + 11 lines, every original line in order), imports the patched copy and runs all six cases, not todo.Tested.
npm testin a fresh clone of c69f552 with this branch: 1305 tests, 1301 pass, 0 fail, 4 todo (main alone: 1292/1292). The 4 todo are cases (b)-(e) on the live module: they fail there, which is the hole shown, and pass in block 2 against the patched copy. Orchestrator re-read both files after each executor pass.Eval served. None of E1-E6 directly; this is R0/R1 integrity (the chain's numbering is part of the trace a witness holds).
Executor. glm-5.3-flash:cloud via dispatch-to-ollama, sessions 4, all
glm-5.3-flashon the chain, receipt seqs 37791, 37812, 37837, 37854; FIX1-3 were line-ending, trailing-newline and enclosing-repo issues in the WO environment, plus one orchestrator touch: appended the patch's missing final newline by hand. Orchestrator verified by running the tests, re-reading both files, and probing the patched copy.What a reviewer should doubt.
seq !== index. Any hit means this check turns a currently-verifying chain red; that is a finding to resolve first. The lane did not read the live log.verifyChainon a slice. The check assumes a full chain from genesis (as the genesis prevHash check already does). Any caller that verifies a window starting past 0 would now fail on seq as well as genesis; none found by grep (bin/export-chain.js,bin/hook-session-start.js,src/views,src/store).git applyon a temp copy of a core file. It writes nothing under the repo, but it is the test suite applying a core patch, and a reviewer should decide whether that rehearsal belongs innpm test.git show HEAD:<patch> | git applyin the live install meets the same question limit 77 named.CORE: title marked for the signing sitting. Do not merge outside one.
🤖 Generated with Claude Code