ap2_mandate_verifier 0.8.0 → 1.1.0

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.
@@ -0,0 +1,182 @@
1
+ # Input assembly for explicit checkout profiles
2
+
3
+ ## Multi-item selection in published 0.6.0
4
+
5
+ Published stable 0.6.0 supports
6
+ `InputBuilder.trust(..., profile_ref: "ap2.checkout.single_merchant_multi_item")`.
7
+ Omitting `profile_ref:` retains the unchanged single-SKU v1 profile. The new
8
+ selection is authenticated Host policy, not extracted from Mandate claims.
9
+ `prepare`, `restore`, `restore_trust`, `inputs` and `verify` retain their existing
10
+ arguments and follow that validated profile. Saved profile identifiers and
11
+ definition hashes must agree with current trust and binding; no repair occurs.
12
+ The old saved format remains valid for its original profile, and migration
13
+ requires a new selection and challenge before presentation.
14
+
15
+ Use the same explicit `profile_ref:` for `CheckoutJWT.sign` and
16
+ `CheckoutReceipt.reference/sign/verify`. The [multi-item guide](MULTI_ITEM_CHECKOUT.md)
17
+ describes supported identities, quantities, disclosures and limits; the
18
+ [complete synthetic example](../examples/multi_item_checkout.rb) covers signing,
19
+ prepare/save/restore/current verification and genuine Success/Error Receipts.
20
+ The normal business-order mapping below still supplies independent Host values;
21
+ received signed claims never become their own expected total or trust input.
22
+
23
+ Published 0.4.0 includes supplemental safe diagnostics; see [API and troubleshooting](DIAGNOSTICS.md). Existing verdict/Evidence contracts remain unchanged.
24
+
25
+ `AP2MandateVerifier::InputBuilder` converts explicit Host business information into
26
+ the existing seven verification inputs. It performs no network, database, Rails,
27
+ nonce issuance/consumption or payment operation. A built input is not verified
28
+ Evidence. `InputBuilder.verify` always invokes the complete `verify_checkout` core.
29
+ The original `verify_checkout`, `verify_research` and older APIs remain available.
30
+
31
+ ## Run the complete Ruby example
32
+
33
+ After ordinary installation of published 0.4.0 (`gem install ap2_mandate_verifier --version 0.4.0`), run these repository examples:
34
+
35
+ ```sh
36
+ ruby examples/input_builder.rb valid
37
+ ruby examples/input_builder.rb tampered
38
+ ruby examples/input_builder.rb expired
39
+ ruby examples/input_builder_before.rb
40
+ ```
41
+
42
+ The example contains independent synthetic order and public-registration data,
43
+ original signed Strings, issue-time preparation, temporary-file persistence,
44
+ restoration, fresh current-state reads, verification, and result handling. It does
45
+ not read `full.json` or infer trusted keys, prices, identities or nonce from tokens.
46
+ No private keys are distributed. See `examples/input_builder/NOTICE.md` for source.
47
+ The fixed synthetic clock is intentional: these historical signatures expire.
48
+
49
+ ## Host mapping
50
+
51
+ All structured input keys are Strings. Exact plain Hash/Array/String/Integer and
52
+ boolean values are accepted; do not pass model objects, Symbols, subclasses,
53
+ custom coercions or unbounded graphs. Unknown fields are rejected. Pure assembly
54
+ methods raise `InputBuilder::Invalid` for malformed business information; a caller
55
+ must treat missing results or exceptions as failure, never authorization.
56
+
57
+ `verify` converts malformed assembly arguments to the existing immutable Result
58
+ `:rejected / :invalid_host_context`; dependency or unexpected assembly failures
59
+ return `:unavailable / :research_verification_unavailable`. Both are non-success
60
+ with no Evidence. Codes produced after entering the complete verifier are retained.
61
+
62
+ | Business source | Builder argument | Host responsibility |
63
+ | --- | --- | --- |
64
+ | Authenticated registry snapshot and public PEM keys | `trust(snapshot:, tenant_id:, issuer:, agent:, merchant:, verified_at:)` | Provenance, enrollment, revocation, freshness and explicit selection |
65
+ | Current order/account/tenant, merchant, audience, version, currency, total minor units | `order:` | Independent authoritative state; no values inferred from signed claims |
66
+ | Original received Root and Checkout Strings | `root_presentation:`, `host_checkout_jws:` | Preserve exact bytes, including Root disclosure order and trailing `~` |
67
+ | Host-chosen ID, nonce, issuer and validity | `prepare(...)` | Actual issuance and durable authenticated persistence |
68
+ | Saved preparation String | `restore(saved_challenge:)` | Authenticate storage; retain state and references without repair |
69
+ | Current trust/order, terminal String and trusted clock | `inputs(...)` / `verify(...)` | Independent reads, currentness and clock provenance |
70
+ | Verified Evidence | returned Result | Final authorization; recheck trust/order, atomic nonce consumption and order CAS |
71
+
72
+ A snapshot has `id`, `policy_version`, `active`, `not_before`, `not_after`, and
73
+ `records`. Each record supplies `role`, `identity`, `tenant_id`, `purpose`,
74
+ `key_ref`, `public_key_pem`, `active`, `not_before`, `not_after`. Public PEM must
75
+ already be canonical P256 SPKI. The builder adds the fixed profile, algorithm and
76
+ fingerprint; it preserves and validates every record, including nonselected ones.
77
+ Role selectors each contain `identity`, `purpose`, `key_ref`.
78
+
79
+ An order contains `tenant_id`, `buyer_account_id`, `order_id`, `merchant_id`,
80
+ `audience`, `order_version`, `currency`, `expected_total` (integer minor units).
81
+ The builder adds selected Agent fingerprint, raw wire digests and fixed profile.
82
+ It does not compare current values by overwriting issued values.
83
+
84
+ ## Rails mapping example
85
+
86
+ Rails is optional. This explicit mapping belongs to the application; the Gem does
87
+ not interpret ActiveRecord models or acquire trust. Only use values whose source
88
+ and currentness your Host has authenticated:
89
+
90
+ ```ruby
91
+ order_information = {
92
+ "tenant_id" => order.tenant.external_id,
93
+ "buyer_account_id" => order.buyer.external_id,
94
+ "order_id" => order.external_id,
95
+ "merchant_id" => order.merchant.external_id,
96
+ "audience" => configured_checkout_audience,
97
+ "order_version" => order.lock_version.to_s,
98
+ "currency" => order.currency,
99
+ "expected_total" => order.total_minor
100
+ }
101
+ # registry_snapshot and role selectors use the same explicit plain-value mapping.
102
+ # Save prepare(...) bytes in a protected challenge record before handing out nonce.
103
+ # Later load that record unchanged and independently reread current order/trust.
104
+ inputs = AP2MandateVerifier::InputBuilder.inputs(
105
+ trust: current_trust, saved_challenge: challenge.preparation_bytes,
106
+ order: order_information, root_presentation: received_root,
107
+ terminal_jws: received_terminal, host_checkout_jws: original_checkout,
108
+ expected_challenge_issuer_id: configured_host_id,
109
+ clock_source_id: trusted_clock_id, verified_at: trusted_clock_unix_seconds)
110
+ result = AP2MandateVerifier.verify_checkout(**inputs)
111
+ # success? is checked evidence, not a purchase/payment permission.
112
+ ```
113
+
114
+ Do not call `prepare` again during verification. Changes in order, selected Agent,
115
+ raw signed bytes, trust snapshot/policy or saved references must remain observable.
116
+ Restoration validates the storage envelope and does not authenticate its contents.
117
+ Changing a stored digest to match current data defeats the Host trust boundary.
118
+ Persist state changes separately under authenticated atomic Host operations; do
119
+ not replace an already-used challenge with a new issued preparation.
120
+
121
+ ## Before/after measurement
122
+
123
+ The checked-in runnable examples are the measurement material, rather than a
124
+ one-line call that hides initial setup or persistence. Count nonblank,
125
+ noncomment Ruby lines with:
126
+
127
+ ```sh
128
+ awk 'NF && $0 !~ /^[[:space:]]*#/ {n++} END {print n}' examples/input_builder_before.rb
129
+ awk 'NF && $0 !~ /^[[:space:]]*#/ {n++} END {print n}' examples/input_builder.rb
130
+ ```
131
+
132
+ Current source counts are **64 before / 42 after**. Both include initial mapping,
133
+ issue preparation, save/read, current-state construction and result handling.
134
+ The after example additionally selects three scenarios; this is a small synthetic
135
+ example, not a general application-effort benchmark or performance claim.
136
+
137
+ | Burden | Before | Recommended path |
138
+ | --- | --- | --- |
139
+ | Initial business mapping | Required | Required, explicit and source-owned |
140
+ | Trust/profile envelopes and selection references | Handwritten nested shapes | Gem-generated |
141
+ | Public-key fingerprint, snapshot-body hash, Root/Checkout digest | 4 caller-side SHA256 call sites | 0 |
142
+ | Challenge B and trust-reference transcription | Caller constructs and copies | Gem-generated at preparation |
143
+ | Daily verification | Assemble current B, host JSON, seven arguments | Restore saved bytes, map current state, call builder |
144
+ | Storage, trust authenticity, nonce state, final business decision | Host-owned | Host-owned |
145
+
146
+ The improvement removes mechanical transformations and repeated profile/reference
147
+ knowledge. It does not remove the first-time work of identifying authoritative
148
+ business data, registration policy or atomic Host operations.
149
+
150
+ ## Versions and migration
151
+
152
+ Gem version (current published `0.6.0`), AP2 source
153
+ `b4587ac1d055888a73b4b21750973cffba961793`, explicitly selected profile
154
+ (`ap2.checkout.single_merchant_sku` v1 or `ap2.checkout.single_merchant_multi_item` v1), and preparation format `1` are
155
+ separate identifiers. Unknown preparation/profile versions fail closed. There is
156
+ no generic future-profile fallback. New protocol requirements can require new
157
+ application data and an explicit migration or reissuance.
158
+
159
+ Keep existing seven-input integrations unchanged while adopting the builder for
160
+ new preparations. Existing raw Host JSON is not automatically upgraded into a
161
+ new issued challenge. Retain original signed bytes and authenticated saved
162
+ references. Reissue through the Host's normal authorization process when a stored
163
+ format cannot be supported; do not repair its digests or reinterpret its version.
164
+ See [SUPPORT_CONTRACT](SUPPORT_CONTRACT.md) and the [multi-item migration](MULTI_ITEM_CHECKOUT.md) for each profile's scope.
165
+
166
+ ### Restoring an existing trust snapshot
167
+
168
+ `trust(...)` creates a **new** snapshot body from business records. When your Host
169
+ persists an existing authenticated snapshot, keep `trust.trust_json` and
170
+ `trust.selection_json` as original Strings and reload them with:
171
+
172
+ ```ruby
173
+ current_trust = AP2MandateVerifier::InputBuilder.restore_trust(
174
+ trust_json: authenticated_registry.trust_bytes,
175
+ selection_json: authenticated_registry.selection_bytes,
176
+ verified_at: trusted_clock_unix_seconds)
177
+ ```
178
+
179
+ This preserves exact snapshot/profile body Strings and their existing digests.
180
+ Do not parse and regenerate a persisted trust body to suppress reference drift.
181
+ A restored snapshot must still be independently authenticated and current; loading
182
+ an older snapshot does not establish freshness or prevent rollback.
data/docs/PAYMENT.md ADDED
@@ -0,0 +1,70 @@
1
+ # Payment APIs — unpublished 1.1.0 candidate
2
+
3
+ Published 1.0.0 remains the Checkout-only API contract. These additive APIs do not change its arguments, defaults, profiles, accepted inputs, results, storage or Checkout Receipt references. The Gem is framework independent; Rails is optional.
4
+
5
+ ## Supported profile and specification
6
+
7
+ `Payment::PROFILE_REF = "ap2.payment.single.complete.1"`: one immediate payment, ES256/P-256, SHA256, one Provider root and at most one Agent hop, full content. Root/terminal accepts inline content or exactly one two-element content disclosure. Issuance uses one content disclosure for root and inline terminal. No other commitments/disclosures, nested SD, hidden claims, decoys, re-delegation or unknown fields are accepted. The profile is selected by these APIs, never by received claims.
8
+
9
+ Adopted source: [AP2 b4587ac1d055888a73b4b21750973cffba961793](https://github.com/google-agentic-commerce/AP2/tree/b4587ac1d055888a73b4b21750973cffba961793). Upstream e1ea56db72a6385bce3e5c1112b3a56ce60acb43 has the same relevant specification, Schemas and Python SDK. Decisions follow payment_mandate.json, open_payment_mandate.json, payment_receipt.json, types/amount.json and agent_authorization.md, with SDK behavior compared separately.
10
+
11
+ | Reference | Exact SHA256 input, base64url without padding |
12
+ | --- | --- |
13
+ | Payment transaction_id | Original Merchant Checkout JWT bytes |
14
+ | payment.reference.conditional_transaction_id | Original Open Checkout SD-JWT bytes, including disclosures in original order and terminal `~` |
15
+ | Agent sd_hash | Original Open Payment SD-JWT bytes including terminal `~` |
16
+ | Payment Receipt reference | Final Closed Payment SD-JWT alone, including disclosures and terminal `~`; excludes Open and `~~` separator |
17
+
18
+ Do not hash parsed/rebuilt JSON, compact-only JWT or the entire chain. `Presentation.chain` removes the Open's terminal `~`, then joins with `~~`; separate original strings remain authoritative for storage/hashing.
19
+
20
+ Closed `vct` is `mandate.payment.1`; Open is `mandate.payment.open.1`. Integer `iat` and `exp` are mandatory in this stricter profile, `iat <= verified_at < exp`, maximum lifetime 600 seconds. Conditional terminal iat equals Closed iat, cannot predate Open, cannot be more than 300 seconds old, and Closed exp cannot exceed Open exp. No clock defaults or skew at expiry. Amount is an integer minor unit in the existing supported Checkout currencies (USD/EUR/JPY), within existing scoped amount bounds. Decimal/float/bool values reject. Payee is the exact verified Checkout merchant, including name. Instrument has id/type and optional description; full object equality applies.
21
+
22
+ Open requires exactly one each of amount_range (currency, max and optional min), allowed_payees, allowed_payment_instruments and payment.reference. The first three are supplied to issuance; reference is calculated from supplied original Open Checkout. Lists allow 1–8 unique entries. Optional fixed payee/payment_amount/payment_instrument must remain completely unchanged. During verification the reference is matched to the Open in the fully verified Checkout chain. Recurrence/budget, PISP, execution_date/risk_data, arbitrary constraints, other algorithms and partial disclosure reject explicitly through the redacted failure contract.
23
+
24
+ ## Public APIs and independent inputs
25
+
26
+ All methods are under `AP2MandateVerifier`, all parameters are keywords. See [executable plain Ruby example](../examples/payment.rb) for full calls.
27
+
28
+ | Method | Required inputs and result |
29
+ | --- | --- |
30
+ | `Payment.details` | checkout_jwt, trusted_merchant_public_key_pem, expected_merchant_id, payment_instrument → immutable four-field payment Hash. Authenticates Merchant JWT and calculates amount/payee/transaction reference; does not authenticate consent or a Checkout Mandate. |
31
+ | `Payment.issue_direct` | payment, approved_payment, issued_at, expires_at, signer, public_key_pem → Presentation. Every payment field must equal the app's protected consent record. |
32
+ | `Payment.issue_open` | open_checkout_sd_jwt, constraints, fixed, agent_public_key_pem, issued_at, expires_at, signer, public_key_pem → original frozen Open String. App authenticates consent to conditions and the source of Open Checkout. |
33
+ | `Payment.issue_closed` | open_sd_jwt, payment, trusted_provider_public_key_pem, agent_public_key_pem, audience, nonce, verified_at, signer → Presentation. Verifies Provider, Agent binding, time and Open constraints. Full Checkout authentication occurs in verify; issuing alone grants no permission. |
34
+ | `Payment.present` | closed_sd_jwt, optional open_sd_jwt (default nil) → Presentation. Structural/binding checks only. |
35
+ | `Payment.verify` | closed_sd_jwt, checkout_mode (:direct/:conditional), checkout_inputs, expected_payment, trusted_provider_public_key_pem, verified_at; optional open_sd_jwt, expected_agent_public_key_pem, expected_audience, expected_nonce (all default nil) → Verification. Conditional requires all four optionals; Direct forbids them. |
36
+ | `Payment.reference` / `PaymentReceipt.reference` | closed_sd_jwt → frozen exact final-wire reference; structural validation, no authentication/authorization. |
37
+
38
+ Direct checkout_inputs is exactly the six `Buyer.verify` keywords; conditional is exactly the seven raw `verify_checkout` keywords. Both rerun complete existing Checkout verification at the same verified_at. Conditional raw inputs can be prepared using `InputBuilder.inputs`. Inputs are snapshotted before verification. The app must select expected Checkout, amount/currency/payee/instrument, keys, audience/challenge and time independently of received Payment data. Never calculate expectations by decoding received unverified Payment. Direct trusted consent backend may call issue_direct; a boolean from an Agent is not consent authentication.
39
+
40
+ `Presentation` exposes frozen open_sd_jwt (nil for Direct), closed_sd_jwt and chain. `Verification` exposes verified?, code (:payment_verified or :payment_verification_failed), immutable payment claims, reference and expires_at (nil on failure). It does not mint Checkout Evidence or an execution permit. Constructors are private. All issuance/preparation/presentation/reference failures, including missing/unknown keywords, raise redacted `Payment::Invalid < ArgumentError`, without cause. verify returns a failed Verification for missing/unknown keywords, malformed input, dependency/internal failures. Positional binding errors can raise. No failure distinguishes bad input from unavailable processing. Hold/reconcile uncertain signer outcomes before issuing again.
41
+
42
+ Wire limit is 32,769 bytes, one final `~` plus at most one content disclosure, decoded JWT body <=24,576 bytes; strict JSON duplicate/size/depth checks are reused. Checkout fields retain their existing bounds. No network/DB operations occur.
43
+
44
+ ## Payment Receipt
45
+
46
+ `PaymentReceipt.sign` requires closed_sd_jwt, issuer, outcome (Success/Error), payment_id, issued_at, signer and public_key_pem. Success additionally requires psp_confirmation_id/network_confirmation_id; Error requires error/error_description. Opposite outcome fields are forbidden. Optional outcome fields default nil. IDs and issuer are nonempty strings <=512 bytes, error_description <=2,048 bytes. A fixed redacted `PaymentReceipt::Invalid` is raised on failure. Result exposes jwt/reference.
47
+
48
+ `PaymentReceipt.verify` requires jwt, closed_sd_jwt, trusted_public_key_pem, expected_issuer, expected_payment_id, not_before, not_after and verified_at. It authenticates ES256 JWT, exact outcome-specific fields, issuer/payment ID/reference and explicit time window: not_before <= iat <= verified_at <= not_after. Result exposes verified?, code (:payment_receipt_verified/:payment_receipt_verification_failed), outcome, payment_id, confirmation IDs, error and error_description; `payment_succeeded?` and `payment_rejected?` are both false on verification failure. Failure returns no claims. Receipt authentication does not re-authorize a Mandate or establish actual payment completion; it authenticates the selected issuer's reported outcome.
49
+
50
+ ## Python/Schema differences and limits
51
+
52
+ - Schema const and normative text use `.1` vct suffix; stale descriptions omit it. Adopt const.
53
+ - Schema amounts/ranges are integer minor units; prose decimal examples are not accepted.
54
+ - Open reference is required by Schema contains; Python models allow missing reference. Ruby rejects it.
55
+ - Python preset payee matching prioritizes id and can ignore changed name/website; Ruby requires exact object. Unsupported preset PISP/risk_data reject instead of being ignored.
56
+ - Python admits broader timestamp numeric types/skew, other hashes, disclosure shapes and optional time. This profile intentionally does not.
57
+ - Python MandateClient.create always makes the content a disclosure even with empty metadata. Both complete content-disclosure and inline forms are accepted here. Its high-level chain parser fails to restore `~` for a disclosure-free root; when handling an external inline root use official verify_chain with separately parsed original segments. Ruby's issued root has a content disclosure. Interop tests use the official chain verifier, high-level MandateClient.verify for the issued disclosure-bearing root, and typed PaymentMandateChain.verify, not signature checks alone.
58
+ - Payment-specific status=Success/Error Schema wins over generic Receipt prose result naming. Ruby enforces mutually exclusive outcome fields. Python Receipt verification only checks reference-store membership; Ruby also requires independent issuer, payment ID and clock window.
59
+
60
+ ## Application responsibilities and persistence
61
+
62
+ SDK verification is not final execution approval or payment success. User authentication/consent, key storage/enrollment/revocation, current order/trust policy, actual payment, durable one-use identity and atomic reservation/consumption belong to the app. Recheck them immediately before execution. No SDK object prevents replay across calls/processes. Persist original Open/final strings and exact Checkout inputs in protected storage; use present, then reverify with current external inputs. Never deserialize a successful Verification as proof. An authentic Error is not automatic retry permission. Missing/unverifiable Receipt or uncertain processing stays pending and requires reconciliation.
63
+
64
+ After installing the candidate Gem offline, run:
65
+
66
+ ```sh
67
+ ruby -e 's=Gem::Specification.find_by_name("ap2_mandate_verifier", "1.1.0"); require File.join(s.full_gem_path, "examples/payment.rb"); PaymentExample.run'
68
+ ```
69
+
70
+ All example keys/data/outcomes are synthetic. No live processor, Rails, database or network is needed.
@@ -0,0 +1,164 @@
1
+ # 公開後の整備 / Post-release maintenance
2
+
3
+ 現在の配布版は[1.0.0](https://rubygems.org/gems/ap2_mandate_verifier/versions/1.0.0)です。フレームワーク非依存のAP2 Ruby SDKとして、対応profileにおけるDirect/条件付き購入委任の発行・提示・検証・Checkout Receipt確認を提供します。現行API・対応範囲は[PUBLIC_API](PUBLIC_API.md)・[SUPPORT_CONTRACT](SUPPORT_CONTRACT.md)、公開物と検証記録は[1.0.0公開記録](POST_RELEASE_100.md)を参照してください。[1.0.0準備記録](RELEASE_100_CANDIDATE.md)は当時の状態を残す履歴です。
4
+
5
+ The current distribution is 1.0.0, a framework-independent Ruby SDK with a stable public contract for the documented AP2 Checkout profiles. It includes Direct and conditional issuance, presentation, verification and Receipt confirmation. Historical prerelease/candidate/prepublication statements below describe their original stages, not current availability.
6
+
7
+ 実Issuer信頼・特定Host本番GO・Phase 2-BはHOLDを維持します。一般AP2互換性・Phase2-A全面PASS・E10全面GOは未成立です。EvidenceはHost ALLOW・nonce消費・決済許可ではありません。
8
+ Real Issuer trust, specific Host production GO and Phase 2-B remain HOLD. General AP2 compatibility, full Phase2-A PASS and full E10 GO are not established. Evidence is not Host ALLOW, nonce consumption or payment permission.
9
+
10
+ ## 公開物と証拠 / Artifacts and evidence
11
+
12
+ | 配布先 / Distribution | 版 / Version | bytes | SHA256 |
13
+ | --- | --- | ---: | --- |
14
+ | [RubyGems](https://rubygems.org/gems/ap2_mandate_verifier/versions/1.0.0) | 1.0.0(現行配布版 / current release) | 102,912 | `a107101b0178c54ba417be7a2bd7e22feb2fd9a07bda089043e8c5ea8e65e12b` |
15
+ | [RubyGems](https://rubygems.org/gems/ap2_mandate_verifier/versions/0.8.0) | 0.8.0(歴史記録 / historical) | 79,872 | `6c07664e4291aa8bc025b152075869322411a0d99861e1267959f1794e99acec` |
16
+ | [RubyGems](https://rubygems.org/gems/ap2_mandate_verifier/versions/0.1.0) | 0.1.0(歴史記録 / historical) | 34,304 | `37b2a235b6fab2d9d9765ae985dd9db27afd3b2c5407fe263a6b65314550db32` |
17
+ | [RubyGems](https://rubygems.org/gems/ap2_mandate_verifier/versions/0.1.0.pre.3) | 0.1.0.pre.3 | 37,888 | `8ad627818dc69b450d0fba970dafaf368ec42dd64fb51eec631731027de3882c` |
18
+ | [GitHub Release](https://github.com/cuichangquan/ap2-mandate-verifier/releases/tag/v0.1.0.pre.2) | 0.1.0.pre.2 | 33,280 | `e910659bbebda7aa5f00d63fb579f3b56819d59b5ee7d8b1734a6331f01d8de4` |
19
+
20
+ 1.0.0は2026-11-01 08:13:29.733 UTCに登録され、08:16:01 UTCに公式配布物と保持候補の完全一致、全33 payloadとsource `59e344ad865ed867d0993120456f9411d82bcdec` のtreeとの一致を確認しました。[公開receipt](evidence/1.0.0_publication.json)と[公開記録](POST_RELEASE_100.md)が根拠です。
21
+ The official 1.0.0 distribution matches the exact retained candidate and all 33 payloads of the release source. Source association comes from that byte/payload comparison, not RubyGems source attestation.
22
+
23
+ 過去の0.8.0の公式配布物は保持候補およびsource `5a7394c1b98f000b321423e2c2f80d50b5157808` の全29 payloadと照合済みです。公開日時・照合・対応MRIでの公式Gem導入確認は[0.8.0公開記録](POST_RELEASE_080.md)に保持します。この表は現行版と以下の歴史記録の対象を示し、全リリース一覧ではありません。
24
+ The 0.8.0 observations remain evidence for that release. The table preserves the historical artifacts discussed below; it is not a complete version inventory.
25
+
26
+ ### 歴史記録:0.1.0公開 / Historical 0.1.0 publication
27
+
28
+ 0.1.0はOwnerのexact-artifact S7承認後、2026-10-26 08:35:32 UTCに公開。08:37:27 UTCの照合で公式版一覧・所有者`cuichangquan`・実配布bytes・保持R2のSHA/sizeが一致し、13 payload/18 source manifest項目も照合済みです。[公開receiptと限界](../research/stable010_release_linux_package/README.md#rubygems-publication-verified)が根拠です。版別APIの初回404とMFA停止は当時の記録として保持し、公開後照合で再pushはしていません。GitHubのsource snapshotは配布Gemと同一bytesではありません。
29
+ Stable 0.1.0 publication was verified against official versions/owners metadata and the downloaded distribution. This exact-artifact S7 approval does not grant actual Host production GO or authorize a later release. Published artifacts and original validation evidence remain immutable.
30
+
31
+ ### 歴史記録:pre.3/pre.2 / Historical prereleases
32
+
33
+ pre3は2026-10-23に所有者 `cuichangquan` が公開し、Ownerが公式API・実配布物・MBA原本の一致を確認しました。
34
+ 今回のMac mini監査ではRubyGems閲覧取得不能/APIへのDNS解決失敗のため独立再確認できていません。
35
+ これは昨日の公開検証記録を否定するものでも、今回の再検証成功を示すものでもありません。
36
+ The Owner's 2026-10-23 publication check matched the official API, distributed
37
+ pre3 archive and MBA original under owner `cuichangquan`. The subsequent Mac mini
38
+ audit could not independently refetch RubyGems (page/API retrieval unavailable,
39
+ local API DNS resolution failed); it does not constitute another successful
40
+ publication validation.
41
+
42
+ [PR177](https://github.com/cuichangquan/ap2-mandate-verifier/pull/177) records
43
+ `MBA409-PRE3PACKAGE02-20261023`: MBA Darwin arm64, MRI4.0.9,13 payload identities,
44
+ 10 loaded libraries and52 installed checks (42 saved independent expectations,
45
+ 7 legacy APIs,2 input rejections,1 constructor rejection). It did not rerun885
46
+ source regressions. **pre3 Linux subsequently passed [run40038620413 attempt1](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/40038620413).** The earlier NOT_RUN status was historical and is superseded by that pre3 observation. The successful pre2 Linux
47
+ [run39939021098 attempt1](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/39939021098)
48
+ is historical pre2 evidence, not a pre3 package or independent Linux Oracle run.
49
+ Unknown safety, runtime/native attestation and worst-case CPU/RSS/concurrency
50
+ remain unproved; historical communication-accounting gaps remain unresolved.
51
+
52
+ ## 文書と再公開の境界 / Documentation and publication
53
+
54
+ READMEとSUPPORT_CONTRACTはGem同梱対象です。公開Gem内の文書は包装時点のスナップショットとして保持し、
55
+ 「RubyGems未公開」等の古い記載はmainの文書で追補します。現在のmainは同梱文書と異なります。
56
+ 同じ版を再ビルドしても公開Gemと同一ではなく、公開SHA・包装検証を引き継ぎません。
57
+ 公開Gem・タグ・Releaseは上書きせず、文書訂正だけの再リリースは行いません。
58
+ Gemの次版が必要になったときに、同梱文書・候補metadataを別途見直します。
59
+ README and SUPPORT_CONTRACT are packaged files. Published copies remain immutable
60
+ packaging snapshots; main supplements their stale unpublished wording. Current
61
+ main differs from packaged documentation. A same-version rebuild is not the
62
+ published artifact and inherits neither its SHA nor package-validation evidence.
63
+ Do not overwrite published Gems, tags or Releases. Documentation corrections alone
64
+ do not require a new Gem release. Review packaged documents and candidate metadata
65
+ when a separately approved next version is needed.
66
+
67
+ ## 受付 / Reporting
68
+
69
+ - 通常の不具合・導入問題 / Ordinary bugs and installation issues:
70
+ [GitHub Issues](https://github.com/cuichangquan/ap2-mandate-verifier/issues).
71
+ Include Gem version, artifact SHA if known, Ruby/OS/dependency versions,
72
+ sanitized minimal synthetic reproduction, expected/actual behavior and scope.
73
+ - 脆弱性 / Suspected vulnerabilities: follow [SECURITY.md](../SECURITY.md).
74
+ Do not publish exploit details in Issues or PRs. Never include credentials,
75
+ private keys, real Mandates/nonces or personal data in either reporting route.
76
+ - Owner `cuichangquan` is the initial maintainer contact through these GitHub
77
+ routes. Triage distinguishes reproducible defects, unsupported profiles,
78
+ environment failures and security concerns. No response/fix deadline or
79
+ production support commitment is promised.
80
+
81
+ ## 1.xの保守・互換性方針 / 1.x maintenance and compatibility
82
+
83
+ 以下は1.0.0の公開から適用する保守方針です。公開面の対象は[PUBLIC_API](PUBLIC_API.md)、対応profile・信頼前提・環境は[SUPPORT_CONTRACT](SUPPORT_CONTRACT.md)に定義します。0.x等の旧版へ新しい保守保証を与えるものではありません。
84
+
85
+ - **保守対象:** 1.xでは、最新の1.xマイナー系列の最新patchを対象とします。新しい1.xマイナーが公開された後、以前のマイナー系列・0.x・preへのbackportは約束しません。固定保守年数、受付・修正・開示期限、SLA、24時間対応も約束しません。重大未対処問題や保守不能が判明した場合はHOLDとし、対象版・理由・利用者が取れる対応を明記します。
86
+ - **patch:** 文書化された公開契約を保つ不具合修正です。以前誤って受理した不正・未対応入力を拒否して既存契約を回復するセキュリティ修正は含み得ます。その場合も影響版・受理範囲の変化・理由・必要な移行を開示します。
87
+ - **minor:** 既存の公開契約を保つAPI追加、明示選択するprofileの追加、非推奨化の告知です。既定profileや保存済み原文の扱いを黙って変更しません。非推奨化するAPIは移行先を示してminorで告知し、削除は次のmajor以降とします。固定の暦日猶予は設けません。
88
+ - **major:** 公開API、結果・エラーの契約、既定動作、既存profileの受理条件、保存形式、対応環境に対する非互換変更です。セキュリティ対策という理由だけで、文書化された契約変更を互換patchとして扱いません。必要な修正を互換性のために放置せず、影響と移行を明示して適切な版で対応します。
89
+
90
+ The 1.x policy maintains only the latest patch of its latest minor series. No backports to older minors, 0.x or prereleases, fixed support term, response/fix/disclosure deadlines or SLA are promised. Patch releases preserve the documented public contract; minor releases add compatible capabilities or announce deprecations with migration guidance; incompatible public-contract changes require a major release. Deprecations are announced in a minor release, with removal no earlier than the next major and no fixed calendar notice period.
91
+
92
+ Security fixes may reject inputs previously accepted in violation of the documented contract, including in a patch release, with affected versions, reasons and migration disclosed. An actual documented-contract change is not automatically patch-compatible because it is security-related. Unsupported profiles, real Issuer trust and Host/payment duties are not brought into scope by the 1.0.0 version number. Dependency updates require an explicit compatibility assessment; they are not automatically compatible.
93
+
94
+ ## 依存と回帰 / Dependencies and regression
95
+
96
+ 担当はOwner/保守者です。Owner採用済みの手動見直し頻度は月1回、および関連advisory判明時・次版判断前です。
97
+ 1.xの保守対象は前節のとおりです。現行1.0.0の報告窓口は維持しますが、旧版backport・固定保守年数・SLAは約束しません。
98
+ これは定期監視・自動実行・対応期限が稼働中だという宣言でも、実行の包括承認でもありません。
99
+ 2026-10-24 JSTの設定確認ではPrivate vulnerability reportingを有効化し、Dependabot alerts/security updatesは無効、version更新用設定ファイルはなしと記録しました。
100
+ これは当時の設定記録であり、今回の文書整備では現在の設定の再確認やDependabot・CI・認証設定の変更はしていません。
101
+ The Owner-adopted manual cadence is monthly, on relevant advisory discovery
102
+ and before a next release. The 1.x maintenance scope is above; the current
103
+ 1.0.0 reporting routes remain available without a backport or SLA promise. This is
104
+ not an active scheduled monitor, automatic execution authority or response/fix
105
+ deadline. The 2026-10-24 JST setting record is historical: private reporting was
106
+ enabled, Dependabot alerts/security updates were disabled and no version-update
107
+ configuration was present. This documentation update neither rechecks nor changes
108
+ those settings.
109
+
110
+ 1.0.0でも正式対応環境は広げません。MRI **3.4.12 / 4.0.9**、JSON **2.19.9**、JWT **3.3.0**、base64 **0.3.0**、OpenSSL gem **4.0.2**、Digest **3.2.1**の固定を維持します。RubyGemsの`>= 3.4.12, < 4.1`は依存解決範囲であり、その範囲の全Ruby版・他engine・OS/providerを検証済みとするものではありません。実測環境は各版の検証記録で区別します。
111
+ Formal runtime support remains exactly MRI 3.4.12 and 4.0.9 with the five dependency pins above. The Gem's Ruby resolution interval does not certify all versions or engines within it, or unmeasured OS/native-provider configurations.
112
+
113
+ Before proposing an update, assess official Ruby/JSON/JWT/base64/OpenSSL/Digest
114
+ advisories and the actual native providers, affected scope and reproducibility.
115
+ Keep exact dependency pins until a scoped change is approved; do not silently
116
+ accept a later provider or relabel historical manifests/results.
117
+
118
+ 文書のみの変更はリンク・日英整合・版/SHA・証拠範囲・CI triggerを静的確認します。
119
+ 依存/コード/包装を変更する場合は、差分に応じて現行のVerifier・InputBuilder・署名/Receipt・Direct・条件付き委任の回帰と、必要な独立正常・因果負例/Schema比較を計画します。
120
+ 新しい配布候補では、対応MRIごとの通常インストール、候補metadata、全payloadのsource/archive/installed一致、公開APIだけを使う例を確認します。実施範囲・件数・未実施はその版の記録に保存し、旧版の固定件数を現在の合格基準や新しいPASSとして流用しません。
121
+ 新しい結果は版・source SHA・runtime/provider・入力/期待値・環境・runを区別して保存します。
122
+ Linuxの保存期待値再生を独立Oracle再実行とは呼びません。失敗・未知・不一致はSTOP/HOLDです。
123
+ For documentation-only changes, statically check links, bilingual consistency,
124
+ version/SHA identities, evidence scope and CI triggers. Dependency/code/package
125
+ changes need a diff-based validation plan covering the affected current modules
126
+ and relevant independent positive/causal-negative or Schema comparisons. New
127
+ candidates require ordinary installation on both supported MRI versions, metadata
128
+ and complete source/archive/installed payload comparisons, and public-API examples.
129
+ Record the actual scope, counts and NOT_RUN work per release rather than copying
130
+ old counts or PASS results. Preserve new evidence separately by version, source SHA,
131
+ runtime/provider, inputs/expectations, environment and run. Saved-expectation
132
+ replays are not independent Oracle reruns. Failure, uncertainty or mismatch means
133
+ STOP/HOLD. Builds, installs, dynamic tests, Actions, dependency changes and releases
134
+ need their own explicit scope/approval; this document grants none.
135
+
136
+ The [1.0.0 publication record](POST_RELEASE_100.md) identifies the current distribution and its evidence. The [1.0.0 preparation record](RELEASE_100_CANDIDATE.md) and [0.8.0 publication record](POST_RELEASE_080.md) retain their historical identities; old pending states and results are not relabelled as fresh checks.
137
+
138
+
139
+ ## 歴史記録:未公開0.1.0候補と採用済み保守条件(2026-10-26 UTC)
140
+
141
+ 公開物の表はpre3/pre2のままです。**0.1.0は未公開候補**であり、[候補source・Mac/Ubuntu結果](../research/stable010_candidate/README.md)を別記録に保存します。候補43,008B / SHA256 `0553645fa6c067dd8d7a7a1a7cdf13799370393e76dc3bc4ba161ab2ca5981b0`、両環境13 payload/10 loaded/52 installedが確認済み。候補内の未実施記述は包装時点snapshotで、後続Ubuntu成功は外部追補を参照してください。再包装や公開済みGem/tag/Releaseの上書きはしません。
142
+
143
+ 前節の月次/勧告時/次版前の手動見直しをOwnerが具体条件として採用しました。担当はOwner/保守者、通常不具合はIssues、脆弱性はSECURITYの非公開窓口です。初回安定系列の最新修正版のみを対象とし、pre/旧系列backport・一定年数・受付/修正期限・24時間対応は約束しません。更新/廃止/保守終了は対象版・理由・移行先と状態を告知し、固定猶予期間は設けません。自動監視は稼働中と扱わず、担当不在/保守不能/重大未対処問題はHOLDです。
144
+
145
+ 上記の一般的な回帰計画は全件再実行の義務ではありません。今回の版/文書/包装期待値の差分では、製品10件・固定依存と既存証拠を照合して885を再利用し、新候補の包装/導入を両環境各1回確認しました。147は885の内数、旧runtime独立比較や保存期待値再生は新独立Oracleではありません。追加検証は具体的不足に応じ別承認とし、今回追加試験/取得/build/Actions/公開はなしです。
146
+
147
+ Provider/component確認と全面安全性は別です。D1/D2停止とD3限定成功、JSON公式修正ソース根拠とGHSA metadata不整合、OS dyld/全binding・通信全量・物理容量peak等の未証明を保持します。最後にexact archive・配布先・保証範囲・残余を示すS7公開GOが必要で、特定Host本番GOは別/HOLDです。
148
+
149
+ The public-artifact table still lists pre3/pre2 only. Candidate0.1.0 has separate Mac/Ubuntu evidence; its packaging snapshots are supplemented externally without rebuilding. Adopted maintenance covers the latest patch in the initial stable series, with manual monthly/advisory/pre-release review, existing reporting routes and explicit update/deprecation notices; no backport/fixed-term/SLA/24-hour promises or automatic monitoring. Diff-based historical evidence reuse is not a fresh885 run. Publication and specific Host production GO remain separate and unapproved.
150
+
151
+
152
+
153
+ ## Historical R2 preparation / 歴史記録:公開向け文書のR2
154
+
155
+ The0.1.0 consumer documentation now describes the fixed verification contract and installation only after official listing, without declaring publication. Earlier candidate/R1/pre3 descriptions above are historical. A newly built R2 archive has separate [source and validation evidence](../research/stable010_release_linux_package/README.md); R1's43,008B archive and observations are not reused as new-byte validation. Existing maintenance scope/reporting routes/exclusions remain unchanged. RubyGems publication and specific Host production GO still require separate authorization.
156
+
157
+ 0.1.0の公開向け文書を整理しましたが、公開済みとは表示しません。旧candidate/R1/pre3は履歴として保持し、新R2は別archive・別証拠です。採用済み保守条件・窓口・保証除外は不変で、Gem公開GO・特定Host本番GOは別途必要です。
158
+
159
+
160
+ ## Historical prepublication supplement / 歴史記録:公開前R2検証追補
161
+
162
+ The new34,304B R2 archive (SHA256 `37b2a235b6fab2d9d9765ae985dd9db27afd3b2c5407fe263a6b65314550db32`) passed Mac and [Ubuntu run40288305150 attempt1](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/40288305150) payload13/loaded10/installed52 checks with matching payload/dependency identities. See [exact results and limitations](../research/stable010_release_linux_package/README.md). This is distinct from R1/pre3, not a new885 or independent Oracle run. Source/packaged bytes remain frozen. No Gem, tag or Release publication occurred; S7 and specific Host production GO remain HOLD. Existing maintenance policy and reporting routes are unchanged.
163
+
164
+ 新R2はMac/Ubuntuで限定包装検証済みですが未公開です。provider確認を全面安全性へ昇格せず、JSON勧告metadata不整合、OS dyld/全binding、総通信/physical peak等の未証明を保持します。原結果のhash/読戻し後に今回分だけを清掃し、旧停止履歴・証拠・archiveは保持。追加build/試験/Actions/取得はこの追補作業では行いません。