continuity-receipt 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/CHANGELOG.md +27 -0
  2. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/CONFORMANCE.md +14 -7
  3. {continuity_receipt-0.3.2/continuity_receipt.egg-info → continuity_receipt-0.3.3}/PKG-INFO +11 -10
  4. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/README.md +10 -9
  5. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/ROADMAP.md +6 -3
  6. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/SPEC.md +1 -1
  7. continuity_receipt-0.3.3/VERIFICATION_RECEIPTS.md +230 -0
  8. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/_version.py +1 -1
  9. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/verification.py +147 -27
  10. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3/continuity_receipt.egg-info}/PKG-INFO +11 -10
  11. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt.egg-info/SOURCES.txt +7 -0
  12. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/pyproject.toml +1 -1
  13. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/schema/verification-receipt-1.schema.json +32 -1
  14. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_verification_receipts.py +81 -11
  15. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tools/make_verification_vectors.py +85 -25
  16. continuity_receipt-0.3.3/vectors/verification/01_valid.json +35 -0
  17. continuity_receipt-0.3.3/vectors/verification/02_tampered_signature.json +35 -0
  18. continuity_receipt-0.3.3/vectors/verification/03_tampered_verdict.json +35 -0
  19. continuity_receipt-0.3.3/vectors/verification/04_wrong_bundle.json +35 -0
  20. continuity_receipt-0.3.3/vectors/verification/05_bad_kind.json +35 -0
  21. continuity_receipt-0.3.3/vectors/verification/06_bad_version.json +35 -0
  22. continuity_receipt-0.3.3/vectors/verification/07_bad_verdict.json +35 -0
  23. continuity_receipt-0.3.3/vectors/verification/08_bad_verified_at.json +35 -0
  24. continuity_receipt-0.3.3/vectors/verification/09_missing_sig.json +30 -0
  25. continuity_receipt-0.3.3/vectors/verification/10_wrong_issuer.json +35 -0
  26. continuity_receipt-0.3.3/vectors/verification/11_bad_digest_shape.json +35 -0
  27. continuity_receipt-0.3.3/vectors/verification/12_revoked_issuer.json +35 -0
  28. continuity_receipt-0.3.3/vectors/verification/13_unknown_member.json +36 -0
  29. continuity_receipt-0.3.3/vectors/verification/14_bad_error_codes.json +35 -0
  30. continuity_receipt-0.3.3/vectors/verification/15_provisional_anchor_missing.json +37 -0
  31. continuity_receipt-0.3.3/vectors/verification/16_insufficient_erased.json +46 -0
  32. continuity_receipt-0.3.3/vectors/verification/17_verdict_mismatch.json +37 -0
  33. continuity_receipt-0.3.3/vectors/verification/18_error_codes_mismatch.json +41 -0
  34. continuity_receipt-0.3.3/vectors/verification/19_bad_errors.json +35 -0
  35. continuity_receipt-0.3.2/vectors/verification/04_wrong_bundle.json → continuity_receipt-0.3.3/vectors/verification/20_bad_summary.json +7 -3
  36. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/verification/INDEX.md +8 -2
  37. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/verification/bundle.json +15 -15
  38. continuity_receipt-0.3.3/vectors/verification/erased_bundle.json +209 -0
  39. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/verification/manifest.json +50 -3
  40. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/verification/other_bundle.json +23 -23
  41. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/verifier-capabilities.json +18 -0
  42. continuity_receipt-0.3.2/VERIFICATION_RECEIPTS.md +0 -155
  43. continuity_receipt-0.3.2/vectors/verification/01_valid.json +0 -18
  44. continuity_receipt-0.3.2/vectors/verification/02_tampered_signature.json +0 -18
  45. continuity_receipt-0.3.2/vectors/verification/03_tampered_verdict.json +0 -18
  46. continuity_receipt-0.3.2/vectors/verification/05_bad_kind.json +0 -18
  47. continuity_receipt-0.3.2/vectors/verification/06_bad_version.json +0 -18
  48. continuity_receipt-0.3.2/vectors/verification/07_bad_verdict.json +0 -18
  49. continuity_receipt-0.3.2/vectors/verification/08_bad_verified_at.json +0 -18
  50. continuity_receipt-0.3.2/vectors/verification/09_missing_sig.json +0 -13
  51. continuity_receipt-0.3.2/vectors/verification/10_wrong_issuer.json +0 -18
  52. continuity_receipt-0.3.2/vectors/verification/11_bad_digest_shape.json +0 -18
  53. continuity_receipt-0.3.2/vectors/verification/12_revoked_issuer.json +0 -18
  54. continuity_receipt-0.3.2/vectors/verification/13_unknown_member.json +0 -19
  55. continuity_receipt-0.3.2/vectors/verification/14_bad_error_codes.json +0 -18
  56. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/ANCHORING.md +0 -0
  57. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/CONTRIBUTING.md +0 -0
  58. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/LICENSE +0 -0
  59. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/MANIFEST.in +0 -0
  60. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/REVOCATION_DISTRIBUTION.md +0 -0
  61. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/SIGNING.md +0 -0
  62. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/THREAT_MODEL.md +0 -0
  63. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/VERIFY_IN_5_MIN.md +0 -0
  64. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/__init__.py +0 -0
  65. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/agreements.py +0 -0
  66. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/anchor.py +0 -0
  67. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/bundle.py +0 -0
  68. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/canon.py +0 -0
  69. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/disclose.py +0 -0
  70. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/keys.py +0 -0
  71. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/records.py +0 -0
  72. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/revocations.py +0 -0
  73. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt/verify.py +0 -0
  74. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt.egg-info/dependency_links.txt +0 -0
  75. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt.egg-info/entry_points.txt +0 -0
  76. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt.egg-info/requires.txt +0 -0
  77. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/continuity_receipt.egg-info/top_level.txt +0 -0
  78. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/schema/continuity-receipt-0.2.schema.json +0 -0
  79. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/schema/continuity-receipt-0.3.schema.json +0 -0
  80. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/setup.cfg +0 -0
  81. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_agreements.py +0 -0
  82. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_anchor.py +0 -0
  83. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_capabilities.py +0 -0
  84. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_revocations.py +0 -0
  85. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_schema.py +0 -0
  86. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tests/test_vectors.py +0 -0
  87. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tools/differential_anchor.py +0 -0
  88. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tools/differential_disclose.py +0 -0
  89. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tools/differential_vectors.py +0 -0
  90. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/tools/make_vectors.py +0 -0
  91. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/01_happy_minimal.json +0 -0
  92. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/02_happy_full.json +0 -0
  93. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/03_tampered_body.json +0 -0
  94. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/04_missing_termination.json +0 -0
  95. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/05_cap_exceeded.json +0 -0
  96. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/06_delivery_before_settlement.json +0 -0
  97. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/07_redacted_no_disclosure.json +0 -0
  98. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/08_redacted_disclosed.json +0 -0
  99. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/09_erased_content.json +0 -0
  100. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/10a_anchor_invalid.json +0 -0
  101. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/10b_anchor_missing.json +0 -0
  102. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/10c_anchor_unknown_type.json +0 -0
  103. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/11_succession_handoff.json +0 -0
  104. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/12_ms_timestamps.json +0 -0
  105. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/13_attestation_valid.json +0 -0
  106. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/13b_attestation_tampered.json +0 -0
  107. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/14a_revoked_key.json +0 -0
  108. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/14b_revocation_after_issue.json +0 -0
  109. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/15_merkle_provenance.json +0 -0
  110. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/15b_provenance_invalid.json +0 -0
  111. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16_offer_accept.json +0 -0
  112. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16b_offer_terms_mismatch.json +0 -0
  113. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16c_offer_expired.json +0 -0
  114. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16d_accept_without_offer.json +0 -0
  115. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16e_offer_terms_redacted.json +0 -0
  116. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/16f_offer_terms_disclosed.json +0 -0
  117. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/INDEX.md +0 -0
  118. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/README.md +0 -0
  119. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/bitcoin.pdf.ots +0 -0
  120. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/different-blockchains.txt.ots +0 -0
  121. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/gdp2q25-2nd.pdf.ots +0 -0
  122. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/headers.json +0 -0
  123. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/hello-world.txt +0 -0
  124. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/hello-world.txt.ots +0 -0
  125. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/anchor/known-and-unknown-notary.txt.ots +0 -0
  126. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/manifest.json +0 -0
  127. {continuity_receipt-0.3.2 → continuity_receipt-0.3.3}/vectors/verification/12_revoked_issuer.revocations.json +0 -0
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3 — 2026-09-23
4
+
5
+ Python tooling release: verification receipts now record the **full
6
+ verification result** — not just the verdict. Published to PyPI as
7
+ `continuity-receipt` 0.3.3 (revised within hours of 0.3.2, before any external
8
+ issuance; 0.3.2 receipts are superseded).
9
+
10
+ - **Full-result receipts.** `errors` (code/detail/receipt_id),
11
+ `provisional_reasons`, `insufficient_reasons`, and `summary` are now signed
12
+ into the receipt alongside `verdict`/`error_codes`, so a holder can audit
13
+ how and why the result was reached — and check its internal consistency
14
+ offline, without the bundle. `issue_verification_receipt` now takes the
15
+ `VerifyResult` (or its `as_dict()`) and refuses to sign an inconsistent
16
+ result; `verify_verification_receipt` adds shape checks (`bad_errors`,
17
+ `bad_provisional_reasons`, `bad_insufficient_reasons`, `bad_summary`) and
18
+ two consistency rules: `error_codes` must equal the codes in `errors`
19
+ (`error_codes_mismatch`), and the verdict must be the class implied by the
20
+ lists (`verdict_mismatch`).
21
+ - **Anchoring recipe.** `verification.receipt_digest` and
22
+ `continuity-receipt-verify-receipt --canonical PATH` produce the canonical
23
+ bytes and digest to timestamp with OpenTimestamps
24
+ (`VERIFICATION_RECEIPTS.md` §Anchoring), bounding `verified_at` externally.
25
+ - **Vectors 14 → 20**: real PROVISIONAL (`anchor_missing`) and
26
+ INSUFFICIENT_EVIDENCE (erased content) records, plus
27
+ `verdict_mismatch`/`error_codes_mismatch`/`bad_errors`/`bad_summary` cases.
28
+ Schema and capability disclosure updated; suite is 64 tests.
29
+
3
30
  ## 0.3.2 — 2026-09-23
