Repository navigation
CORE (signing sitting): v3 V3-02: reach certificate, measured not declared, on session receipts - #70
Conversation
New module src/reach: the v3 rung ladder (R0 to R6), an open-half builder,
a close-half measurer, and checkCertificate for readers. The close half is
computed from what the receipt holds and what the transcript carried, never
from anything requested or declared: a rung is "recorded" only when both the
receipt has a per-item record of it and the transcript carried it, so the
certificate can never state a deeper rung than was observed. Absence is
{ status: 'unrecorded' } with no count, never a zero.
src/ingest attaches the close certificate to every session receipt and, inside
the chain lock, links it to the session's open receipt (seq and hash) and takes
the runtime from it. A measurement failure is recorded as failed and never
costs the session its receipt.
Tests: test/reach-certificate.test.js, fail-first (the module is absent on
main; the four chain tests failed with the module present and ingest
unwired). Includes the V3-01 silent logprobs drop, the ceiling, forged
certificates, and chain fidelity (verifies; tampering breaks it). The
session-open hook test is todo until the staged hook patch is applied.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The open half of the certificate needs two lines in the SessionStart hook, which is core and gated in every mode, so it is staged as a patch rather than applied by the lane. git apply --check passes against main (working tree and index). The proposal records the one decision left to the owner: whether src/reach is grantable or core (test/core-classification.test.js fails until that is decided, by design). 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, #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>
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>
#60 (V3-05) creates src/reach/index.js for observeRungs and reachReport and merges first, so this branch no longer claims that file. The certificate module moves to src/reach/certificate.js unchanged apart from its header, and every import follows it: src/ingest/index.js, test/reach-certificate.test.js, and the staged session-start wiring in proposals/v3-02-session-open-reach.patch (same line counts, so the hunk headers stand; `git apply --check` passes on the committed blob, against the working tree and the index). The proposal table names the new path and notes that #60's GRANTABLE line for `reach` settles the classification test once #60 is on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge-order fix: certificate moved to #60 creates
Expected conflict at merge time (not rebased, per instruction): #69 merges first and also edits
Today the reach R3 count reads |
…an object key
F1: a model id named __proto__ wrote to Object.prototype through the
certificate's tallies and the parser's cost.byModel; constructor/toString
wrote to shared builtins and dropped the model from the certificate.
Tallies are Maps, the parser publishes buckets as own properties, and the
certificate's byModel is now a sorted list of { model, ... } entries, so a
model id is a value and is always inside the chain hash. checkCertificate
refuses a keyed byModel.
F2: model.id is "multiple" when more than one model was seen, so it never
stands beside the session-union deepestRecorded as one model's reach;
model.lastSeen carries the last model. checkCertificate enforces it.
F3: checkCertificate checks per-model deepestObserved.
F4/F8: failedCloseCertificate: rung fields read "measurement-failed", not
"unrecorded"; the chain gets an error code and a sha256 of the message,
never the text. checkCertificate refuses it by name.
F6: close-half model ids and harness version capped like the open half.
F7: the line-level logprobs branch is dropped (cannot be told from a
request echo); tested, and the silent-drop test comment corrected.
F9: the test helper no longer passes an unused opts.
Fail-first: 12 new tests failed against the pre-fix module; all pass now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The F1 fix showed the chain canonicaliser drops an own "__proto__" key from the hash (plain-object assignment sets the prototype), so the value under it can be edited without breaking verification. Core, so staged, not applied: proposals/v3-02-chain-proto-key.patch (null-prototype sorted object plus test/chain-proto-key.test.js). Fail-first run against the unpatched chain; git apply --check passes. KNOWN-LIMITS number left for the sitting (75-78 are claimed by open PRs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes: second-family review (minimax-m3), V3-02 reach certificateI checked every finding against Tests ( Fixed
Not fixed in this PR
Staged (core, not applied)The chain canonicaliser drops an own Shape change for readers
|
…h-certificate # Conflicts: # src/ingest/index.js
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>
CORE. Lands only at the owner's signing sitting. Do not merge before then.
Work order V3-02 of the Lotor v3 spec (
LOTOR-V3-SPEC-2026-10-18): the reach certificate. Each session states the model, the runtime and the deepest rung recorded, measured, not declared, so a later finding can never claim more depth than its record had.What it does
src/reach/certificate.js(new; moved fromsrc/reach/index.json 2026-10-22, because v3 V3-05: observe reach rungs from the response, never the request #60 owns that file). The rung ladder R0 to R6, plus:buildOpenCertificate(payload, harness): the open half. Model and runtime as the harness states them, each with its basis. The rung isnot-yet-measured, because nothing has been emitted yet at open and any rung stated there would be a guess. The Lotor build is not repeated; it points at the same payload'sobserverfield (package version and whole-tree source digest).measureCloseCertificate(summary, transcript): the close half, measured. Per rung, overall and per model.attachOpenReference(cert, entries, sessionId): links the close certificate to the session's latestsession-openon the chain (opened: { seq, hash }) and takes the runtime (harness name and basis) from it.checkCertificate(cert, receipt?): for readers (the meter, a verifier). Rejects any certificate whose stated depth is not backed by its own rung map, or whose recorded counts are not backed by the receipt's own fields.src/ingest/index.js. Every session receipt (SessionEnd) now carriesreach, the close certificate. The open link is taken inside the chain lock. A measurement failure is recorded as failed (and refused bycheckCertificate) and never costs the session its receipt.proposals/v3-02-session-open-reach.patch(staged, not applied). The two-line wiring that puts the open certificate on thesession-openreceipt. See "Why the hook is staged" below.Design decisions
reach/rungsfield in a hook payload or transcript, not thethinkflag. Only response-side fields that are present and non-empty count. This is V3-01's finding turned into code: Ollama cloud acceptslogprobs: true, answers 200, and omits the field, and that case is a test here.recorded: the receipt holds a per-item record of this rung (R1 inran, R3 insession.thinkingBlocks) and the transcript carried it.observed: the transcript carried it, but this build keeps no per-item record of it (bound only throughtranscriptHash). Today: R0 text, R2 tool results, R4 logprobs.unrecorded: nothing found or kept.recordedrequires both halves, so neither a receipt that claims more than its transcript held nor a transcript the receipt never kept can raise the certificate.deepestRecordedis never deeper thandeepestObserved. Tested with forged receipts and forged certificates.byModeluses the same bucket keys ascost.byModelso they join. A tool result is attributed to the model that made the call.activationsin a message is a claim, not a capture. They stayunrecordeduntil a capture path exists (V3-06).RECORD_FIELDSinsrc/reach/certificate.js. No hook change is needed for that.How absence is recorded
{ "status": "unrecorded" }with no count field at all. A0would read as "measured, and the model did none of this", which the record cannot back: a model that thought without exposing it looks identical to one that did not think.checkCertificaterejects any certificate that carries a zero.deepestRecorded: "unrecorded", not"R0"and notnull.model.id: "unrecorded". No model in the SessionStart payload:{ id: "unrecorded", basis: "none" }.opened: "unrecorded",runtime.harness: "unrecorded".rungsanddeepestRecordedare both"not-yet-measured".Tests
test/reach-certificate.test.js, 26 tests in 5 suites (one marked todo). The suite total grows by 27 because the classification test also gains a case forsrc/reach. Fail-first: on main the file fails at import (module absent); withsrc/reachpresent and ingest not yet wired, the four chain tests failed, and they pass with the wiring. Covered:npm teston this branch:Baseline on main at 5198a07: 1056 tests, 1056 pass, 0 fail.
Left failing or todo, and why
test/core-classification.test.js, "src/reach is either core or explicitly grantable". v3 V3-05: observe reach rungs from the response, never the request #60 (merges first) addsreachtoGRANTABLE, which settles it for both modules once v3 V3-05: observe reach rungs from the response, never the request #60 is on main; the owner can still reverse it. This test refuses any new directory undersrc/until a human classifies it, and says it will not guess. The lane did not guess either. Recommendation: grantable today, reason "states evidentiary depth on a receipt; can mislead a reader, cannot change what the gate permits" (the same line drawn forharness.js,ingest,parser). It moves to core the day a policy reads a certificate (the spec's secrets-material rule), and then it goes into bothCORE_DIRSandselfModFragmentsForBase(). The grantable option is one line inGRANTABLEin that test file.todoso it reports without failing the suite. It was run and it does fail today (noreachon the open), so it is a real test and not a placeholder.src/reachchanges the whole-tree build digest (observer.build) by design.Why the hook is staged
The self-mod rule gates every
bin/*.jsedit in every mode, and it matches by path fragment, so it gates the hook in a lane clone the same as in the live install. The lane did not ask for a signature and did not route around the gate. The wiring is two lines, staged asproposals/v3-02-session-open-reach.patch.git apply --checkpasses against main at 5198a07, both on the working tree (CRLF checkout) and from the index. The reasoning is inproposals/v3-02-reach-certificate-2026-10-22.md.The close half does not depend on the patch:
session-openreceipts on main already carryharness, so the close certificate links to them and takes the runtime from them today.What the owner does at the signing sitting
src/reach(above), and make that one edit.proposals/v3-02-session-open-reach.patch(git apply proposals/v3-02-session-open-reach.patch).todooption from the last test intest/reach-certificate.test.js, then runnpm test. Expected: 0 fail, 0 todo. This has not been run green, because applying the patch is the gated act.Residuals and open questions
modelfield is unverified. The open half readspayload.model(a string, or an object withid). This lane did not capture a live SessionStart payload to confirm that Claude Code sends one. If it does not, the open certificate saysunrecorded, which is honest, and the close half measures the model anyway.failed[].errorDigestdigests the output of failed calls. That is a deliberate under-claim, which is the safe direction. V3-03 makes R2 recordable throughRECORD_FIELDS.</think>) counts as R0 observed. That under-claims R3 (safe), but it puts reasoning text in the R0 count. Classifying it by marker is V3-04's job.redacted_thinkingblocks are counted at no rung.recordedis inherited, not re-derived. The parser records every tool call and thinking block whatever the model, andran[]carries no model field, so per-modelrecordedstatus is inherited from the session-level status.checkCertificateenforces that a model can never berecordedat a rung the session is not.npm run receiptsdoes not render the certificate yet.src/ingest/index.jsafter the chapters binding, and two hunks inbin/hook-session-start.js(import list and the payload literal, afterharness,).🤖 Generated with Claude Code