Skip to content

receipt binding: a certificate names the bytes it swore to, the audit finds them in history, and the corpus is measured as it is - #61

Open
fathomlab wants to merge 9 commits into
feat/charon-v01from
leg/certify-bind-by-digest
Open

receipt binding: a certificate names the bytes it swore to, the audit finds them in history, and the corpus is measured as it is#61
fathomlab wants to merge 9 commits into
feat/charon-v01from
leg/certify-bind-by-digest

Conversation

@fathomlab

@fathomlab fathomlab commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Leg 3, item 1 of papers/PLAN_the_next_level_2026_09_02.md — the one ADVANCE AUDIT_the_whole_program_2026_09_01.md named: bind receipts by digest, not by filename. Stacked on #60 (charon), which is stacked on #59; base is feat/charon-v01, which also gains one fixup commit here (papers/index_check.json 48→49, left stale when the charon INDEX row landed).

What this is

An OATH certificate recorded each receipt's digest and then bound by basename, so a receipt regenerated in place silently invalidated every certificate citing it — twice in two days (2026-08-31 → 09-01) and once in June — and the audit could not tell the receipt moved from the certificate is wrong. Now the certificate says which bytes it meant and the audit looks for them, for the document as well as the receipts. No verdict moves. No certificate is re-issued. The pinned first line of the corpus audit in REPLICATIONS.md is byte-identical in every mode.

The ladder, as the lab does it:

  1. SPEC_oath_receipt_binding_2026_09_04.md — frozen alone, before any code (69e0e23).
  2. styxx/receipt_binding.py (new; subprocess-only git, no GitPython), styxx/certify.py (+receipt_binding block on every new certificate; --require-committed), styxx/corpus_audit.py (--history auto|on|off; five cells per citation — same / at_issue / elsewhere / unbacked / unrecoverable — a document cell, stands_over_sworn_bytes with a reason on every null, and a binding: line beneath the uncovered line), the census script and its result (c554ab2, 6b4af8d).
  3. The adversarial pass — ATTACKS_receipt_binding_battery_2026_09_05.md: 52 constructions, 36 broke a sentence or a rule, 12 in code, all repaired; the frozen SPEC carries a dated ERRATA; the census re-run from repaired code (5b83cc4).
  4. RESULT_oath_receipt_binding_2026_09_05.md, sworn, 27 spans HELD, every number bound to a leaf of the census (0533803; re-sworn against the third census after the document cell was repaired).
  5. A follow-up the census itself demanded: edited_after_issue_census.py diffs every document that moved under its certificate against the sworn bytes and lays the census beside Charon's log, line by line; RESULT_edited_after_issue_2026_09_05.md is sworn to it (21 spans). The diff caught two staging copies the second census had over-read as edited; the document cell was repaired, the third census run from committed code, and the first RESULT re-sworn.

What the census says about the corpus (sworn)