4
31
 
5
32
  Python tooling release: **verification receipts** (companion, version 1)
@@ -38,15 +38,20 @@ a spec: `SPEC.md` is normative.
38
38
 
39
39
  ## Verification receipts (companion, version 1)
40
40
 
41
- `continuity_receipt.verification` verifies the signed statements the hosted
41
+ `continuity_receipt.verification` verifies the signed records the hosted
42
42
  service (and any other verifier) issues about a verification run — see
43
- `VERIFICATION_RECEIPTS.md` for the wire format and semantics. Checks:
44
- document shape, `kind`/`version`, verdict enum, RFC 3339 `verified_at`,
45
- `sha256:` digest shape, `error_codes` shape, `sig.key == issuer` + Ed25519
46
- signature over the canonical view minus `sig`; optional bundle digest match
43
+ `VERIFICATION_RECEIPTS.md` for the wire format and semantics. A receipt
44
+ records the **full result** (verdict, errors, provisional/insufficient
45
+ reasons, summary), not just the verdict. Checks: document shape,
46
+ `kind`/`version`, verdict enum, RFC 3339 `verified_at`, `sha256:` digest
47
+ shape, `error_codes`/`errors`/reason-list/summary shapes, `error_codes`
48
+ consistency with `errors`, verdict consistency with the reason lists
49
+ (`verdict_mismatch`), `sig.key == issuer` + Ed25519 signature over the
50
+ canonical view minus `sig`; optional bundle digest match
47
51
  (`bundle_digest_mismatch`); optional issuer-revocation check (`key_revoked`,
48
- statements in the bundle shape). CLI: `continuity-receipt-verify-receipt`;
49
- vectors: `vectors/verification/` (14 cases).
52
+ statements in the bundle shape). CLI: `continuity-receipt-verify-receipt`
53
+ (`--digest` prints the receipt digest for anchoring); vectors:
54
+ `vectors/verification/` (20 cases).
50
55
 
