Skip to content

integrations: xChk registry (TRACE record-producer, Level 0; sealed receipts as external evidence) - #337

Closed
minitru wants to merge 4 commits into
agentrust-io:mainfrom
minitru:xchk-registry
Closed

minitru wants to merge 4 commits into
agentrust-io:mainfrom
minitru:xchk-registry

Conversation

@minitru

@minitru minitru commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

An xChk registry licenses AI agents under a verified person and seals a record of each gated act, with the person's own passkey assertion on the acts they answered. This listing is the relying party's side of the xchk-sealed-receipts crosswalk (agentrust-io/trace-spec#560, open): verify the registry's Trust Record with released agentrust-trace, resolve each approval-outcome reference at the registry's public receipt endpoint, recompute the digest with rfc8785, run the registry's standard-library verifier on the bundle, and report one verdict per reference in the crosswalk's vocabulary.

Roles: record-producer (the registry mints and signs a software-only Level 0 Trust Record per run) and external-evidence-source (the sealed receipt is the registry's own evidence in its own format). The code here issues nothing; it resolves, recomputes and reports.

Fixtures are from a live run: the approval as served, and the same person's assertion over a different ask placed in it, with every key and signature genuine and only the challenge the device signed telling them apart. tests/ recomputes both verdicts from the committed bytes; the live resolution test is opt-in so CI never depends on the registry's uptime. trace-tests verify --level 0 on the committed record: PASS, 15 checks.

Links are to in.xchk.io (the receipt endpoint, the published keys, the served verifier) and to trace-spec; the registry's server code is not public and the README says so. One line of positioning; no comparisons. Index and Marketplace catalog regenerated; a per-integration workflow (floating and fixed modes) is included.

Verified tier requested. Reproduction, from a clean checkout:

pip install -e "integrations/xchk-registry[test]" agentrust-trace-tests
pytest integrations/xchk-registry/tests -q                           # 6 pass, 1 skipped (live, opt-in)
REGISTRY_LIVE=1 pytest integrations/xchk-registry/tests -q -k live   # resolves the reference at in.xchk.io
trace-tests verify --record integrations/xchk-registry/examples/01-approval-confirmed.json --level 0

Dependency on trace-spec#560: none for merging; the README links that PR as the crosswalk's home and I will update the link if it lands under another path.

🤖 Generated with Claude Code

…eceipts as external evidence)

An xChk registry licenses AI agents under a verified person and seals a record of each gated act, with the person's own passkey assertion on the acts they answered. This listing is the relying party's side of the xchk-sealed-receipts crosswalk (trace-spec#560): verify the registry's Trust Record with released agentrust-trace, resolve each approval-outcome reference at the registry's public receipt endpoint, recompute the digest with rfc8785, and run the registry's standard-library verifier on the bundle; report one verdict per reference in the crosswalk's vocabulary.

Fixtures from a live run (ENG-WNP3 run 3057): the approval as served, and the same person's assertion over another ask placed in it, told apart only by the challenge the device signed. Tests recompute both verdicts from the committed bytes; the live resolution is opt-in. Conformance: trace-tests verify, Level 0, PASS (15 checks). Index and Marketplace catalog regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: minitru <bbunix@gmail.com>
@minitru
minitru requested review from a team, carloshvp and imran-siddique as code owners October 17, 2026 19:33

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the runnable offline fixtures. Reviewed exact head 40128ef5840c2a0ef13527dd1cb7d27fd1e0ddef in an isolated checkout. Requesting changes for the advertised Python 3.11 support and existing repository lint failures detailed inline.

Local integration results: Python 3.11.17 had 2 failures and 4 passes; Python 3.12.15 and 3.13.16 each passed all 6 offline tests. The opt-in live test was skipped in each environment. Schema, compatibility, generated index/catalog and diff checks passed. These are local results, not a claim that the pending hosted matrix ran or that Verified-tier eligibility is established.

Additional verification findings require private follow-up under SECURITY.md; details are omitted here.

keys = pinned_keys(rs)
if seal and (rs.get("signature") or rs.get("signatures")) and keys:
pending += registry_verify(ok, rs, seal["sealHash"].encode("utf-8"), keys, "registry signature over the seal hash")
print(f" .. keys pinned in the bundle: {', '.join(f'{k.get('alg')}/{k.get('keyId')}' for k in keys)}; confirm at {rs.get('wellKnown')} when online")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This f-string reuses the enclosing quote character inside its expression, which requires Python 3.12+. pyproject.toml declares Python >=3.11 and the workflow includes 3.11, but the verifier raises SyntaxError on Python 3.11.17. The positive-fixture and offline-CLI tests consequently fail there.

Please compute the joined key descriptions separately (or otherwise use 3.11-compatible formatting) and rerun the integration tests on 3.11. The same tests pass on 3.12 and 3.13.

def byte(self) -> int:
if self.i >= len(self.b):
raise ValueError("ots: truncated")
v = self.b[self.i]; self.i += 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing repository lint gate also applies to this vendored file. With the hash-pinned Ruff 0.16.9, its command reports six E702 errors at lines 399, 405, 411, 445, 452 and 457, plus two syntax diagnostics at line 566:

ruff check integrations packages scripts tests claude-code copilot plugins scheduled-agents shadow-ai --target-version py39 --select E4,E7,E9,F

Please split these semicolon-separated statements onto separate lines and rerun that command. If the vendored copy is changed locally, please also update NOTICE's "vendored unchanged" wording to reflect the compatibility edits.

minitru and others added 3 commits October 17, 2026 19:09
…key, never its own

The adapter fell back to the key embedded in the record when none was pinned, and a test asserted that passed. A record verified against its own cnf.jwk is self-consistent, not verified: any self-signed record passes that, which the spec names as the operator-forgeable case. Now the key comes from --jwk, or from the record's resolver's published keys under the record's kid; the embedded key is used only with --allow-embedded-key and reported as self-consistent with a non-zero exit. Tests cover all three sources and a tampered record; the live test also checks the published key document.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: minitru <bbunix@gmail.com>
… E702 clean)

Signed-off-by: minitru <bbunix@gmail.com>
… the repository's rule set

Signed-off-by: minitru <bbunix@gmail.com>

@noah-ing noah-ing left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head 854aa577f21e90ba15c9aa2a5a48d4740dcf9bf9. The earlier Python 3.11 syntax and Ruff failures are resolved: the offline suite passed on Python 3.11.14 (8 passed, 1 skipped), Ruff 0.16.9 passed, and the vendored verifier matched the served copy. Local Level 0 conformance and the opt-in live test also passed. The hosted workflows still require maintainer approval to run, so these local results are not a hosted-matrix or Verified-tier signoff.

Requesting changes for the public correctness and attribution issues inline. Evidence-verification concerns remain in the repository's existing private SECURITY.md advisory; please have maintainers resolve that report before merge. I have omitted its details here.

same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2026 OntoGuard AI

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filled-in Apache Appendix credits OntoGuard AI, while this integration's NOTICE credits Sean MacGuire. Please correct the holder (or retain the unfilled Apache template) so the distributed license does not attribute xChk's code to an unrelated party.

description: >-
A Trust Record per run from an agent-licensing registry, each approval-outcome
reference resolving to a sealed receipt that verifies offline down to the
approver's passkey assertion over the ask.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This public Marketplace description says each referenced receipt verifies down to a passkey assertion over the ask. The integration also supports expired/no-answer outcomes with no assertion, and its README says pre-18 October ceremonies used a nonce rather than an ask-derived challenge. Please qualify the claim to the answered, newer ceremonies; the current wording overstates what valid supported receipts prove.

refs = [r for r in record.get("references", []) if r.get("rel") == "approval-outcome"]
local = json.loads(Path(a.bundle).read_text(encoding="utf-8")) if a.bundle else None
for ref in refs:
bundle = local if local is not None else fetch_bundle(ref["resolver"], ref["id"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--bundle supplies one JSON bundle but this branch applies it to every approval-outcome reference. A run can contain multiple asked acts, so every later reference gets a digest mismatch and approval-contradicted even when its own bundle was never supplied. Please reject --bundle unless there is exactly one approval reference, or accept bundles keyed by reference ID.

if bundle is None:
return {"reference": reference["id"], "resolves": False, "digest_matches": None, "bundle_verifies": None,
"disposition": None, "verdict": "approval-unconfirmed"}
digest_matches = jcs_sha256(bundle["record"]) == reference["digest"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A resolver can return valid JSON without a record field. This indexing then raises KeyError, aborting the CLI before it reports a verdict for this or any remaining references. Please validate the bundle shape and return a per-reference failure result instead of terminating the whole run.

Copy link
Copy Markdown
Collaborator

Thanks for addressing the Python 3.11 and lint feedback. After re-reviewing the current head, we're closing this PR in its current form. The evidence-verification concerns being handled through the repository's private security process remain unresolved, and the public correctness, claim, and attribution issues are documented in the current-head review. The 2,195 added lines span verifier code, fixtures, workflow, and catalog, making continued iteration on the requested Verified tier in one PR difficult to review responsibly.

Please coordinate the private findings with maintainers before resubmitting. A narrower PR could establish the TRACE record integration and carefully bounded claims first; a separate follow-up could bring the receipt verifier and focused regression tests once its trust boundaries are settled. We can review each submission on its own merits. Security details are intentionally omitted here.

@minitru

minitru commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Understood, and thank you for two careful rounds; every public point is fixed on the branch. I have resubmitted in the two parts you describe: the TRACE record integration with bounded claims first (#338), the receipt verifier and its regression tests separately once the private findings are settled. On those: I am the registry's operator and the only person who can change what the evidence shows, so if a maintainer can add me as a collaborator on the advisory, I will answer it there.

minitru added a commit to minitru/integrations that referenced this pull request Oct 19, 2026
…erifier, moved here from trace-spec#560 (19 Oct 2026)

A crosswalk for one registry's receipts belongs with that registry's integration (maintainers, trace-spec#560). This is the replacement for the part of closed agentrust-io#337 that agentrust-io#338 left out, stacked on agentrust-io#338.

- CROSSWALK.md: field mapping, verifier obligations, boundary; two verifier rules added — the signed ask must name the ceremony the sealed record and the registry-signed binding commit to, and absence of failure is not confirmation (--require-approval).
- examples/approval-outcome/: the eight records and seven bundles from #560, README, expected.json.
- verify_receipt.py: the registry's offline verifier, vendored as served (MIT, in NOTICE), current version.
- tests: the fixture test reworked (finite explicit age bound; the approval verdict requires the approval evidence to have been present and checked; mutations for missing evidence, a same-credential cross-ceremony assertion, unsigned outer labels) and the verifier's own regressions.
- NOTICE, README (adopter line folded in; what is deliberately not here), pyproject test extras.

Not in this change: a packaged relying-party verdict; under the repository's private assessment, follows here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
minitru added a commit to minitru/integrations that referenced this pull request Oct 19, 2026
…erifier, moved here from trace-spec#560 (19 Oct 2026)

A crosswalk for one registry's receipts belongs with that registry's integration (maintainers, trace-spec#560). This is the replacement for the part of closed agentrust-io#337 that agentrust-io#338 left out, stacked on agentrust-io#338.

- CROSSWALK.md: field mapping, verifier obligations, boundary; two verifier rules added — the signed ask must name the ceremony the sealed record and the registry-signed binding commit to, and absence of failure is not confirmation (--require-approval).
- examples/approval-outcome/: the eight records and seven bundles from #560, README, expected.json.
- verify_receipt.py: the registry's offline verifier, vendored as served (MIT, in NOTICE), current version.
- tests: the fixture test reworked (finite explicit age bound; the approval verdict requires the approval evidence to have been present and checked; mutations for missing evidence, a same-credential cross-ceremony assertion, unsigned outer labels) and the verifier's own regressions.
- NOTICE, README (adopter line folded in; what is deliberately not here), pyproject test extras.

Not in this change: a packaged relying-party verdict; under the repository's private assessment, follows here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
imran-siddique pushed a commit that referenced this pull request Nov 16, 2026
…d receipt verifier (from trace-spec#560; stacked on #338) (#350)

* xchk-registry: the approval-outcome crosswalk, fixtures and receipt verifier, moved here from trace-spec#560 (19 Oct 2026)

A crosswalk for one registry's receipts belongs with that registry's integration (maintainers, trace-spec#560). This is the replacement for the part of closed #337 that #338 left out, stacked on #338.

- CROSSWALK.md: field mapping, verifier obligations, boundary; two verifier rules added — the signed ask must name the ceremony the sealed record and the registry-signed binding commit to, and absence of failure is not confirmation (--require-approval).
- examples/approval-outcome/: the eight records and seven bundles from #560, README, expected.json.
- verify_receipt.py: the registry's offline verifier, vendored as served (MIT, in NOTICE), current version.
- tests: the fixture test reworked (finite explicit age bound; the approval verdict requires the approval evidence to have been present and checked; mutations for missing evidence, a same-credential cross-ceremony assertion, unsigned outer labels) and the verifier's own regressions.
- NOTICE, README (adopter line folded in; what is deliberately not here), pyproject test extras.

Not in this change: a packaged relying-party verdict; under the repository's private assessment, follows here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* xchk-registry: an amendment is what the sealed record commits to; the fixture verdict reads the verifier's structured result (19 Oct 2026)

The amended case was inconsistent: the fixture test selected approval-confirmed-as-amended from the presence of the
outer decision.amendment.command, the README said that command is what the person approved, and the cross-walk said
the verifier does not authenticate amendment scope. Reconciled on what the bundle carries:

- verify_receipt.py (as the registry serves it): when decision.amendment.command is present, record.paramsHash must
  equal sha256 over the canonical action binding the registry hashed for the amended act, and that binding's command
  must be the amended command (first 2000 UTF-16 units). The registry serves the binding as amendment.boundAs, since
  the record's tool and summary are capped, trimmed copies; without it the binding is rebuilt from the record (exact
  under the 400-char cap, as for 07). When decision.actionParamsHash is present, amendment.originalParamsHash must
  equal it. Any failure contradicts the approval. --json gives a structured report (the checks that ran, the pending
  count, the approval evidence still missing, amendment.committed, and boundIdentity: the person and proofing level
  from the registry-signed binding only, with a transcript note when the readable labels differ). A bundle with wrong field types ends in a failed
  check, never a traceback (type-mutation sweep over every field of three bundles: 14,625 mutations, 0 crashes).
- tests/test_approval_outcome_fixtures.py: _assess runs the verifier with --json and takes `amended` from
  report.amendment.committed, never from the bundle text; the commitment is recomputed independently with rfc8785.
  New: an amendment typed into 01 after issue, and 07 with its amended command or originalParamsHash edited or
  removed, are approval-contradicted; 07 as committed is as amended. 08 with its challenge removed is pinned at
  approval-unverified (never confirmed); a relabelled bundle reports the bound identity.
- tests/test_verify_receipt_regressions.py: the same mutations through the verifier, a served preimage that is
  wrong or beside an edited command, a long untrimmed summary, an ask with no digest, malformed types.
- README and CROSSWALK: 07's row and paragraph say what makes it an approval with changes; step 5 states the
  checks; the boundary says what is NOT established: the person signed the ask as proposed and the amended text is
  committed by the registry's seal; an amendment removed from a bundle leaves a plain approval that verifies; the
  unamended record.paramsHash and the signed actionParamsHash are unrelated digests here. The cross-walk's link to
  the fixture test now resolves.

pytest integrations/xchk-registry/tests: 69 passed, 1 skipped (3.11); ruff --target-version py39 --select
E4,E7,E9,F clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* xchk-registry: CodeQL clear-text-logging alert; a pinned private key is refused; an amendment on a record that seals no digest is pending, not a failure (19 Oct 2026)

CodeQL (py/clear-text-logging-sensitive-data, security-extended) flagged the CLI's final print. Its "secret" heuristic
matches any name containing "trusted", and two such names reached the printed verdict: the library result's
trusted_key_thumbprint attribute and this module's trusted_origin() function. One is the RFC 7638 thumbprint of a
PUBLIC key; the other is the https origin the caller passed with --registry. Neither is secret. Changes:

- verification(): the thumbprint is now computed with the library's own jwk_thumbprint() over the key verified with
  (present in agentrust-trace 0.11.0, the floor). A test asserts it equals the library result's thumbprint.
- trusted_origin() is renamed anchor_origin(), for the origin the relying party anchors trust in. Output field names
  are unchanged (trusted_origin, trusted_key_thumbprint).
- Real hardening found while tracing the flow: a pinned key file carrying the private member d is refused with
  fixed text ("pin the public key only") and nothing of it is echoed; a key file that does not decode is reported by
  error class only (a decode error's message can quote bytes of the file).
- A scan of both modules' identifiers against CodeQL's secret and password name rules leaves one match,
  urlsplit().password, used only in an "is not None" refusal.

Verifier (as the registry serves it, byte-identical): a ceremony record sealed before 19 Sep 2026 carries no
paramsHash, so its seal commits to no command. An amendment there was failed; four genuine September receipts on
the registry failed this way. It is now a pending step, not checkable, never confirmed. CROSSWALK step 5 says so;
regression from 07 with paramsHash removed.

pytest integrations/xchk-registry/tests: 73 passed, 1 skipped (3.11); ruff --target-version py39 --select
E4,E7,E9,F clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* xchk-registry CROSSWALK: the TRACE spec link at the top points at the public specification, not a path that does not exist from this directory (19 Oct 2026)

Review of #350 (dinakarjs, 15:03Z) named it; the same review's second broken link was fixed in 7eb34f3 and this one was
missed. lychee, with the repository's own arguments, over integrations/xchk-registry: 20 OK, 0 errors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: verifier obligations 5-6, the conformance-fixture description and the 07 README aligned with the boundary: decision.amendment is informational, its scope not yet authenticated (19 Oct 2026)

Review of #350 (dinakarjs, 15:03Z), second correction, as written: the obligations no longer tell a reader to treat
the amendment's command as the approved or executed comparison target. Step 5 says decision.amendment is informational
and a relying party must not let it widen or narrow the approval; step 6 compares the executed call with
record.paramsHash only. The verifier's amendment checks are described as what they are, a refusal of an amendment the
sealed record does not commit to, which does not authenticate scope. The 07 fixture's label, "approval confirmed, as
amended", is described as a worked example under the stated limitations until the private assessment settles the
relying-party contract. The boundary bullet returns to its statement: informational, not yet authenticated, under
separate assessment, the one open item; its further limits are kept as limits. No code change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: strict approval also requires the seal chain; an approval without it is approval-unsealed, never confirmed (20 Oct 2026)

Review of #350 at 9b1622e (noah-ing): with the approval evidence intact, removing only the seal, only the Merkle proof,
both, or only the registry's seal signature still let `verify_receipt.py --require-approval` exit 0 and the fixture
verdict return approval-confirmed. Approval evidence present does not make the receipt sealed.

- verify_receipt.py (byte-identical to the copy the registry serves): `sealChainMissing` in the --json report names
  the missing part (the seal, the Merkle path from the record to it, the registry's signature over it);
  --require-approval exits 3 when it is non-empty, result `seal-chain-incomplete`, kept apart from
  `approval-evidence-missing` (whose wording is unchanged). The default run is unchanged.
- Fixture verdict: approved, approval evidence present, seal chain incomplete -> `approval-unsealed`, distinct from
  `approval-unverified` and from `approval-confirmed`.
- Tests: the four deletion mutations as negative regressions, both at the verifier and through the fixture verdict;
  the sealed control still confirms.
- CROSSWALK: the "absence of failure is not confirmation" rule now states the seal-chain half.

Rebased on main after #338 merged (main's #338 tree is identical to the base this was built on). pytest
integrations/xchk-registry/tests: 78 passed, 1 skipped (3.11); ruff --target-version py39 --select E4,E7,E9,F clean;
lychee over the directory 0 errors; type-mutation sweep 14,625 mutations, 0 crashes; every earlier review-matrix row
keeps its verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* xchk-registry: no approval verdict from a Trust Record that does not verify; the vendored verifier checks the decision's citation

The fixture's verdict helper computed trace_record_verifies and reported it, but never let it decide the verdict, so a
record with one signed field changed still reached approval-confirmed through its intact bundle (review of #350 at
b43b884). A record that does not verify is now record-invalid before any bundle is read, with or without one, and the
crosswalk's step 1 says so: nothing an invalid record carries, the reference included, is evidence.

The vendored verify_receipt.py is the served one again (byte-identical to https://in.xchk.io/verify/verify_receipt.py):
section 5b, the decision block must cite the sealed record's attestationHash.

Tests: intact-versus-tampered regression (and the same record with no bundle); a decision citing another ceremony's
record is refused. 80 passed, 1 live test skipped (py3.11); CI's ruff selection clean; lychee 0 errors. Replayed: the
seal-chain sweep (every deletion refused in strict mode, control passes), all 128 single-field changes to the 8 fixture
records end record-invalid, the verifier's contract and golden-corpus tests (73 passed), and the 16 live receipts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* xchk-registry: a decision block must cite the sealed record, and an amendment is committed only when its citation was checked (20 Oct 2026, private review of #350).

Section 5b compared decision.attestationHash with the record's only when it was present, so a decision block with the
citation removed skipped the check and the fixture verdict stayed approval-confirmed. Every ceremony record the registry
has written since the ledger began (7 Aug 2026) carries the attestation hash, sealed before the record is appended, and
every decision block it issues cites it: a decision block without the citation was never issued, and it is refused.
Same class, found by looking for it: in 5c, without decision.actionParamsHash the amendment's citation leg defaulted to
'cites' and the report said committed. Now the citation is pending (amendment.citesAsk null), the amendment is not
committed, and --require-approval refuses; the fixture assessor already ran strict mode before reading 'committed', so
no fixture verdict changed. The verifier is the served one again (identical file); the crosswalk's step 4 names the
citation check; regressions cover removed, null and empty citation, default and strict, and the digest removed with
and without the challenge. 82 passed, 1 skipped; ruff clean; lychee 0 errors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: a hybrid signature must be whole, a failed report names nobody, UTF-8 whatever the console, and the evidence contract with every guard pinned by its FAIL line (2 Nov 2026; review by rajnisht7 and drk-ram).

- registry_verify requires every signature the receipt's signed fields name (the sealed profile's signing dial, else the seal's windowStart against the 24 Sep 2026 switch to hybrid); a missing half is a failed check. The alg label and the key list are unsigned and are not consulted.
- boundIdentity and amendment are null whenever the exit is not 0.
- stdout is UTF-8 from the first line: under a cp1252 console the verifier exited 1 with a UnicodeEncodeError, the exit of a failed check.
- verdict-contract.json and its test, which generated the xchk-app regressions since 20 Oct, now live beside the verifier here; every row names the FAIL line it expects.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: round two from the independent review of round one (2 Nov 2026). A required signature half that cannot be checked here is a strict-mode refusal, not a pass; the identity binding reads its own signed mode when the registry writes one; `withheld` names the fields a failed report leaves null; the verifier is the xchk-app owner byte for byte; the anchor chain, the --artifact check and the profile dial get tests.

- Without dilithium-py the ML-DSA slot is a WAIT, and a required WAIT counted as present: garbage in that slot passed even --require-approval. Now `--require-approval` refuses (exit 3) and names the half in sealChainMissing (seal, profile) or approvalEvidenceMissing (binding); the default run stays a WAIT like every unverifiable step. With dilithium-py present the same garbage fails.
- A binding is signed when the bundle is fetched, under the registry's mode then, so a seal from before 24 Sep 2026 carries a hybrid binding and the seal's date cannot require the binding's second half. The verifier reads a signed `signing` field inside binding.fields when present (registry change to follow); until then the seal's set is the proxy, and CROSSWALK says how far that reaches.
- `withheld: ["boundIdentity", "amendment"]` accompanies the nulls on every non-zero exit, so absent and withheld read apart.
- This copy had lacked the 22 Oct batched-anchor change of the owner; it is now identical to verify/verify_receipt.py in xchk-app (sha256 of both files equal), and the FAIL line for a bad signature says "DOES NOT verify".
- Tests: the pure required_algs / binding_required rules, an edited dial does not relax the requirement, the uncheckable half under a stubbed ML-DSA, withheld, the --artifact check. The contract's two binding rows pin whole lines. A guard-mutation sweep (each ok() condition replaced by True) found, on round one, the artifact check, the identity-provider guard and the five anchor-chain guards unpinned; fixture 01 carries no anchor proof and no IdP block, so those two groups remain unpinned here and are named rather than claimed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: the tests require dilithium-py and say so (2 Nov 2026). Since e7b3283 a required ML-DSA-65 half that cannot be checked is a strict-mode refusal, not a pass, so a test environment without the post-quantum verifier fails 13 tests for the wrong reason. dilithium-py joins the [test] extra the CI installs, tests/conftest.py stops before the first test with the reason and the install line, and the README says so.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: the registry's keys are pinned by the relying party, not declared by the bundle (2 Nov 2026; review of #350 by drk-ram).

He re-signed fixture 01 under his own Ed25519 and ML-DSA-65 keys, rewrote the pinned key list and the root statement's list to match, and --require-approval still exited 0 while the assessor said approval-confirmed: every key the verifier checks with is the one the bundle carries, so every check proved consistency under the bundle's own keys. CROSSWALK step 4 said as much; the verdict name said more.

- verify_receipt.py (vendored, as the registry now serves it): --keys xchk-keys.json, the registry's key document saved once from /.well-known/xchk-keys.json. Every key the bundle pins must be in it, active or retired, by alg, keyId and raw key, and the bundle's root key must be the document's root; an unlisted or revoked key is a FAIL that names the key. A document that cannot be read is exit 2. The --json report carries keyDocument (null when none was supplied, else {registry, servedAt, allPinned}). Without --keys the verdict is unchanged and the transcript says the keys were checked against themselves only.
- The assessor pins the registry's key document (examples/approval-outcome/xchk-keys/, as served on 2 Nov 2026) and runs the verifier with --keys; a bundle whose keys are not in it, or a relying party that pinned none, gets approval-consistent-key-not-pinned, never approval-confirmed. Outcome field registry_keys_pinned added.
- Fixture 09: 01 re-signed under keys that are not the registry's (tests/rekey_fixture.py rebuilds it; cryptography + dilithium-py). Its Trust Record is 01's. Its line in expected.json, and registry_keys_pinned on every case, were written by hand: the generator runs on the registry and was not re-run.
- verdict-contract.json: three rows that run with --keys, each pinned by its FAIL line; byte-identical to xchk-app's verify/verdict-contract.json.
- CROSSWALK.md, README.md and the fixtures README say what confirmed now means and what consistent means.

Rebased onto round two (d0c0f38); the vendored verify_receipt.py stays the xchk-app owner byte for byte (71b2fd9ea there). Tests: see the next line. Companion change in xchk-app (verify/verify_receipt.py, verify-receipt.html, examples/agt-xchk-adapter/verify_receipt.py), same date.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

Tests after the rebase: 151 passed, 1 skipped in 133.79s (0:02:13), with dilithium-py; ruff (E4,E7,E9,F, py39) clean.

* xchk-registry: key pinning, fixes from its independent review (2 Nov 2026).

- verify_receipt.py (still the xchk-app owner byte for byte): a revoked key is refused however the document says it (the `revoked` list, a `revokedAt`, or a `status` other than active or retired left in place in `keys`), and a revoked entry published without its public key, as the registry serves them, is matched by alg and key id, so a revocation never reads as "never published". The right key id under a different public key fails by that reason. A bundle carrying a root key when the document publishes none is a failed check, not a skipped one, and allPinned is false on a root-only mismatch. A document whose entries are not keys is unreadable (exit 2); a copy saved with a byte-order mark loads.
- Stated as limits, in CROSSWALK.md and the fixtures README: a retired key's notBefore/notAfter are not compared with the seal's time; the document's `registry` is never compared with the bundle's `wellKnown` (only key material decides); a bundle that pins no key leaves allPinned null.
- Assessor: a pinned document the verifier cannot read is an assertion error naming the document, not a TypeError.
- expected.json: case 09 in the generator's field order. The fixtureNote in 09 and in rekey_fixture.py is the same text in both repositories and names no path.
- Tests: the three revocation shapes, the different-key case, the root-only mismatch and the missing root, the BOM and non-key document shapes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: the seven anchor-chain guards of the receipt verifier get a real anchored receipt to pin them (2 Nov 2026).

A guard-mutation sweep (each ok( condition replaced by True, then the suite) found the whole Ravencoin and
OpenTimestamps anchor chain unpinned: the manifest path to the anchored root, the OP_RETURN carrying that root,
sha256d(tx) = txid, the merkleblock header against the shipped header, the partial Merkle tree, and the 32-byte
OTS root. No fixture carried anchor.proof: the 17 Oct cases predate the registry's batched anchoring (22 Oct).

examples/approval-outcome/anchored.bundle.json is a receipt approved by the same person on 29 Oct 2026, fetched
from the registry's bundle endpoint on 2 Nov 2026 exactly as served: a batched anchor with a 5-step manifest path
(1 of 32 seals), the raw transaction, header and merkleblock, and an OTS proof upgraded to Bitcoin block 973698.
It is not a crosswalk case and expected.json does not list it (the fixtures test globs 0*.json).

A contract row may now name its own fixture; seven rows do, one per guard, each pinned by its FAIL line. Three
need an op because a middle-character swap lands on a neighbour: the OP_RETURN root inside the transaction, the
first branch hash of the merkleblock (its header is 120 bytes), and the final sha256 of the OTS proof retagged as
sha1. verdict-contract.json, the fixture and verify_receipt.py are the xchk-app owner byte for byte.

Not pinned by this: the unbatched OP_RETURN seal-hash branch (no unbatched receipt carries anchor.proof) and the
identity-provider guard, the sweep's expected survivor.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: the identity-provider guard is pinned on the anchored fixture (2 Nov 2026).

The guard-mutation sweep's last expected survivor was the check that approver.identity (the readable copy) equals
the identity-provider trio inside the registry-signed binding. anchored.bundle.json carries it: the receipt was
approved while Entra vouched for the approver, so its binding names identityProvider, tenantId and subjectId. Two
contract rows tamper approver.identity.subjectId and .tenantId on it, each pinned by the guard's FAIL line, and
the strict-mode test asserts the guard ran OK on the fixture. With the guard's condition replaced by True exactly
those two tests fail; restored, 165 passed, 1 skipped (was 155 at 9feb3c2, 163 with the anchor rows).

Still unpinned, stated: the unbatched OP_RETURN seal-hash branch. Every receipt the registry serves that carries
anchor.proof is batched (the 17 Oct cases were re-anchored into the 22 Oct batch), so no genuine unbatched fixture
exists to commit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: the unbatched OP_RETURN guard of the receipt verifier gets a real unbatched receipt to pin it (3 Nov 2026; review of #350 by drk-ram).

anchored.bundle.json pins the batched anchor only. An unbatched anchor carries the seal hash itself in the
transaction, so the verifier checks "the raw anchor transaction's OP_RETURN carries this seal hash" instead of
walking a manifest path, and no fixture reached that branch.

examples/approval-outcome/anchored-unbatched.bundle.json is an allow record anchored on 10 Aug 2026, fetched from
the registry's bundle endpoint on 3 Nov 2026 as served. Every unbatched receipt with a captured raw transaction
was anchored 8-10 Aug 2026, before bundles carried the passkey assertion and the ask-v1 challenge, so strict mode
refuses any of them by design (exit 3, nothing failed). verdict-contract.json lists such a fixture under
defaultModeFixtures with the reason. The genuine-receipt test (renamed test_the_genuine_receipt_passes) runs it in
the default mode, with and without --keys, asserts the guard's OK line, and asserts strict mode refuses it with
exit 3, not 1. One tamper row reuses corrupt-op-return-root and is pinned by the FAIL line. With the condition
replaced by True the row fails. The run still exits 1, because altering the committed hash also breaks sha256d,
so only the FAIL line pins it.

verify_receipt.py is unchanged; it and verdict-contract.json stay the xchk-app owner byte for byte. 167 passed,
1 skipped (opt-in live); ruff --target-version py39 --select E4,E7,E9,F clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* xchk-registry: a revocation in the key document wins over an active entry for the same key (9 Nov 2026; private review of #350).

With --keys, a document that still listed a pinned key under keys and also revoked it, with or without the raw public
key on the revoked entry, pinned the key: the exact active match was taken before the revocation was consulted, so the
receipt verified, allPinned read true and boundIdentity was reported as registry-signed. Now any revocation of a pinned
key, however the document states it, fails the check by name, and a document that says both is named as contradicting
itself. Regression covers both variants and a status-revoked entry beside a retired twin. The verifier stays
byte-identical to its owner, xchk-app verify/verify_receipt.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* xchk-registry: a revocation denies the key identity whatever bytes it carries; one keyId under two public keys is refused (9 Nov 2026; private review of #350, second case).

The revocation match took only an exact raw-key match or a raw-less entry, so a revoked entry for the same alg and
keyId with different public key bytes was not a candidate and the active entry pinned. Now any revocation of the
(alg, keyId) identity wins, and a document that maps one keyId to two public keys is refused as contradictory before
any pin: keyId is sha256(spki)[:16], so two keys under one id is never a registry publication. Regression adds the
different-bytes revocation and the two-keys-no-revocation document. Byte-identical to the owner copy in xchk-app.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <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.

2 participants