213 tracked certificates, 631 citations: 630 same (every one also present at its issuing commit), 1 at_issue (CAPSTONE_universal_mind's mind_v0_validation.json, rewritten seventeen minutes after issue in June — the certificate stands over the bytes it swore to), 0 elsewhere / unbacked / unrecoverable. Documents: 205 same, 8 edited after their certificate issued (all eight stand over the sworn document), 0 moved. Of those eight, one document (SYNTHESIS_connection_of_minds, in two certificates) lost two VERIFIED tokens and gained 26 numbers the published certificate never examined; the live audit still reproduces its recorded class. Charon and the census agree on 207 of 213 lines; the census places all six the log could only flag. 211 certificates stand over their sworn bytes; 2 do not, with every byte in place — both already known (KNOWN_VERDICT_DRIFT and the read≠write submission source) and both the verifier having moved, not a binding defect.

What it does not say

That a certificate is immutable, tamper-proof or self-verifying. That any receipt's content is true — binding says which bytes were sworn to. That this ran outside this lab or on Linux. CI never runs the corpus audit; on a depth-1 clone it prints binding: history unavailable (shallow clone), pinned by a test on a clone the test builds. The code lens of the battery did not run (usage limit); the builder's own reading stands in and is disclosed.

Verification

  • tests/test_certify_by_digest.py: 23 passed, 1 NTFS skip (temporary repositories; one test over the tracked corpus by the census's population rule).
  • Regression sweep (certify, corpus-audit, charon, capsule tests): green. Full suite on the rebased, post-battery tree: 3849 passed, 12 skipped, 4 xfailed.
  • python -m ruff check styxx: clean. tests/test_sworn_eol.py: 121 passed.

For the operator

🤖 Generated with Claude Code

darkflobi and others added 9 commits September 5, 2026 05:35
…the audit says where those bytes went — frozen before any code

Leg 3, item 1 of PLAN_the_next_level: the AUDIT's one ADVANCE. Eight rules, each with its attack:
the certificate carries a receipt_binding block (content digest modulo newlines, blob, committed);
resolution on the working tree is unchanged; history gives every citation one of five cells —
same, at_issue, elsewhere, unbacked, unrecoverable — and the audit re-derives over the bytes the
certificate swore to and says whether it stands; history is optional and its absence is printed;
the census over the 213 tracked certificates is a receipt beside them; git lives in one module;
no corpus re-issue. The expected cells are stated before the census runs so they can be wrong.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…m in history, and the census over 213 certificates says where they went

Built to SPEC_oath_receipt_binding_2026_09_04.md (frozen at 4d75edf). styxx/receipt_binding.py is
the one module that talks to git on a certificate's behalf, subprocess-only: content digests
modulo newlines, the committed blob at HEAD, and the five cells — same, at_issue, elsewhere,
unbacked, unrecoverable — decided by digest against the tree at the issuing commit and then
against every commit that touched a path of that basename. certify_doc adds a receipt_binding
block to every new certificate (receipts_sha256 untouched; --require-committed exits 2);
corpus_audit gains --history auto|on|off, per-record cells, stands_over_sworn_bytes (the current
verifier re-run over the bytes at the issuing commit), and a binding: line beneath the uncovered
line. The pinned first line is byte-identical in every mode; a shallow clone prints why.

The census (receipt_binding_census.py -> receipt_binding_census_result.json, never regenerated in
place): 213 certificates, 631 citations; 630 same and every one also at its issuing commit, 1
at_issue, 0 elsewhere, 0 unbacked, 0 unrecoverable. The one at_issue is CAPSTONE_universal_mind's
mind_v0_validation.json, present-and-changed since 2026-08-27 — its sworn bytes sit at the issuing
commit and the certificate stands over them. stands 208 true / 2 false (both same-only, both the
verifier having moved: the KNOWN_VERDICT_DRIFT entry and the read≠write submission source) / 3
null (arXiv anc/ staging copies whose source.md is not at the issuing commit). Three predictions
the spec made before the run were wrong and are kept as written.

tests/test_certify_by_digest.py: 12 on a temporary repository. Regression sweep over the
certify, corpus-audit, charon and capsule tests: 233 passed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… (SPEC R6)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s broke, twelve in code, all repaired; the document gets its own cell; the census is re-run from repaired code

ATTACKS_receipt_binding_battery_2026_09_05.md is the record: three lenses returned (binding
semantics, every sentence, does-this-repair-the-defect), the code lens and 95 of 108 skeptic votes
died on the usage limit, the 14 that completed are recorded. The frozen SPEC is not edited; a dated
ERRATA is appended.

Code: history is searched --full-history -m -z (a TREESAME merge, a merge commit and a non-ASCII
name each hid a real sworn blob); glob metacharacters in a basename are neutralised; basenames
compare case-folded on an ignorecase repository; a receipt whose sworn bytes sit in the working
tree outside the audit root reads same, not at_issue (eleven receipts under one arc read at_issue
while unchanged); a fourth reading `content` for certificates carrying their own block (the only
one a mixed-newline receipt can satisfy); the DOCUMENT gets its own cell against document_sha256
and is checked at the issuing commit before any re-derivation (a document edited after issue, or a
cosmetic rewrite of the certificate after that edit, flipped stands with every receipt in place);
elsewhere citations are re-derived too (the blob is known); every null carries stands_reason; the
binding is computed before the missing-document return; zero receipts anchor the repository at the
document; paths are repository-relative; --history on exits 2 when unavailable; the cat-file batch
reader closes and raises instead of hanging. The census refuses to overwrite a tracked result,
records the blob ids of the code that ran beside head, and the first result (absolute paths, head
naming the SPEC commit from an uncommitted tree) is removed — nothing had sworn to it.

Census, re-run: 213 certificates, 631 citations; 630 same (all at issue too), 1 at_issue
(CAPSTONE_universal_mind's receipt, regenerated seventeen minutes after issue in June), 0
elsewhere / unbacked / unrecoverable; documents same 203, at_issue 10 (ten documents edited after
issue, including the three arXiv anc/ copies found by the certificate's own document field), moved
0; stands 211 true / 2 false (both with every byte in place: the KNOWN_VERDICT_DRIFT entry and the
read≠write source) / 0 null. Six spec predictions scored in the ERRATA: three confirmed, two wrong,
one half-wrong.

Tests: 22 on temporary repositories plus one over the tracked corpus by the census's population
rule (one NTFS skip). Regression sweep over certify, corpus-audit, charon and capsule tests green.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t ids the ERRATA and the battery quote are the rebased ones

Every number bound to a leaf of receipt_binding_census_result.json or to a blob at the sworn
commit: 213 certificates, 631 citations, 630 same (all at issue too), 1 at_issue, 0 elsewhere /
unbacked / unrecoverable; documents 203 same, 10 at_issue, 0 moved; 211 stand, 2 do not with every
byte in place, 0 could not be re-derived. The triple is pinned -text like every sworn artifact.

The leg was rebased onto the charon head (f28d35a, which carries the index_check fixup) before the
RESULT was sworn, so the sidecar's commit is reachable from the branch; the four ids the frozen
SPEC's ERRATA and the ATTACKS record quoted from before the rebase are rewritten to the rebased
ones in this commit — the frozen text above the ERRATA is untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ates, diffed against the sworn bytes, and the census laid beside Charon's log

edited_after_issue_census.py reads the committed receipt-binding census and Charon's committed log
and writes one new receipt. For each certificate whose document cell is at_issue it diffs the
document at the issuing commit against the working one: which ledger rows the edit removed
(VERIFIED / ABSTAIN / UNGROUNDED tokens the published certificate examined and the document no
longer has) and how many numbers the edit added (lines the published certificate never examined;
the live audit does). Then every OATH line in Charon's log is set beside the census row for the
same document: reproduced at ingest against stands over sworn bytes now, with the reason for every
disagreement. Refuses to overwrite a tracked result.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…certificate's own name, so a staging copy of an unedited document reads same

The second census read three arXiv staging copies as document at_issue; the edited-after-issue
diff showed two of them byte-identical to the working document under papers/ — the certificate
sits beside no document, and the cell had looked only there and at the issuing commit. The
document cell now does what the receipt cells do: it looks for the working file by the
certificate's `document` name anywhere in the tree at HEAD before declaring at_issue, and says
so in a note. Test: a staging copy of an unedited document reads same; edit the document and it
reads at_issue like its original.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…after issue — and the edited-after-issue diff re-run against it

receipt_binding_census_result_2026_09_05.json is a NEW file: the second census (receipt_binding_census_result.json,
sworn to by the RESULT at 0533803) stays as committed. This one ran from code committed at its own
head (provenance.code_committed_at_head true). Every citation cell is unchanged: 630 same, 1 at_issue.
Documents: 205 same, 8 at_issue, 0 moved — the two staging copies whose document lives unchanged
under papers/ now read same with a note. Stands 211 / 2 / 0, as before.

edited_after_issue_census_result.json, re-run against the new census (the first run, committed at
687b3c0, was cited by nothing and is replaced): 8 documents edited after issue, all with a working
document; 9 lines removed, 82 added; ledger rows on removed lines 4, all VERIFIED, in 2 certificates
of one document (SYNTHESIS_connection_of_minds and its staging copy: 0.071 and 0.057 on line 25);
numbers on added lines 26 in the same 2; the live class over the working document equals the
recorded class for all 8. Charon: 213 OATH lines beside 213 census rows, 207 agree; 1 line Charon
could not reproduce and 3 it left UNRESOLVED stand over their sworn bytes; 2 fail in both with every
byte in place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…c899a5), and RESULT edited-after-issue sworn (21 spans): the documents that moved, diffed, and the census beside Charon

The receipt-binding RESULT was first sworn at 5b83cc4 against the second census, whose document cell
read three staging copies as edited after issue; two were not. It now swears to the third census
(205 same / 8 at_issue / 0 moved; every other cell unchanged) and to the repaired module's blob;
the second census stays as committed. SPEC ERRATA, second note. CHANGELOG and REPLICATIONS follow.

RESULT_edited_after_issue_2026_09_05.md, sworn to edited_after_issue_census_result.json: 8 documents
moved under their certificates; 9 lines removed, 82 added; 4 VERIFIED ledger rows removed, all in the
two certificates over SYNTHESIS_connection_of_minds (0.071 and 0.057, line 25), and 26 numbers added
there that the published certificates never examined; the live audit over the working document
reproduces the recorded class for all 8. The census beside Charon's log: 213 lines, 207 agree; the
1 line Charon could not reproduce and the 3 it left UNRESOLVED stand over their sworn bytes; 2 fail
in both with every byte in place. The two instruments contradict each other nowhere.

Co-Authored-By: Claude Fable 5.1 <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