51
56
  ## Verdicts
52
57
 
@@ -77,6 +82,8 @@ with codes including `anchor_verified`, `anchor_unverified`,
77
82
 
78
83
  **Verification receipts:** `not_an_object`, `bad_kind`, `bad_version`,
79
84
  `bad_verdict`, `bad_verified_at`, `bad_bundle_digest`, `bad_error_codes`,
85
+ `bad_errors`, `bad_provisional_reasons`, `bad_insufficient_reasons`,
86
+ `bad_summary`, `error_codes_mismatch`, `verdict_mismatch`,
80
87
  `bad_signature_shape`, `bad_signature`, `bundle_digest_mismatch`,
81
88
  `key_revoked`.
82
89
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continuity-receipt
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Continuity Receipt — open specification, test vectors, and reference verifier for verifiable records of governed AI-agent tasks
5
5
  Author: Lucas Bailey
6
6
  License-Expression: Apache-2.0
@@ -33,7 +33,7 @@ independently:
33
33
  | Artifact | Current | Installs with |
34
34
  |---|---|---|
35
35
  | Spec / wire format | `continuity-receipt/0.3` (additive) | — |
36
- | Python reference + CLIs | **0.3.2** (PyPI) | `pip install continuity-receipt` |
36
+ | Python reference + CLIs | **0.3.3** (PyPI) | `pip install continuity-receipt` |
37
37
  | Rust verifier + CLIs | **0.3.2** (crates.io) | `cargo install continuity-receipt` |
38
38
 
39
39
  Both implementations support spec 0.3 (offer/accept binding) with identical
@@ -67,7 +67,7 @@ CONTRIBUTING.md DCO, test rules, scope
67
67
  ROADMAP.md what lands in 0.3 and beyond, and the selection rule
68
68
  continuity_receipt/ reference implementation (Python, cryptography>=42)
69
69
  rust/ second implementation (verifier crate; cargo test)
70
- vectors/ 26 bundle vectors + 14 verification-receipt vectors
70
+ vectors/ 26 bundle vectors + 20 verification-receipt vectors
71
71
  tools/make_vectors.py regenerates the vectors deterministically
72
72
  tests/ conformance suite (vectors, schema, primitives)
73
73
  ```
@@ -75,7 +75,7 @@ tests/ conformance suite (vectors, schema, primitives)
75
75
  ## Quickstart
76
76
 
77
77
  ```bash
78
- # from PyPI (0.3.2) — clone the repo for the vectors
78
+ # from PyPI (0.3.3) — clone the repo for the vectors
79
79
  python3 -m venv .venv && . .venv/bin/activate
