Repository navigation
wallet-v1.3: the declared key set (realizes add-multi-key-wallets) - #8
Conversation
Realizes add-multi-key-wallets (ratified 2026-08-28, PR #7). ADDITIVE MINOR, and the first wallet release since the carve in which a digested contract byte moves: openxwallet-record.schema.yaml only, the other seven proven unchanged by recomputation. `keys:` is an OPTIONAL list of ADDITIONAL declared keys beside `key_reference`. The declared set is their union, so a record omitting it declares a set of one and takes exactly the code path it took before — backward compatibility by construction, not by a compatibility branch. Each entry requires its own did, fingerprint and custody. Rule (r) resolves a presenting key against the SET. `custody-model-` `mismatch` keeps its code and compares against the custody of the key that SIGNED — where signing means a VERIFIED proof named it, because the existing fallback reads the record's own unverified attribution block and keying custody on that would move the lie one field over. Four new codes: `declared-key-duplicate`, `declared-key-raises-authority`, `declared-key-fingerprint-mismatch`, `presenting-key-evidence-cap`. Zero new warnings — LedgerxFactory runs `--strict`. `custody-model-unknown` and `revoked-chain-exercised` take new subjects rather than new names; one harness-only code, `examples-invalid`, refuses a colliding packaged key id and can never fire on a consumer's tree. Two things the alignment pass forced that are worth naming here. A key is RETIRED BY STATE, never by deletion: this validator re-adjudicates every file in a scanned tree on every run, so deleting a rotated key's declaration would rewrite the verdict on acts already attributed to it, and four CI-resident seat keys will rotate. And the fingerprint is RECOMPUTED from `public_key_multibase` where an entry declares one — `did:key`'s own encoding decodes to the same 32 bytes every other surface fingerprints, so the join token is proven rather than decorative. `custody-model-mismatch` shipped UNPROBED by the corpus, so moving its basis could have deleted it silently for the whole estate. negative/exercise-single-key-custody-not-the-wallets.yaml is that regression proof. All nine new negatives are named probes in the validator and in the suite, because every new invariant attributes to a requirement other fixtures already cover. `test_the_previous_version_adjudicates_the_corpus_identically` flipped direction and says why: a reader cannot adjudicate a tree whose rules it lacks, so the comparison is now THIS reader over the recovered PREVIOUS corpus, harness codes excluded. Bar: pin verify, syntax gate, validator plain and --strict (0/0), pytest 90 passed, openspec validate --all --strict 5 passed. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
There was a problem hiding this comment.
Pull request overview
This pull request realizes add-multi-key-wallets for the openxwallet capability by introducing an optional declared key set (keys:) in the wallet record schema, extending the canonical validator to resolve presenting keys and custody per declared key, and updating the packaged corpus + documentation for the wallet-v1.3 additive minor release.
Changes:
- Extend the wallet record schema (
contract_schema_version: 2) with optionalkeys:entries (per-key custody, fingerprint, optional state/public half) while preserving single-key backward compatibility. - Update
validate-openxwallet.pyto index and adjudicate against the declared key set, enforce new invariants/codes, and add named-probe harness checks for the expanded corpus. - Add new tests, fixtures, and release bookkeeping/docs for
wallet-v1.3(manifest, changelog, Speckit feature docs).
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/nested_repo_prune/test_prune_and_register_note.py | Updates corpus-count note and flips the “previous vs current” adjudication comparison to compare both readers over the previous corpus. |
| tests/multi_key_wallets/test_declared_key_sets.py | New subprocess-driven test suite probing multi-key declared set behavior, including basis changes and new refusal codes. |
| specs/015-multi-key-wallets/tasks.md | Speckit task checklist mirroring the governing change and tracking realization/release steps. |
| specs/015-multi-key-wallets/spec.md | Feature spec capturing acceptance criteria and out-of-scope items for multi-key wallets. |
| specs/015-multi-key-wallets/plan.md | Design/plan notes documenting invariants, code changes, and rationale (including the flipped regression-direction test). |
| specs/014-per-seat-register-entries/spec.md | Updates out-of-scope successor note to record that multi-key wallets are now taken/released in v1.3. |
| scripts/validate-openxwallet.py | Implements declared key set support (indexing, per-key custody basis, fingerprint recomputation, new refusal codes, named probes). |
| openspec/specs/openxwallet/spec.md | Updates the overall purpose statement to include “declared SET of signing keys”. |
| openspec/changes/add-per-seat-register-entries/tasks.md | Marks successor task 7.3 as completed and records the 2026-08-28 ruling + realization linkage. |
| openspec/changes/add-per-seat-register-entries/design.md | Records that the multi-key-wallet successor was taken and realized as wallet-v1.3. |
| contracts/openxwallet/README.md | Updates capability README to describe multi-key wallets and reinforces “keys don’t multiply authority”. |
| contracts/openxwallet/openxwallet-record.schema.yaml | Bumps contract_schema_version to 2 and adds optional keys: with per-key custody/fingerprint/state + key_fingerprint on key_reference. |
| contracts/openxwallet/examples/wallet-agent-council-multi-key.example.yaml | Adds a packaged positive multi-key wallet fixture with mixed custody and a retired key. |
| contracts/openxwallet/examples/negative/wallet-declares-one-key-identifier-twice.yaml | Adds negative fixture for declared-key-duplicate. |
| contracts/openxwallet/examples/negative/wallet-declared-key-outranks-its-wallet.yaml | Adds negative fixture for declared-key-raises-authority. |
| contracts/openxwallet/examples/negative/wallet-declared-key-omits-its-custody.yaml | Adds schema-negative fixture for missing per-key custody in a keys: entry. |
| contracts/openxwallet/examples/negative/wallet-declared-key-fingerprint-does-not-recompute.yaml | Adds negative fixture for declared-key-fingerprint-mismatch. |
| contracts/openxwallet/examples/negative/exercise-tier-above-the-presenting-key-ceiling.yaml | Adds negative fixture for presenting-key-evidence-cap. |
| contracts/openxwallet/examples/negative/exercise-single-key-custody-not-the-wallets.yaml | Adds single-key regression-proof fixture for custody-model-mismatch still firing. |
| contracts/openxwallet/examples/negative/exercise-presenting-key-outside-the-declared-set.yaml | Adds negative fixture for presenting-key-unresolved against the declared set boundary. |
| contracts/openxwallet/examples/negative/exercise-permitted-under-a-retired-declared-key.yaml | Adds negative fixture for refusing permitted exercise under a retired key (revoked-chain-exercised). |
| contracts/openxwallet/examples/negative/exercise-custody-of-another-key-of-the-same-wallet.yaml | Adds negative fixture for custody basis being the signing key’s custody (not just “some wallet custody”). |
| contracts/openxwallet/examples/grant-council-unsupervised-tier.example.yaml | Adds packaged positive grant at top tier to the multi-key wallet (holdable, not necessarily exercisable by every key). |
| contracts/openxwallet/examples/grant-council-act-tier.example.yaml | Adds packaged positive act-tier grant to the multi-key wallet. |
| contracts/openxwallet/examples/exercise-presented-by-an-additional-key.example.yaml | Adds packaged positive exercise presented by a non-primary declared key. |
| contracts/manifest.yaml | Updates bundle version to wallet-v1.3 and updates the openxwallet-record digest + schema_version mirror. |
| contracts/CHANGELOG.md | Adds the wallet-v1.3 release entry documenting schema/validator/corpus changes and invariants. |
| AGENTS.md | Updates the Active Speckit Feature block to point at feature 015 and records ratification/merge status. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| archive = subprocess.run( | ||
| ["git", "archive", ref, "contracts"], | ||
| capture_output=True, cwd=REPO_ROOT) | ||
| if archive.returncode != 0: # pragma: no cover | ||
| return None | ||
| subprocess.run(["tar", "-x", "-C", str(shadow)], | ||
| input=archive.stdout, check=True) |
| result = _run(_tree(tmp_path / "t", wallet, grant, exercise), "--strict") | ||
| assert "presenting-key-evidence-cap" not in _tree_codes(result.stdout), \ | ||
| result.stdout |



Realizes
add-multi-key-wallets(ratified 2026-08-28 by Brett Heap's in-session ruling "rule option 1 and build it", merged as PR #7) through Speckit featurespecs/015-multi-key-wallets/.Release class
ADDITIVE MINOR, and the first wallet release since the carve in which a digested contract byte MOVES. Exactly one of the eight:
openxwallet-record.schema.yaml2012ef43…→20ba39c0…A consumer bumps
commit:,contract_bundle_tag:and that onefiles:row. Nothing a consumer declares today becomes invalid.What it does
keys:— an OPTIONAL list of ADDITIONAL declared keys besidekey_reference. The declared set is their union, so a record omitting it declares a set of one and takes the code path it took before: backward compatibility by construction, not by a branch.custody-model-mismatchkeeps its code, compares against the custody of the key that SIGNED — where signing means a VERIFIED proof named it, because the existing fallback reads the record's own unverified attribution block.presenting-key-evidence-capcaps a grant's tier by the signing key's ceiling, guarded onpermittedso a truthfulcustody_ceiling_exceededrefusal stays recordable.declared-key-raises-authority— keys never multiply authority.public_key_multibasewhere declared —did:key's own encoding decodes to the same 32 bytes every other surface fingerprints, so the join token is proven rather than decorative.Codes
Four new ERROR codes, zero new warnings (LedgerxFactory runs
--strict).custody-model-unknownandrevoked-chain-exercisedtake new subjects rather than new names. One harness-only code,examples-invalid, refuses a colliding packaged key id and can never fire on a consumer's tree.The regression the corpus could not have caught
custody-model-mismatchshipped unprobed — no packaged negative pinned it — so moving its basis could have deleted the check silently for the entire estate.negative/exercise-single-key-custody-not-the-wallets.yamlis that proof. All nine new negatives are named probes in the validator and in the suite, because every new invariant attributes to a requirement other fixtures already cover.test_the_previous_version_adjudicates_the_corpus_identicallyflipped direction and records why: a reader cannot adjudicate a tree whose rules it lacks, so the comparison is now THIS reader over the recovered PREVIOUS corpus, harness codes excluded.Bar
verify-contract-pin.pyOK · syntax gate OK · validator plain and--strict0 errors 0 warnings ·pytest tests/ -q90 passed ·openspec validate --all --strict5 passed.After merge
Tag
wallet-v1.3at the merge sha (after re-proving the bar at that head), then openxFactory's pin + the four declared seat keys.wallet-v1.3.digests.yamlremains the operator act it has been sincewallet-v1.0.🤖 Generated with Claude Code