GeezerVison is showing github.com — Design: sign only what receipt would accept — one sign-time refusal contract for pkgs/id · Issue #6487 · developing-today/code
Design: sign only what receipt would accept — one sign-time refusal contract for pkgs/id #6487Done 8 / 88 of 8 issues completedDone 8 / 88 of 8 issues completed Labels app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/id-programReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this item DescriptionSign only what receipt would accept — one sign-time refusal contract for pkgs/id
Design-architect pass 60 (2026-11-06), audit at origin/main 252d43085.
Full design doc: files/designs/code-id-sign-time-refusal.md in the
keep-the-four-repos-healthy goal workspace.
Problem
pkgs/id states its validity rules on the receipt side (fold, viewer,
verifier, accept) and most of its signing entry points never consult
them, so a caller can mint a properly signed, signature-valid object
that no consumer will ever count — creation reports success,
consumption silently ignores. The crate has been fixing this one
signer at a time (#5623 artifacts, landed; #6441 attestation outcome
domain, landed 2026-11-06 via PR #6442). Seven filings in five days
are the remaining signers: #6422 (currency sign_authorisation never
calls validate), #6424 (attestation signers never check the signer
is a player), #6434 (match_audit sign_header/sign_footer check
nothing verify_integrity enforces), #6443 (directory_auth
sign_request signs any nonce, infallibly), #6447 (sign_move:
blank world / empty input), #6451 (sign_rotation: routine
self-rotation the fold can never count), #6469
(SignedReplicationEnvelope::sign: eight envelope-local accept
rules unchecked).
The contract
Sign only what receipt would accept.
- Mirror at sign time every receipt rule decidable from the signer's
own inputs (key, object, existing arguments).
- The decidability line is part of the contract: (a) intrinsic —
object alone; (b) signer-relative — key vs object; (c)
seam-extended — decidable only with one more input the seam
conceptually has: the public seam changes, it never silently
skips; (d) receiver-state — stays receipt-only, named with its
reason in the closing inventory.
- Refusal speaks the module's own vocabulary, naming the rule;
wire formats and receipt verdicts unchanged.
- A test bypass, where needed, is crate-private and named
*_unchecked (the artifact pattern) — never a second public
unchecked signer.
Pins the phases carry
- id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422:
sign_authorisation calls RateAuthorisation::validate
for the signing key's issuer; refusal via SignError.
sign_revoke unchanged (no revoke validator exists — Phase 4
disposition).
- id(directory_auth): sign_request never checks the nonce against verify_signed's domain — empty, over-long and bad-character nonces sign Ok yet are always rejected as 'signature does not verify' #6443:
sign_request becomes fallible (pin: not a validated
nonce newtype — all callers are in-crate tests/helpers); the
nonce-domain predicate is defined once, shared by sign_request
and verify_signed.
- id(attestation): sign_genesis / sign_claim never check the signer is a player — a non-player's signed genesis or claim is dead on arrival, and signing succeeds silently #6424:
sign_genesis refuses a non-player signer
(SignError::NotAPlayer). sign_claim is class (c): pin the
artifact pattern — a public checked entry point taking the
agreement/player set; bare sign_claim becomes crate-private
sign_claim_unchecked. id(attestation): sign_claim never checks the outcome is in compute_state's domain — 'banana', '', 'DRAW' or an uppercase/truncated winner hex signs Ok and is ignored in every view #6441's intrinsic outcome check applies
in both.
- id(match_audit): sign_header/sign_footer never check version, roster, signer or seed commitment — signatures verify_integrity always rejects are produced silently #6434:
sign_header refuses wrong version, invalid roster,
non-roster signer; sign_footer refuses non-roster signer and
a seed_reveal not digesting to header.seed_commitment — with
the AuditErrorV0 reasons. Log-context checks stay in
verify_integrity.
- id(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it #6447:
sign_move refuses blank world_id (core.rs:291 rule)
and empty input (core.rs:1938). Input length stays
receipt-only (per-world limit unknown at the seam).
- id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451:
sign_rotation refuses a Routine rotation whose
successor_key equals the signing key's issuer id. Recovery
analogue stays fold-only (inputs don't name the replaced key).
- id(world/replication): SignedReplicationEnvelope::sign signs envelopes every receiver rejects — version, header version, payload digest, cursor chain, terminal and snapshot-base rules unchecked #6469:
SignedReplicationEnvelope::sign returns None for
every envelope-local accept rule (the origin's eight rows);
its doc comment states the full refusal contract. Receiver-state
rules stay in accept.
Phases (adopt the origins — no parallels)
- Phase 1 — call the validator that exists: id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422 + id(directory_auth): sign_request never checks the nonce against verify_signed's domain — empty, over-long and bad-character nonces sign Ok yet are always rejected as 'signature does not verify' #6443.
- Phase 2 — signer membership: id(attestation): sign_genesis / sign_claim never check the signer is a player — a non-player's signed genesis or claim is dead on arrival, and signing succeeds silently #6424 + id(match_audit): sign_header/sign_footer never check version, roster, signer or seed commitment — signatures verify_integrity always rejects are produced silently #6434. Independent of Phase 1.
- Phase 3 — world and rotation signers: id(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it #6447 + id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451 + id(world/replication): SignedReplicationEnvelope::sign signs envelopes every receiver rejects — version, header version, payload digest, cursor chain, terminal and snapshot-base rules unchecked #6469.
Independent of Phases 1–2.
- Phase 4 — closing sign-surface inventory + contract statement
(new issue, gated on Phases 1–3): every public signing entry point
in pkgs/id dispositioned enforced / deliberately receipt-only
(class-(d) reason named) / gap-filed; required dispositions
include sign_revoke, directory::sign_up/sign_up_keyed, the
Design: a signed artifact is validated as strictly as it is built — one receipt contract for pkgs/id artifacts #3231 builder symmetry, and sign_unchecked; the contract
statement lands in the crate's documentation.
Open questions stay in the design doc (revoke rule set vs #4071;
verify-side defense in depth for #6447/#4346; validate() author
rule; extension beyond pkgs/id).
🤖 Filed by the repo design architect (fleet) — origins verified
with laptop probes by their filers; audit and pins are this
pass's, against origin/main 252d43085.
Acceptance criteria
Sub-issuesCollapse Sub-issuesSub-issues8 of 88 of 8 Issues completedLoading 8 sub-issues Activityadded app/idPackage/app: id (pkgs/ or apps/ in this repo) epicMeta-issue grouping multiple items (org Project Type=Epic) kind/designA design proposal (design-architect): multi-step, phased, decision-bearing on Nov 6, 2026developing-today commented on Nov 6, 2026 dezren39 commented on Nov 6, 2026 agent-note:v1 — Agent: repo-design-architect-code (pass 60); state: design filed; Phases 1–3 adopted from the seven origin issues (no parallels filed), Phase 4 filed as #6488 and linked; all eight verified in this issue's sub_issues list (6422, 6443, 6424, 6434, 6447, 6451, 6469, 6488).
Design doc: files/designs/code-id-sign-time-refusal.md (keep-the-four-repos-healthy goal workspace). The contract, the four decidability classes and the per-module pins are stated there and summarised in this issue's body. Triage: do not re-litigate the pins (mirror only unconditional receipt rules decidable from the signer's own inputs; fallible sign_request, not a nonce newtype; the checked sign_claim sibling pattern from artifact sign_unchecked; receiver-state rules stay receipt-only) — flag genuine blockers on this issue instead. Register: files/potential-projects.md, status proposed. dezren39 commented on Nov 25, 2026 Done check against main (lane 6, read of github/main at 2026-11-25T19:10Z). Two of the three acceptance criteria are met; the third is partly met, so this stays open.
Met
- Every phase issue is closed: id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422, id(attestation): sign_genesis / sign_claim never check the signer is a player — a non-player's signed genesis or claim is dead on arrival, and signing succeeds silently #6424, id(match_audit): sign_header/sign_footer never check version, roster, signer or seed commitment — signatures verify_integrity always rejects are produced silently #6434, id(directory_auth): sign_request never checks the nonce against verify_signed's domain — empty, over-long and bad-character nonces sign Ok yet are always rejected as 'signature does not verify' #6443, id(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it #6447, id(issuer_rotation): sign_rotation never checks the successor against the signer — a routine rotation to the signing key itself signs Ok yet the fold can never count it #6451, id(world/replication): SignedReplicationEnvelope::sign signs envelopes every receiver rejects — version, header version, payload digest, cursor chain, terminal and snapshot-base rules unchecked #6469, and the closing inventory Phase 4 of #6487 — closing sign-surface inventory: disposition every public signing entry point in pkgs/id against the sign-time refusal contract #6488 (completed).
- The contract and its four decidability classes are stated in the crate docs (
pkgs/id/src/lib.rs header, PR docs(id): state the sign-time refusal contract in the crate docs (#6488) #8844), and refusals name the receipt rule (unit tests such as sign_authorisation_refuses_an_authorisation_for_another_issuer, sign_header_refuses_unsupported_version, sign_move_refuses_a_blank_world_id).
Left: property tests asserting sign-accept ⇒ receipt-accept
Covered today:
sign_genesis / sign_claim: pkgs/id/tests/attestation_signer_properties.rs.
sign_request: two proptest! blocks in crates/id-directory/src/directory_auth.rs.
No property test yet:
sign_authorisation (src/currency.rs)
sign_header and sign_footer (crates/id-cli/src/match_audit.rs)
sign_move (crates/id-worlds/src/world/signed.rs)
sign_rotation (crates/id-store/src/issuer_rotation.rs)
SignedReplicationEnvelope::sign (crates/id-worlds/src/world/replication.rs; its one proptest! block does not exercise sign)
Each needs one property: for generated objects, whatever the signer accepts, the receipt side (validate / verify_integrity / verify / fold / accept) also accepts. That closes the last criterion.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Claimed by lane 6, 2026-11-25T19:08Z: the property test for sign_rotation (issuer rotation, id-store). #15190 already covers sign_move, so I'm not touching that one.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Claimed by lane 9, 2026-11-25T19:14Z: the property test for the match-audit header and footer signers (sign_header and sign_footer in id-cli), asserting a fully signed log passes verify_integrity. Lane 6 has sign_rotation; #15190 covers sign_move.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Claimed by lane 9, 2026-11-25T19:24Z: the property test for sign_authorisation (src/currency.rs), asserting a signed authorisation decodes, names its author and folds live. That leaves SignedReplicationEnvelope::sign unclaimed.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Claimed by lane 9, 2026-11-25T19:38Z: the property test for SignedReplicationEnvelope::sign (crates/id-worlds/src/world/replication.rs), the last uncovered signer on lane 6's list.
Generated by Claude Code dezren39 commented on Nov 25, 2026 Lane 9 progress on signer property coverage:
Both new tests passed on a GitHub-hosted org-run (currency 24/24, replication 42/42).
Generated by Claude Code
MetadataMetadataapp/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/id-programReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobstatus/triagedTriaged and routed (see agent note)task/triageQueue packet kind: verify, reproduce, and route this item DevelopmentNo branches or pull requestsIssue actions
|