80
80
  pip install continuity-receipt
81
81
  continuity-receipt-verify vectors/02_happy_full.json # TRUSTED
@@ -104,16 +104,17 @@ redacted offer terms (`16e`/`16f`).
104
104
  Every schema-valid vector is also checked against
105
105
  `schema/continuity-receipt-0.3.schema.json` in CI.
106
106
 
107
- 14 verification-receipt vectors in `vectors/verification/` (manifest +
108
- `INDEX.md`): valid receipt, signature/verdict tampering, wrong bundle, bad
109
- kind/version/verdict/timestamp/digest/error codes, missing signature, issuer
110
- swap, revoked issuer, unknown member. Schema:
111
- `schema/verification-receipt-1.schema.json`.
107
+ 20 verification-receipt vectors in `vectors/verification/` (manifest +
108
+ `INDEX.md`): valid TRUSTED/PROVISIONAL/INSUFFICIENT_EVIDENCE records (the full
109
+ result — errors, reasons, summary), signature/verdict tampering, wrong bundle,
110
+ bad kind/version/verdict/timestamp/digest/error-codes/errors/reasons/summary,
111
+ consistency violations, missing signature, issuer swap, revoked issuer,
112
+ unknown member. Schema: `schema/verification-receipt-1.schema.json`.
112
113
 
113
114
  ## Status and provenance
114
115
 
115
116
  - **Origin:** developed in the MandalaOS gate-lite work, where it passed acceptance G1–G8 and the wider project suite (49 tests, dogfood evidence). This repository is the format's public home; it versions independently of any product release train.
116
- - **Releases:** `0.1` (2026-09-18) — spec, reference verifier, 11 vectors. `0.2` (2026-09-18) — `authority.succession`, bundle-level revocation statements, counterparty attestation rules, millisecond timestamps, `merkle-sha256:` provenance, anchor typing, JSON Schema, CI, machine-readable vector manifest. `0.3` (2026-09-23) — `agreement.offer` / `agreement.accept` with digest binding, terms/id equality, and expiry semantics; vectors 16–16f; schema 0.3. Tooling `0.3.2` (2026-09-23) — verification receipts (companion v1: schema, 14 vectors, reference verifier + CLI), agreement emitters, integration kit.
117
+ - **Releases:** `0.1` (2026-09-18) — spec, reference verifier, 11 vectors. `0.2` (2026-09-18) — `authority.succession`, bundle-level revocation statements, counterparty attestation rules, millisecond timestamps, `merkle-sha256:` provenance, anchor typing, JSON Schema, CI, machine-readable vector manifest. `0.3` (2026-09-23) — `agreement.offer` / `agreement.accept` with digest binding, terms/id equality, and expiry semantics; vectors 16–16f; schema 0.3. Tooling `0.3.3` (2026-09-23) — verification receipts (companion v1: schema, 20 vectors, reference verifier + CLI; records the full result — errors, reasons, summary — with offline consistency checks and an anchoring recipe), agreement emitters, integration kit.
117
118
  - **Second implementation:** `rust/` — an independent Rust verifier
118
119
  (crate `continuity-receipt`) with the same verdict/error semantics; `cargo test`
119
120
  checks all 26 bundle vectors and CI diffs it against the Python reference
@@ -11,7 +11,7 @@ independently:
11
11
  | Artifact | Current | Installs with |
12
12
  |---|---|---|
13
13
  | Spec / wire format | `continuity-receipt/0.3` (additive) | — |
14
- | Python reference + CLIs | **0.3.2** (PyPI) | `pip install continuity-receipt` |
14
+ | Python reference + CLIs | **0.3.3** (PyPI) | `pip install continuity-receipt` |
15
15
  | Rust verifier + CLIs | **0.3.2** (crates.io) | `cargo install continuity-receipt` |
16
16
 
17
17
  Both implementations support spec 0.3 (offer/accept binding) with identical
@@ -45,7 +45,7 @@ CONTRIBUTING.md DCO, test rules, scope
45
45
  ROADMAP.md what lands in 0.3 and beyond, and the selection rule
46
46
  continuity_receipt/ reference implementation (Python, cryptography>=42)
47
47
  rust/ second implementation (verifier crate; cargo test)
48
- vectors/ 26 bundle vectors + 14 verification-receipt vectors
48
+ vectors/ 26 bundle vectors + 20 verification-receipt vectors
49
49
  tools/make_vectors.py regenerates the vectors deterministically
50
50
  tests/ conformance suite (vectors, schema, primitives)
51
51
  ```
@@ -53,7 +53,7 @@ tests/ conformance suite (vectors, schema, primitives)
53
53
  ## Quickstart
54
54
 
55
55
  ```bash
56
- # from PyPI (0.3.2) — clone the repo for the vectors
56
+ # from PyPI (0.3.3) — clone the repo for the vectors
57
57
  python3 -m venv .venv && . .venv/bin/activate
58
58
  pip install continuity-receipt
59
59
  continuity-receipt-verify vectors/02_happy_full.json # TRUSTED
