Skip to content

fix(2c-D): Req 21.16 proves the receipt's facts under the validated R_T^+, not a device root - #854

Merged
cryptskii merged 1 commit into
mainfrom
fix/2c-d-req-21-16-economic-receipt-root
Sep 11, 2026
Merged

fix(2c-D): Req 21.16 proves the receipt's facts under the validated R_T^+, not a device root#854
cryptskii merged 1 commit into
mainfrom
fix/2c-d-req-21-16-economic-receipt-root

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

PR C1 — the D4 correction, landed as item-8 verification machinery before the cutover (2c-D §11's boundary note: item 8 "adds the last verifier, and stops"). No behaviour change: verify_published_receipt has no live caller.

Why D4 needed correcting

D4 sourced the device post_root from "the already validated successor/economic-admission path". Checked at source, that path never produces one:

C_T^+      relationship_chain_tip_v2(...) commits no root at all
sigma_dsm  signs H(G || DevID || C_dsm+ || operation_digest) -> no root
0x0031     the settle's admission substrate -> no root
child_r_a  discarded by the route; never published
device SMT a bounded cache with no validity replay

The only independently validated root is R_T^+, and the settle write set already commits the receipt's facts under it as EconomicSettlementReceiptState. The owner's correction is recorded verbatim in 2c-C4 §9, after the D4 block rather than replacing it; 2c-D §11 item 8 is amended to match.

The fold is the correspondence check

The leaf is rebuilt from the receipt's facts, keyed from the proven identity and the settlement being verified, and folded under R_T^+. One altered field → a different root. There is no second copy of the facts to compare against, so nothing to drift. The fixture tree comes from the real settle write set.

One check deliberately removed — the signature

Its payload covers the receipt's own post_root, so keeping it would feed the retired device root back in. What it attested is now established by inclusion under a lineage-validated root. the_legacy_device_fields_carry_no_weight_either_way pins the removal as a decision. If you want it back, it is a few lines — but it would reintroduce the device root into the verifier.

Controls

the_receipts_own_device_path_is_not_evidence the correction as a test: the device path proves its leaf under its own root, and here proves nothing
a_self_rooted_receipt_is_refused_though_the_legacy_verifier_accepts_it inflated output; legacy verifier says OK, Req 21.16 refuses
an_altered_amount_asset_or_sequence_is_refused each field alone lands the fold elsewhere
facts_committed_by_another_trader_do_not_verify_for_this_one key/position from the proven identity

Mutation controls, executed, restored from byte copies:

  • M1 delete the fold comparison → 6 named tests red
  • M2 delete the identity check → a_receipt_naming_another_trader_is_refused red (the fold keys on the proven identity, so it can't catch this alone)

Lean owes nothing (no theorem encodes the device-root rule); no TLA+ spec models the trader fence.

Flagged, not fixed here: ccb-object-registry.md ~line 2110 still says 2c-D's adopting change "is NOT started" — stale since #841. Different fact, different PR.

Verification

dlv::published_receipt               14/14
make lint                            exit 0
ci/production_safety_checks.sh       exit 0

Next: PR C2, the cutover.

…_T^+, not a device root

Ruling D4 required the published receipt's DEVICE-SMT leaf under an
independently established device post_root, sourced from "the already
validated successor/economic-admission path". Implementing the cutover
(PR C) showed that path never produces a device root:

  C_T^+      relationship_chain_tip_v2(...) commits no root at all
  sigma_dsm  signs H(G || DevID || C_dsm+ || operation_digest) -> no root
  0x0031     the settle's admission substrate -> no root
  child_r_a  discarded by the route; never published
  device SMT a bounded cache with no validity replay

A root carried by the receipt is self-authenticating, and a trader
signature over a device root would prove provenance, never validity.
The Rev 15 conformance delta (2026-08-21, §5) had already recorded the
same divergence.

The owner corrected D4 (2026-09-11): the one independently VALIDATED root
on the settle path is R_T^+, and the settle write set already commits the
receipt's facts under it as an EconomicSettlementReceiptState leaf. The
correction is recorded verbatim in 2c-C4 §9 after the D4 block, which is
kept, and 2c-D §11 item 8 is amended to match. Frozen text first, as with
D3 and D4.

THE FOLD IS THE CORRESPONDENCE CHECK

`verify_published_receipt` rebuilds the leaf from the receipt's facts, keys
it from the PROVEN identity and the settlement being verified, and folds it
under the validated R_T^+. A single altered field lands on a different root,
so there is no second copy of the facts to compare against and no list of
equalities that could drift from the leaf. The fixture's tree comes from the
REAL settle write set, so the leaf matched is production's.

ONE CHECK IS DELIBERATELY REMOVED: THE SIGNATURE

Its payload covers the receipt's own post_root, so keeping it would feed the
retired device root back into this verifier. Everything it attested is now
established by inclusion under a root the lineage walk validated — a walk
that itself authenticated the trader under the proven authority.
`the_legacy_device_fields_carry_no_weight_either_way` pins the removal so it
reads as a decision, not an accident.

`the_receipts_own_device_path_is_not_evidence` is the correction stated as a
control: the receipt's device path genuinely proves its leaf under its own
root, and handed to Req 21.16 it proves nothing.

Mutation controls, executed and restored from byte copies:
  M1 delete the fold comparison  -> 6 named tests red
  M2 delete the identity check   -> a_receipt_naming_another_trader_is_refused red
     (the fold keys on the PROVEN identity, so it cannot catch this alone)

No behaviour change: `verify_published_receipt` still has no live caller.
This is item-8 verification machinery, landed before the cutover per 2c-D
§11's boundary note. Lean owes nothing — no theorem in DSMBundleAcceptance
encodes the device-root rule — and no TLA+ spec models the trader fence.

Verification:
  dlv::published_receipt               14/14
  make lint                            exit 0
  ci/production_safety_checks.sh       exit 0
@cryptskii
cryptskii merged commit 8d251c0 into main Sep 11, 2026
15 checks passed
@cryptskii
cryptskii deleted the fix/2c-d-req-21-16-economic-receipt-root branch September 11, 2026 01:34
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