@@ -82,16 +82,17 @@ redacted offer terms (`16e`/`16f`).
82
82
  Every schema-valid vector is also checked against
83
83
  `schema/continuity-receipt-0.3.schema.json` in CI.
84
84
 
85
- 14 verification-receipt vectors in `vectors/verification/` (manifest +
86
- `INDEX.md`): valid receipt, signature/verdict tampering, wrong bundle, bad
87
- kind/version/verdict/timestamp/digest/error codes, missing signature, issuer
88
- swap, revoked issuer, unknown member. Schema:
89
- `schema/verification-receipt-1.schema.json`.
85
+ 20 verification-receipt vectors in `vectors/verification/` (manifest +
86
+ `INDEX.md`): valid TRUSTED/PROVISIONAL/INSUFFICIENT_EVIDENCE records (the full
87
+ result — errors, reasons, summary), signature/verdict tampering, wrong bundle,
88
+ bad kind/version/verdict/timestamp/digest/error-codes/errors/reasons/summary,
89
+ consistency violations, missing signature, issuer swap, revoked issuer,
90
+ unknown member. Schema: `schema/verification-receipt-1.schema.json`.
90
91
 
91
92
  ## Status and provenance
92
93
 
93
94
  - **Origin:** developed in the MandalaOS gate-lite work, where it passed acceptance G1–G8 and the wider project suite (49 tests, dogfood evidence). This repository is the format's public home; it versions independently of any product release train.
94
- - **Releases:** `0.1` (2026-09-18) — spec, reference verifier, 11 vectors. `0.2` (2026-09-18) — `authority.succession`, bundle-level revocation statements, counterparty attestation rules, millisecond timestamps, `merkle-sha256:` provenance, anchor typing, JSON Schema, CI, machine-readable vector manifest. `0.3` (2026-09-23) — `agreement.offer` / `agreement.accept` with digest binding, terms/id equality, and expiry semantics; vectors 16–16f; schema 0.3. Tooling `0.3.2` (2026-09-23) — verification receipts (companion v1: schema, 14 vectors, reference verifier + CLI), agreement emitters, integration kit.
95
+ - **Releases:** `0.1` (2026-09-18) — spec, reference verifier, 11 vectors. `0.2` (2026-09-18) — `authority.succession`, bundle-level revocation statements, counterparty attestation rules, millisecond timestamps, `merkle-sha256:` provenance, anchor typing, JSON Schema, CI, machine-readable vector manifest. `0.3` (2026-09-23) — `agreement.offer` / `agreement.accept` with digest binding, terms/id equality, and expiry semantics; vectors 16–16f; schema 0.3. Tooling `0.3.3` (2026-09-23) — verification receipts (companion v1: schema, 20 vectors, reference verifier + CLI; records the full result — errors, reasons, summary — with offline consistency checks and an anchoring recipe), agreement emitters, integration kit.
95
96
  - **Second implementation:** `rust/` — an independent Rust verifier
96
97
  (crate `continuity-receipt`) with the same verdict/error semantics; `cargo test`
97
98
  checks all 26 bundle vectors and CI diffs it against the Python reference
@@ -1,7 +1,7 @@
1
1
  # Roadmap
2
2
 
3
3
  **Current release:** spec `continuity-receipt/0.3` (2026-09-23; Python tooling
4
- 0.3.2 on PyPI, Rust crate 0.3.2 on crates.io). Spec `0.1` and `0.2` remain
4
+ 0.3.3 on PyPI, Rust crate 0.3.2 on crates.io). Spec `0.1` and `0.2` remain
5
5
  supported.
6
6
  **Versioning policy:** additive fields within 0.x; breaking changes require a new minor plus a new vector set; the verifier refuses unknown spec versions.
7
7
  **Selection rule:** a change lands only if it is testable — every change ships with a vector, an acceptance test, or a documented negative case. Failures and rejected designs are published, not hidden.
@@ -37,13 +37,16 @@ Spec, reference verifier, 11 vectors. JSON + RFC 8785 subset, SHA-256, Ed25519,
37
37
  - [x] Reference emitters (`continuity_receipt.agreements`) + vectors 16e/16f
38
38
  (redacted/disclosed offer terms).
39
39
 
40
- ### Companion: verification receipts (2026-09-23) — tooling 0.3.2
40
+ ### Companion: verification receipts (2026-09-23) — tooling 0.3.3
41
41
  - [x] Wire format + semantics frozen (`VERIFICATION_RECEIPTS.md`): signed
42
42
  statement binding the JCS-canonical bundle digest to verdict, error codes,
43
43
  implementation/version, and time; `did:key` attribution.
44
- - [x] Schema (`schema/verification-receipt-1.schema.json`), 14 vectors
44
+ - [x] Schema (`schema/verification-receipt-1.schema.json`), 20 vectors
45
45
  (`vectors/verification/`, manifest + INDEX), reference verifier
46
46
  (`continuity_receipt.verification`) + CLI `continuity-receipt-verify-receipt`.
47
+ - [x] Receipts record the **full result** — errors, provisional/insufficient
48
+ reasons, summary — with offline consistency checks (`verdict_mismatch`,
49
+ `error_codes_mismatch`) and an anchoring recipe (`--canonical` + OTS).
47
50
  - [x] Opt-in issuer-revocation check (`key_revoked`) reusing the bundle
48
51
  revocation statement shape.
49
52
  - [x] Integration kit page (`VERIFY_IN_5_MIN.md`).
@@ -331,7 +331,7 @@ manifest.
331
331
  **Resolved for 0.3** (2026-09-23): `agreement.offer` / `agreement.accept`
332
332
  with digest binding (`offer_ref`), terms/id equality checks, expiry semantics,
333
333
  and the missing-offer-is-insufficient rule; vectors 16–16d; schema 0.3.
334
- Rust parity landed 2026-09-23 (crate 0.3.2; differential 24/24).
334
+ Rust parity landed 2026-09-23 (crate 0.3.2; differential 26/26).
335
335
 
336
336
  **Deferred to 0.3, with reasons:**
337
337
  1. **CBOR equivalence** — no implementer need demonstrated yet, and the signed
@@ -0,0 +1,230 @@
1
+ # Verification receipts (companion, version 1)
2
+
3
+ **Status:** companion document to the Continuity Receipt specification; wire
4
+ format frozen 2026-09-23 (`kind: continuity-receipt-verification`, version 1;
5
+ revised the same day to record the full result before any external issuance).
6
+ Verification receipts are **not** part of the `continuity-receipt/0.x` bundle
7
+ format: they are standalone records of a verification run, never chain
8
+ members.
9
+ **Reference implementation:** `continuity_receipt.verification` (Python),
10
+ CLI `continuity-receipt-verify-receipt`; schema
11
+ `schema/verification-receipt-1.schema.json`; vectors `vectors/verification/`
12
+ (20 cases).
13
+
14
+ ## Why
15
+
16
+ A verdict on its own is a claim. When a verifier answers `TRUSTED`, the party
17
+ that needs to rely on that answer — a buyer, an insurer, an arbiter, a
18
+ downstream agent — currently has to trust the channel or re-run verification
19
+ itself. A verification receipt closes the loop: the verifier signs *what it
20
+ checked and how the result was reached* — the bundle digest, the verdict,
21
+ **every error, the provisional/insufficient reasons, and the summary** — and
22
+ anyone can verify that record offline, with the bundle in hand.
23
+
24
+ Three properties do the work:
25
+
26
+ 1. **Binding.** `bundle_digest` is the SHA-256 of the JCS-canonical bytes of
27
+ the bundle object, so the record is tied to exact content, independent of
28
+ how the bundle was serialized or transported.
29
+ 2. **Attribution.** The record is signed by the verifier's `did:key`; the
30
+ issuer is discoverable, and its key is revocable like any other key.
31
+ 3. **Fidelity.** The record is a signed copy of the calculation's result, not
32
+ a summary judgment: errors carry codes (and details), reasons explain
33
+ `PROVISIONAL`/`INSUFFICIENT_EVIDENCE`, and the summary carries the stats
34
+ (receipt count, types, issuers, terminated/settled, and any
35
+ attestation/anchor/revocation checks that ran). Its internal consistency
36
+ is checkable offline — a holder does not need the bundle to see that the
37
+ verdict matches its reasons.
38
+
39
+ ## Wire format
40
+
41
+ ```json
42
+ {
43
+ "kind": "continuity-receipt-verification",
44
+ "version": 1,
45
+ "bundle_digest": "sha256:9f2c…",
46
+ "verdict": "UNTRUSTED",
47
+ "error_codes": ["cap_exceeded"],
48
+ "errors": [
49
+ {
50
+ "code": "cap_exceeded",
51
+ "detail": "settlement {'minor': 5000, 'currency': 'USD'} exceeds cap {'minor': 100, 'currency': 'USD'}",
52
+ "receipt_id": "urn:uuid:01997c4e-…"
53
+ }
54
+ ],
55
+ "provisional_reasons": [],
56
+ "insufficient_reasons": [],
57
+ "summary": {
58
+ "receipts": 6,
59
+ "types": ["session.pass.created", "task.decision", "task.execution", "delivery.attestation", "settlement", "task.termination"],
60
+ "issuers": ["did:key:z6Mk…"],
61
+ "terminated": true,
62
+ "settled": true
63
+ },
64
+ "verified_at": "2026-09-23T21:00:00Z",
65
+ "verifier": {"implementation": "python-reference", "version": "0.3.3"},
66
+ "issuer": "did:key:z6Mk…",
67
+ "sig": {"alg": "ed25519", "key": "did:key:z6Mk…", "value": "…"}
68
+ }
69
+ ```
70
+
71
+ | Field | Meaning |
72
+ |---|---|
73
+ | `kind`, `version` | Document identity. Unknown versions are refused (`bad_version`), never guessed at. |
74
+ | `bundle_digest` | `sha256:` + SHA-256 of the JCS-canonical bytes of the verified bundle object (see §Digest rule). |
75
+ | `verdict` | One of `TRUSTED` · `PROVISIONAL` · `INSUFFICIENT_EVIDENCE` · `UNTRUSTED` — the verdict the verifier recorded. |
76
+ | `error_codes` | The codes of `errors`, in order; must equal them exactly (`error_codes_mismatch`). Empty on non-`UNTRUSTED` verdicts. |
77
+ | `errors` | Every error the verifier reported: `{code, detail?, receipt_id?}`. Details may quote bundle values (amounts, ids) — they are evidence, share accordingly. |
78
+ | `provisional_reasons` | Why the verdict is `PROVISIONAL` (e.g. `anchor_missing`, `redacted_without_disclosure:<path>`). |
79
+ | `insufficient_reasons` | Why the verdict is `INSUFFICIENT_EVIDENCE` (e.g. `erased_content:<path>`, `missing_offer:<receipt_id>`). |
80
+ | `summary` | The verification summary: `receipts`, `types`, `issuers`, `terminated`, `settled`, plus optional checks (`attestations`, `anchors`, `revocations_checked`, …). |
81
+ | `verified_at` | When the verification ran. RFC 3339 UTC; 1–3 fractional digits allowed. Issuer-asserted unless the receipt is anchored (§Anchoring). |
82
+ | `verifier` | Implementation name and version — "which verifier, which version" is part of the record. |
83
+ | `issuer` | The DID of the signing key. |
84
+ | `sig` | Ed25519 over the JCS-canonical bytes of the object minus `sig` (the same canonical-view rule as bundle receipts). `sig.key` MUST equal `issuer`. |
85
+
86
+ Additional members are allowed; they are inside the signed bytes, and
87
+ verifiers MUST ignore members they do not know (vector `13_unknown_member`).
88
+
89
+ ### Consistency rules (checkable without the bundle)
90
+
91
+ - `error_codes` equals the codes in `errors`, in order.
92
+ - The verdict is the class implied by the lists:
93
+ errors non-empty → `UNTRUSTED`; else `insufficient_reasons` non-empty →
94
+ `INSUFFICIENT_EVIDENCE`; else `provisional_reasons` non-empty →
95
+ `PROVISIONAL`; else `TRUSTED` (`verdict_mismatch`).
96
+
97
+ These mirror the core verifier's verdict rule exactly, so a receipt cannot
98
+ quietly claim `TRUSTED` while carrying errors.
99
+
100
+ ## Digest rule
101
+
102
+ `bundle_digest` = `"sha256:" + SHA-256(JCS(bundle_object))`, where JCS is the
103
+ pinned canonicalization of SPEC §5 (RFC 8785 for the ASCII-key JSON subset
104
+ this schema requires; floats are rejected). The digest is over **content, not
105
+ serialization**: pretty-printed and compact encodings of the same bundle
106
+ object produce the same digest, and any holder of the bundle (object or JSON
107
+ bytes) can recompute it. `digest_match` in the reference result is exactly
108
+ that equality; without a supplied bundle it is `null`.
109
+
110
+ Bundles that cannot be canonically encoded (e.g. containing floats) cannot be
111
+ digested; the reference issuer refuses to issue a receipt for them.
112
+
113
+ ## Verification algorithm
114
+
115
+ Ordered checks; the reference verifier collects **all** failures and the
116
+ result is `valid` only when the list is empty:
117
+
118
+ 1. Document is an object — `not_an_object`.
119
+ 2. `kind` equals `continuity-receipt-verification` (`bad_kind`); `version`
120
+ equals `1` (`bad_version`).
121
+ 3. `verdict` is one of the four enum values (`bad_verdict`).
122
+ 4. `verified_at` is RFC 3339 UTC (`bad_verified_at`).
123
+ 5. `bundle_digest` is `sha256:` + 64 lowercase hex (`bad_bundle_digest`).
124
+ 6. Result shapes: `errors` is a list of `{code}` objects (`bad_errors`);
125
+ `provisional_reasons` / `insufficient_reasons` are string lists
126
+ (`bad_provisional_reasons` / `bad_insufficient_reasons`); `summary` is an
127
+ object (`bad_summary`); `error_codes` is a string list (`bad_error_codes`).
128
+ 7. Consistency: `error_codes` matches `errors` (`error_codes_mismatch`);
129
+ verdict matches the reason lists (`verdict_mismatch`).
130
+ 8. `sig` has shape `{alg: "ed25519", key, value}` (`bad_signature_shape`);
131
+ `sig.key` equals `issuer`, and the Ed25519 signature verifies over the
132
+ JCS-canonical bytes of the document minus `sig` (`bad_signature`).
133
+ 9. If the caller supplies the bundle: digest equality
134
+ (`bundle_digest_mismatch`; `digest_match` reports the comparison).
135
+ 10. If the caller supplies revocation statements covering the issuer: a
136
+ statement with `revoked_at <= verified_at` makes the receipt invalid
137
+ (`key_revoked`). Without revocation input the check is not performed.
138
+
139
+ Reference result shape:
140
+
141
+ ```json
142
+ {
143
+ "valid": true,
144
+ "errors": [],
145
+ "issuer": "did:key:z6Mk…",
146
+ "verdict": "TRUSTED",
147
+ "verified_at": "2026-09-23T21:00:00Z",
148
+ "bundle_digest": "sha256:9f2c…",
149
+ "digest_match": true
150
+ }
151
+ ```
152
+
153
+ ## What a verification receipt proves — and does not
154
+
155
+ **Proves:** this issuer ran a named, versioned verification implementation
156
+ over content with this digest at this time, and the recorded result —
157
+ verdict, errors, reasons, summary — is internally consistent and signed. With
158
+ the bundle in hand, a holder can re-run the verification and compare every
159
+ recorded field — the receipt is evidence about the *verification run*; the
160
+ bundle is the evidence about the task.
161
+
162
+ **Does not prove:** that the bundle's claims are true (issuer honesty is out
163
+ of scope, as in `THREAT_MODEL.md`), that the recorded result is *correct*
164
+ (re-run verification; a disagreeing receipt is simply a different record), or
165
+ that the issuer is trustworthy (check the issuer's key and revocation
166
+ status). A valid receipt whose verdict is `UNTRUSTED` is still a valid
167
+ receipt — and a useful one.
168
+
169
+ ## Anchoring
170
+
171
+ `verified_at` is issuer-asserted. To bound it externally, anchor the receipt
172
+ digest — `sha256` of the receipt's canonical bytes minus `sig`
173
+ (`continuity_receipt.verification.receipt_digest`):
174
+
175
+ ```bash
176
+ # 1. Write the canonical view and print the digest (the view is what gets stamped)
177
+ continuity-receipt-verify-receipt receipt.json --canonical receipt.canonical
178
+
179
+ # 2. Timestamp it with the OpenTimestamps client (external)
180
+ ots stamp receipt.canonical
181
+
182
+ # 3. Verify the proof against the digest (companion tool; add --header/--height
183
+ # once the Bitcoin attestation confirms — see ANCHORING.md)
184
+ continuity-receipt-anchor receipt.canonical.ots \
185
+ --digest "$(sha256sum receipt.canonical | cut -d' ' -f1)" --json
186
+
187
+ # 4. Optional: host the proof (keyed)
188
+ # POST /anchors {"digest": "sha256:…", "proof": "<base64 of the .ots>"}
189
+ ```
190
+
191
+ The proof covers the canonical bytes, so anyone can reproduce both the digest
192
+ and the stamped file from the receipt itself.
193
+
194
+ ## Revocation
195
+
196
+ The issuer key carries the same revocation semantics as bundle receipts:
197
+ statements are self-signed by the key they revoke
198
+ (`REVOCATION_DISTRIBUTION.md`), and a receipt is invalid when
199
+ `revoked_at <= verified_at`. The check is **opt-in input** — a verifier
200
+ without revocation information cannot perform it. Consumers who need the
201
+ check can fetch the issuer's published document (the hosted service serves
202
+ `GET /revocations/<issuer>`) and pass its statements.
203
+
204
+ ## Vectors and schema
205
+
206
+ - Schema: `schema/verification-receipt-1.schema.json` (JSON Schema 2020-12).
207
+ - Vectors: `vectors/verification/` — 20 cases: valid TRUSTED, PROVISIONAL
208
+ (`anchor_missing`), INSUFFICIENT_EVIDENCE (erased content),
209
+ signature/verdict tampering, wrong bundle, bad
210
+ kind/version/verdict/timestamp/digest/error-codes/errors/reasons/summary,
211
+ consistency violations (`verdict_mismatch`, `error_codes_mismatch`),
212
+ missing signature, issuer swap, revoked issuer, unknown member.
213
+ Machine-readable expectations in `vectors/verification/manifest.json`;
214
+ human index in `vectors/verification/INDEX.md`.
215
+ - Verify with:
216
+ `continuity-receipt-verify-receipt <receipt.json> [--bundle <bundle.json>] [--revocations <file|url>]`
217
+ or from Python with `continuity_receipt.verification`.
218
+
219
+ ## Open items
220
+
221
+ - **Rust parity** — the second implementation does not verify verification
222
+ receipts yet; tracked in `ROADMAP.md`.
223
+ - **Countersignatures / multi-verifier receipts** — two verifiers, one
224
+ statement set; no consumer yet.
225
+ - **Freshness vs idempotency** — the hosted service can return the original
226
+ `verified_at` for a repeated verification within its cache TTL; callers who
227
+ need a fresh attestation re-run without the cache. Service policy, not wire
228
+ format.
229
+ - Hosted-service policy (rate limits, opt-in digest cache) is not wire
230
+ format; see the service contract (`RECEIPT_API.md`).
@@ -1,3 +1,3 @@
1
1
  """Single source of the implementation version (mirrored in pyproject.toml)."""
2
2
 
3
- __version__ = "0.3.2"
3
+ __version__ = "0.3.3"