ap2_mandate_verifier 0.1.0.pre.3 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +114 -203
- data/docs/SUPPORT_CONTRACT.md +58 -15
- data/lib/ap2_mandate_verifier.rb +3 -0
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa2ea5451e11d660fac34e24d6ceb56364f40e35cceab36e1c07d065eee5c39b
|
|
4
|
+
data.tar.gz: 52a9bbc66525cff272c186da35fb1f3441d886a973a0e6c292477cff1ab3f61f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bfadcb64ea84e9215ed19936468894d93015c89961aad6a912acb780ab8c7d27902dcd5acf664d79700d50054341a957a573a91e172a45bd61f246df468a9d59
|
|
7
|
+
data.tar.gz: a39f11ead57b553dcf8c2b4b8dcba57ae2a0309d4183ecad9a7607988f2593fcdbe577ae81d9caf2b3232b62b2cc7f8d80471e40cbe025ffe7c658cb6b31010a
|
data/README.md
CHANGED
|
@@ -1,62 +1,93 @@
|
|
|
1
|
-
# AP2 Mandate Verifier
|
|
1
|
+
# AP2 Mandate Verifier — 0.2.0 release preparation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Japanese / 日本語](README.ja.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
stateless verifierです。署名・原Root全域開示・委任・購入原文・Host binding・固定制約・
|
|
7
|
-
有効期間がすべて成立したとき、opt-in `verify_research`が不変な研究Evidence v2を返します。
|
|
8
|
-
**Evidenceは購入許可・nonce消費・決済完了ではありません。**
|
|
5
|
+
A Rails-independent Ruby Gem for a deliberately fixed AP2 verification profile. **A valid signature alone never authorizes a purchase.** Successful checks produce immutable Evidence; the Host makes the final business decision.
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
GitHubでは固定profile・研究用途限定のpre2を公開済みです。RubyGemsへの公開と、このREADMEを含む新候補の実配布は別の明示承認待ちです。stable release・本番・Phase2-A全面合格・Phase2B・E10全面GOではありません。
|
|
7
|
+
## Start with the local demo
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
USD/EUR/JPY、空links。一般AP2/全Schema/任意Issuerの互換性は保証しません。
|
|
15
|
-
実Issuer/鍵/profile登録・最新性・信頼時計と、最新注文/challenge再照合+原子的nonce消費・
|
|
16
|
-
注文CAS・決済はHost責務です。GemはDB・ネットワーク・支払いを実行しません。
|
|
9
|
+
The [AP2 Mandate Verifier Demo](https://github.com/cuichangquan/ap2-mandate-verifier-demo) calls the real verifier on synthetic valid, tampered and expired examples, with Docker local-startup instructions; it is not a hosted demo site, production payments or Host authorization.
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
For a Japanese walkthrough of the three demo scenarios, see the [Zenn article](https://zenn.dev/ccq/articles/7f9643f96fe5c7).
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
## Choose your starting point
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
| Route | Start here |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| Docker demo: compare three synthetic cases | Follow the [demo README](https://github.com/cuichangquan/ap2-mandate-verifier-demo#readme) for local startup and valid / tampered / expired examples. Docker commands are maintained there. |
|
|
18
|
+
| Ruby without the demo: existing MRI 4.0.9 | Follow [installation](#distribution-and-installation), then the [saved synthetic example](#try-the-saved-synthetic-example) below. |
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
Both routes use the fixed-profile verifier, not payment execution or Host authorization. See the [supported contract](#supported-contract) for the scope. The goal is to make the choices understandable in about five minutes, not to promise a five-minute installation or build.
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| Ruby | MRI **4.0.9**。他のRuby版・engineは対象外 / Other versions and engines are outside this candidate's contract. |
|
|
31
|
-
| Runtime Gems | `json = 2.19.9`, `jwt = 3.3.0`, `base64 = 0.3.0`, `openssl = 4.0.2`, `digest = 3.2.1` |
|
|
32
|
-
| Native providers | 利用するRuby用のOpenSSL/JSON拡張が必要。Gem本体はnative binaryを含まない / Compatible OpenSSL and JSON extensions are required; this Gem contains no native binaries. |
|
|
33
|
-
| 観測環境 / Observed systems | **pre3実パッケージ:MBA Darwin arm64のみ。pre3のLinux検証は未実施。** Ubuntu24.04 x86_64の成功run39939021098はpre2の歴史証拠であり、pre3の実行証拠ではない / **pre3 package: MBA Darwin arm64 only; pre3 Linux NOT_RUN.** Successful Ubuntu24.04 x86_64 run39939021098 is historical pre2 evidence, not a pre3 execution. No guarantee for every macOS/Linux configuration. |
|
|
22
|
+
## Distribution and installation
|
|
34
23
|
|
|
35
|
-
|
|
24
|
+
[0.1.0 is published on RubyGems](https://rubygems.org/gems/ap2_mandate_verifier/versions/0.1.0). This is the fixed-profile, verifier-only stable release; the research prerelease pre3 is a separate artifact.
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
Use an existing MRI 4.0.9 environment and your chosen Gem isolation. Normal installation may fetch dependencies and build JSON native extensions. Stop on conflicts or unknown providers rather than relaxing pins.
|
|
38
27
|
|
|
39
28
|
```sh
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
ruby --version # MRI 4.0.9 required
|
|
30
|
+
gem install ap2_mandate_verifier --version 0.1.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Bundler Gemfile:
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
gem "ap2_mandate_verifier", "= 0.1.0"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Fixed runtime dependencies: JSON 2.19.9, JWT 3.3.0, base64 0.3.0, OpenSSL gem 4.0.2 and Digest 3.2.1.
|
|
40
|
+
Bundler 4.0.20 is the observed resolver baseline, not a runtime dependency. Gem version constraints alone do not enforce the MRI engine, OS or native-provider provenance.
|
|
41
|
+
|
|
42
|
+
## Verification APIs: published 0.1.0 and unreleased 0.2.0
|
|
43
|
+
|
|
44
|
+
**The commands and saved example below remain the published 0.1.0 route using `verify_research`.** Repository metadata is now a 0.2.0 release candidate, with `verify_checkout` as its recommended full entry. This documentation does not announce a 0.2.0 publication or provide a registry installation command for it; installing 0.1.0 does not provide this method.
|
|
45
|
+
|
|
46
|
+
| Entry | Availability and contract |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `verify_checkout(**inputs)` | Recommended full-verification entry for unreleased v0.2.0 source. Delegates directly to `ResearchResult.verify` without changing inputs or the verification pipeline. |
|
|
49
|
+
| `verify_research(**inputs)` | Full-verification entry in published 0.1.0; retained unchanged in v0.2.0, without a deprecation warning. |
|
|
50
|
+
| `verify(presentation_json:)` | Existing JSON syntax check only. Valid JSON returns `:unverified` / `:verification_not_implemented`, never successful Evidence. It is not a substitute for full verification. |
|
|
51
|
+
|
|
52
|
+
For a separately validated 0.2.0 candidate installation, replace only the call in the saved example with the recommended entry below. All seven values come from that example's `full` object; real integrations must supply the authenticated Host inputs described below. Use a registry install route only after publication is confirmed:
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
result = AP2MandateVerifier.verify_checkout(
|
|
56
|
+
trust_json: full.fetch("trust_json"),
|
|
57
|
+
selection_json: full.fetch("selection_json"),
|
|
58
|
+
host_json: full.fetch("host_json"),
|
|
59
|
+
root_presentation: full.fetch("root_presentation"),
|
|
60
|
+
terminal_jws: full.fetch("terminal_jws"),
|
|
61
|
+
host_checkout_jws: full.fetch("host_checkout_jws"),
|
|
62
|
+
verified_at: full.fetch("verified_at")
|
|
63
|
+
)
|
|
47
64
|
```
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
Both full-verification entries require all seven inputs listed under [responsibility boundaries](#real-inputs-and-responsibility-boundaries): six original Strings and externally supplied integer Unix seconds. Seven inputs and seven supported shapes are different concepts. Neither entry broadens the fixed profile below or supplies missing trust, Host state or time. Missing or unknown keywords return `:unavailable` / `:research_verification_unavailable`, with `success? == false` and `evidence == nil`; positional arguments or invalid keyword expansion can raise before verification begins.
|
|
67
|
+
|
|
68
|
+
The [result handling](#understanding-the-result) is unchanged: success remains `ResearchResult` with `:verified_research` / `:scoped_research_verified` and immutable Evidence v2; rejected and unavailable results have no Evidence. Evidence is checked facts, **not purchase authorization**. Exceptions or missing results must also stop the caller. See the [API migration plan](docs/V0_2_0_API_PLAN.md) for design history; its earlier implementation gates do not describe the published 0.1.0 artifact or replace this availability distinction.
|
|
69
|
+
|
|
70
|
+
## Supported contract
|
|
71
|
+
|
|
72
|
+
- AP2 pinned source `b4587ac1d055888a73b4b21750973cffba961793`, registered profile `ap2.checkout.single_merchant_sku` v1: exact body/hash and seven supported shapes.
|
|
73
|
+
|
|
74
|
+
- ES256/P256, Open1→Closed1, three fixed disclosure positions, one Merchant/SKU/line, USD/EUR/JPY and empty links; unknown/unsupported forms are rejected.
|
|
50
75
|
|
|
51
|
-
|
|
76
|
+
- The Gem checks strict bounded inputs, supplied trust selection, signed Root wire and full supported closure, Agent/Merchant signatures, delegation, purchase/Host binding, types, constraints and time.
|
|
52
77
|
|
|
53
|
-
|
|
78
|
+
- Both full-verification entries above preserve `verified_research` / `scoped_research_verified` result names and the Evidence v2 contract; a stable version does not imply generic AP2 support or Host authorization.
|
|
54
79
|
|
|
55
|
-
|
|
80
|
+
See [SUPPORT_CONTRACT](docs/SUPPORT_CONTRACT.md) for exact required shapes, bounds and failure codes.
|
|
56
81
|
|
|
57
|
-
##
|
|
82
|
+
## Environment, compatibility and maintenance
|
|
58
83
|
|
|
59
|
-
|
|
84
|
+
The baseline is MRI 4.0.9 with fixed dependencies and the exact observed MBA/macOS arm64 and Ubuntu 24.04/x86_64 configurations. Distinguish [release-package/provider evidence](research/stable010_release_linux_package/README.md) from [historical environment records](docs/VERIFIER_CORE_COMPLETION_CRITERIA.md#初回の対応環境保証範囲owner採用済み). Other OS versions, engines, architectures and arbitrary provider updates are not covered.
|
|
85
|
+
|
|
86
|
+
Supported-input semantics and APIs do not change silently. Security-driven narrowing identifies reason, impact and migration; breaking API/required-field/profile changes are explicit. Dependency updates are not automatically compatible.
|
|
87
|
+
|
|
88
|
+
Maintenance covers the latest patch in the initial stable series, with manual monthly/advisory/pre-release review. No old-series backport, fixed support term, response/fix deadline or 24/7 promise. See [SECURITY](SECURITY.md) and [maintenance](docs/POST_RELEASE_MAINTENANCE.md); never report private keys, real Mandates or personal data.
|
|
89
|
+
|
|
90
|
+
## Try the saved synthetic example
|
|
60
91
|
|
|
61
92
|
This example reads the same public `FULL` input used by the successful installed-Gem checks. The input JSON is not packaged in the Gem. Fetch it from the pinned commit and verify its SHA256 first. It contains no private keys. Its trust/Host assertions are **synthetic test data**, not real Issuer enrollment, a current order or a live clock. `verified_at = 1800000000` is the saved scenario's fixed evaluation time.
|
|
62
93
|
|
|
@@ -94,206 +125,86 @@ result = AP2MandateVerifier.verify_research(**inputs)
|
|
|
94
125
|
puts "status=#{result.status} code=#{result.code}"
|
|
95
126
|
if result.success?
|
|
96
127
|
checked_facts = result.evidence.to_h # Detached, deeply frozen in-process facts.
|
|
97
|
-
puts "
|
|
128
|
+
puts "Scoped verification succeeded; this is NOT purchase authorization."
|
|
98
129
|
# No payment, order update or nonce consumption is performed here.
|
|
99
130
|
else
|
|
100
|
-
raise "
|
|
131
|
+
raise "Verification did not succeed; stop."
|
|
101
132
|
end
|
|
102
133
|
```
|
|
103
134
|
|
|
104
|
-
この保存 `FULL` ケースの期待値は `status=:verified_research`、`code=:scoped_research_verified`、`success?=true` です。実入力・不支持入力・依存障害では同じ結果を期待しません。非成功ならEvidenceはnilです。例外やプロセス終了で結果がない場合も停止してください。Evidence全体やraw入力を安易にログへ出さないでください。
|
|
105
|
-
|
|
106
135
|
For this saved `FULL` case, the expected result is `status=:verified_research`, `code=:scoped_research_verified`, `success?=true`. This is not the expected outcome for arbitrary real inputs, unsupported forms or dependency failures. Non-success results have nil Evidence. Exceptions or process termination without a result must also stop the caller. Avoid logging complete Evidence or raw inputs.
|
|
107
136
|
|
|
108
|
-
##
|
|
137
|
+
## Understanding the result
|
|
109
138
|
|
|
110
|
-
|
|
|
111
|
-
| --- | --- |
|
|
112
|
-
|
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `root_presentation` | disclosure順と末尾`~`を維持した署名付きRoot提示原文String / Original signed Root presentation String, preserving disclosure order and trailing `~`. |
|
|
116
|
-
| `terminal_jws` | Agent terminal compact JWS原文String / Original Agent terminal compact JWS String. |
|
|
117
|
-
| `host_checkout_jws` | Hostが固定したMerchant Checkout compact JWT原文String / Original Merchant Checkout compact JWT String frozen by the Host. |
|
|
118
|
-
| `verified_at` | 外部の信頼時計から供給する整数Unix秒 / Integer Unix seconds supplied by an external trusted clock. |
|
|
139
|
+
| Outcome | `status` and predicate | Evidence and handling |
|
|
140
|
+
| --- | --- | --- |
|
|
141
|
+
| Successful scoped verification | `:verified_research`; `success? == true`; `code == :scoped_research_verified` | Present: checked facts, **not purchase authorization**. Host responsibilities still apply. |
|
|
142
|
+
| Rejected | `:rejected`; `rejected? == true` | Absent (`nil`). Stop; inspect `result.code` for the rejection reason. |
|
|
143
|
+
| Verification unavailable | `:unavailable`; `unavailable? == true` | Absent (`nil`). Stop; a dependency or verification failure does not by itself establish that the input is invalid. |
|
|
119
144
|
|
|
120
|
-
|
|
145
|
+
An exception, process termination or missing result must also stop the caller without authorizing a purchase. The example above deliberately stops on every non-success result. See [Result and Evidence](docs/SUPPORT_CONTRACT.md#result-and-evidence) for details.
|
|
121
146
|
|
|
122
|
-
|
|
147
|
+
## Real inputs and responsibility boundaries
|
|
123
148
|
|
|
124
|
-
|
|
149
|
+
| Keyword | Input contract |
|
|
150
|
+
| --- | --- |
|
|
151
|
+
| `trust_json` | Original JSON String for authenticated Host trust snapshot, profile and public-key registration. |
|
|
152
|
+
| `selection_json` | Independently selected tenant, profile version and role/identity/purpose/key references. |
|
|
153
|
+
| `host_json` | Authenticated current order binding, issued challenge, expected issuer and clock identity. |
|
|
154
|
+
| `root_presentation` | Original signed Root presentation String, preserving disclosure order and trailing `~`. |
|
|
155
|
+
| `terminal_jws` | Original Agent terminal compact JWS String. |
|
|
156
|
+
| `host_checkout_jws` | Original Merchant Checkout compact JWT String frozen by the Host. |
|
|
157
|
+
| `verified_at` | Integer Unix seconds supplied by an external trusted clock. |
|
|
125
158
|
|
|
126
|
-
|
|
159
|
+
See [SUPPORT_CONTRACT](docs/SUPPORT_CONTRACT.md#full-entry-and-required-inputs) for exact required shapes, types and limits. Do not register trust from the presented token or parse/re-encode/reorder signed wire input. Matching Host-only Buyer/account fields does not establish Issuer-signed identity authentication.
|
|
127
160
|
|
|
128
|
-
|
|
129
|
-
host_checkout_jws/verified_atです。前3つのJSONは認証済みの独立Host入力として渡し、
|
|
130
|
-
提示tokenの自己申告から信頼を追加しません。raw nonceは入力専用、EvidenceにはSHA256だけを
|
|
131
|
-
投影します。Hash/JSONへ書き出したものを真正なEvidenceとして再入力するAPIはありません。
|
|
161
|
+
A successful result from either full-verification entry establishes scoped verification facts. The Host still must recheck latest trust/revocation/order version/challenge/time and atomically consume the nonce with order CAS. The Gem does not perform those operations. Serializing Evidence to JSON does not preserve or reconstruct authenticity through this API. Legacy `verify(presentation_json:)` checks only the JSON syntax boundary and never returns successful Evidence.
|
|
132
162
|
|
|
133
|
-
|
|
134
|
-
evidence=nilを維持します。呼出し例のsuccess?を旧APIへ流用してはいけません。
|
|
163
|
+
Before integration, consult the [Issuer onboarding checklist](docs/ISSUER_ONBOARDING_CHECKLIST.md) and [Issuer/Host minimum contract](docs/ISSUER_HOST_MINIMUM_CONTRACT.md). Real-Issuer trust and a specific Host's production GO are not established by this Gem version or verification success. The contract and Host/DB code under `research/` describe synthetic research designs and limited observations, not a production adapter.
|
|
135
164
|
|
|
136
|
-
|
|
165
|
+
Raw nonce values are input-only; Evidence projects their SHA256. Other low-level verification entries also keep `success?=false` and `evidence=nil`; do not apply the successful example to those entries.
|
|
137
166
|
|
|
138
|
-
|
|
139
|
-
以下のMBA409ランタイム導入・885回帰と後続Linuxの記録はpre2の歴史証拠です。pre3の包装/導入観測とは分けて扱います。
|
|
140
|
-
The MBA409 runtime/885-regression records and subsequent Linux run below are historical pre2 evidence, separate from pre3 package/install observations.
|
|
167
|
+
## Exclusions and safe stopping
|
|
141
168
|
|
|
142
|
-
|
|
143
|
-
Rubyの任意DTrace/USDT診断プローブは公式--disable-dtrace構成で無効です。今回の記録は`MBA409-20261023-BUILD01`(configure中の一時ファイル競合で監視停止)、`BUILD02`(導入成功)、`VALIDATION01`(新ランタイムの885回帰)、`PACKAGE01`(元の包装・導入検査)、`PACKAGE02`(証拠参照訂正後の包装・導入検査)として区別します。対応するローカルreport/source manifestは[契約文書の証拠識別表](docs/SUPPORT_CONTRACT.md#evidence-identifiers-for-this-runtime-update)を参照してください。旧MBA408・Ruby4.0.1の結果は別の歴史証拠です。包装時点ではLinux4.0.9は未実施でした。その後[run39939021098 attempt1](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/39939021098)で885回帰・installed52・13payload/10loadedが合格し、MBAとpayload/依存metadataが一致しました。これは保存MBA期待値の再入力であり、Linuxで独立Oracleを再実行したものではありません。Ubuntu実ロードlibssl/libcryptoは`libssl3t64:amd64 3.0.13-0ubuntu3.16`の所有権・整合性まで確認しています。
|
|
144
|
-
The packaged pre2 documents describe the MBA packaging snapshot. Subsequent [Linux run39939021098 attempt1](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/39939021098) passed885 source and52 installed checks,13 payload/10 loaded identities, with MBA payload/dependency metadata matching. These replayed saved MBA expectations; the Linux independent Oracle was not rerun. Actual mapped Ubuntu libraries were owned by verified `libssl3t64:amd64 3.0.13-0ubuntu3.16`. The attached Gem and tag remain unchanged.
|
|
169
|
+
General AP2/full Schema, arbitrary real-Issuer interoperability, issuance/presentation/Receipt generation, Rails adapters, real payments/Host/DB/revocation operations, worst CPU/RSS/concurrency and numerical SLAs are outside scope. No defect-free/all-path safety proof is claimed; exclusions do not excuse known major defects or missing Gem checks.
|
|
145
170
|
|
|
146
|
-
|
|
147
|
-
ライブラリのwall-clock/RSS/並行数上限はなく、Hostが運用上の制限を設ける必要があります。
|
|
171
|
+
The Host supplies authenticated token-independent trust/keys/profile and current revocation/clock/order/challenge state, rechecks before use, atomically consumes nonce with order CAS, reconciles PENDING and decides ALLOW. Existing Gem checks remain Gem responsibilities. Evidence is in-process checked facts in trusted Ruby, not a transport credential. Unknown/rejected/unavailable/exception/missing results never authorize; the Host provides outer time/memory/concurrency limits.
|
|
148
172
|
|
|
149
|
-
|
|
150
|
-
Ubuntu24.04 x86_64で885回帰・42固定入力の再現を観測しました。
|
|
151
|
-
[Linux run39774818984](https://github.com/cuichangquan/ap2-mandate-verifier/actions/runs/39774818984)は
|
|
152
|
-
MBA独立期待値30+境界12のGem再入力であり、Linux Oracle再実行ではありません。
|
|
153
|
-
8Schema対照はMBA根拠です。これらは後にGitHub公開した0.1.0.pre.2の包装/導入結果とは別の観測で、
|
|
154
|
-
旧manifest/pin/結果は更新していません。候補の新結果はローカル別保存、配布物には含めません。
|
|
173
|
+
## Evidence and history
|
|
155
174
|
|
|
156
|
-
|
|
157
|
-
研究資料はresearch/配下へ整理済みです。独自runtime/supervisorの開発へ戻りません。
|
|
175
|
+
A prior 0.2.0 candidate passed the limited Debian 12/arm64 packaging observation recorded in [PR #213](https://github.com/cuichangquan/ap2-mandate-verifier/pull/213): 13 payload files matched source/archive/installation, 10 product Ruby files loaded normally and 118 installed cases passed. This adds an observation, not a supported-platform guarantee. README.md and SUPPORT_CONTRACT are packaged; these documentation changes require a new artifact and separately approved build/install/13-payload/10-loaded/118-case validation. That final candidate is NOT_RUN. Prior 190/885 source checks were not rerun in the packaging attempt; publication remains a separate decision.
|
|
158
176
|
|
|
159
|
-
|
|
177
|
+
The published 0.1.0 archive is **34,304 bytes**, SHA256 `37b2a235b6fab2d9d9765ae985dd9db27afd3b2c5407fe263a6b65314550db32`. Official metadata, owner `cuichangquan`, downloaded distribution bytes and all 13 payload hashes were checked on 2026-10-26. See the [publication record](research/stable010_release_linux_package/README.md#rubygems-publication-verified). This repository README was reorganized after publication and differs from the packaged README; the published archive was not rebuilt.
|
|
160
178
|
|
|
161
|
-
|
|
179
|
+
See the [versioned validation record](research/stable010_release_linux_package/README.md) for this archive's external SHA, per-environment observations and limits. The archive hash is kept outside its payload to avoid self-reference. A hash identifies bytes, not Host trust or global safety.
|
|
162
180
|
|
|
163
|
-
|
|
164
|
-
配布Gemには研究コード・fixture・図・過去結果を含めません。リンク先はリポジトリ上の資料です。
|
|
181
|
+
[Earlier 0.1.0 candidate R1](research/stable010_candidate/README.md), [published pre3](https://rubygems.org/gems/ap2_mandate_verifier/versions/0.1.0.pre.3) and [pre2 Release](https://github.com/cuichangquan/ap2-mandate-verifier/releases/tag/v0.1.0.pre.2) are different archives. Historical NOT_RUN/stops/passes remain tied to their original bytes and time. Reusing 885 regressions (including 147) and Ruby4.0.1 independent comparisons is not a fresh 885 run or Linux independent Oracle.
|
|
165
182
|
|
|
166
|
-
|
|
183
|
+
[Historical research documentation](https://github.com/cuichangquan/ap2-mandate-verifier/blob/2546d112b4bd4eaaf0a55b502f1c40b1fd61be65/README.md#research-documentation) does not override the current contract or release status. Future SDK plans are described in [PRODUCT_VISION](docs/PRODUCT_VISION.md).
|
|
167
184
|
|
|
168
|
-
##
|
|
185
|
+
## Illustrated concepts (Japanese diagrams)
|
|
169
186
|
|
|
170
|
-
|
|
187
|
+
These existing diagrams contain Japanese text and illustrate broader AP2 concepts, not the exact fixed-profile implementation contract. The fixed-profile contract above takes precedence. Issuer trust and current revocation are supplied and maintained by the Host; the Gem does not independently establish live external trust or revocation. Arbitrary chains, issuance, Payment Mandates and payment execution shown conceptually are not supported features of this release.
|
|
171
188
|
|
|
172
|
-
|
|
189
|
+
### AP2 overview (Japanese)
|
|
173
190
|
|
|
174
|
-
|
|
175
|
-
- [② AP2の委任フローと信頼検証](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/assets/ap2-delegation-trust-flow.png)
|
|
191
|
+

|
|
176
192
|
|
|
177
|
-
|
|
193
|
+
### Delegation and Host responsibility boundaries (Japanese)
|
|
178
194
|
|
|
179
|
-
|
|
180
|
-
- [④ SD-JWTと委任チェーンの仕組み](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/assets/sd-jwt-delegation-chain.png)
|
|
181
|
-
- [⑤ 攻撃パターンとFail Closed](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/assets/attack-patterns-fail-closed.png)
|
|
195
|
+

|
|
182
196
|
|
|
183
|
-
|
|
197
|
+
### Mandate anatomy (Japanese)
|
|
184
198
|
|
|
185
|
-
|
|
199
|
+

|
|
186
200
|
|
|
187
|
-
|
|
201
|
+
### SD-JWT and delegation concepts (Japanese)
|
|
188
202
|
|
|
189
|
-
|
|
203
|
+

|
|
190
204
|
|
|
191
|
-
|
|
192
|
-
Human user -- trusted consent/mandate --> Personal AI
|
|
193
|
-
|
|
|
194
|
-
| presents external mandate
|
|
195
|
-
v
|
|
196
|
-
Ruby service
|
|
197
|
-
|
|
|
198
|
-
[AP2 Mandate Verifier]
|
|
199
|
-
|
|
|
200
|
-
verified evidence / verification failure
|
|
201
|
-
|
|
|
202
|
-
Service's own authorization and controls
|
|
203
|
-
|
|
|
204
|
-
Business action or STOP
|
|
205
|
-
```
|
|
205
|
+
### Fail-closed attack patterns and Host replay prevention (Japanese)
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## Proposed initial scope
|
|
210
|
-
|
|
211
|
-
- Study AP2 **v0.2** Agent Authorization and Checkout Mandate; do not mix in the earlier v0.1 model.
|
|
212
|
-
- Explore cryptographic verification, trusted issuer/keys, holder/Agent binding, transaction binding, Open/Closed mandate constraints, audience, time, and failure cases.
|
|
213
|
-
- Compare behavior and test vectors with the official AP2 Python implementation before claiming interoperability.
|
|
214
|
-
- Expose verified evidence to the **host**; do not replace the host's authorization or payment controls.
|
|
215
|
-
- The fixed-profile pre2 Gem is published as a GitHub research prerelease. RubyGems publication and distribution of a revised candidate require separate approval; production remains HOLD.
|
|
216
|
-
|
|
217
|
-
## Explicit non-goals
|
|
218
|
-
|
|
219
|
-
- Building a wallet, user credential issuer, payment processor, trusted consent UI, Personal AI, MCP server, or A2A transport.
|
|
220
|
-
- Supporting all AP2 flows or production payments in the first iteration.
|
|
221
|
-
- Assuming all unknown issuers or self-asserted permissions are trustworthy.
|
|
222
|
-
- Changing ActingFor Core, ActingFor Shopping Demo or a2a-rails.
|
|
223
|
-
|
|
224
|
-
## Research documentation
|
|
225
|
-
|
|
226
|
-
- [Project scope and design decisions — Japanese](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PROJECT.md)
|
|
227
|
-
- [Official AP2 sources and standards watchlist](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/OFFICIAL_SOURCES.md)
|
|
228
|
-
- [AP2 v0.2 frozen specification and Python SDK baseline](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/SPEC_BASELINE.md)
|
|
229
|
-
- [AP2 Checkout Mandate verifier requirements and trust boundaries (P0-2)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_REQUIREMENTS.md)
|
|
230
|
-
- [Official Python SDK and Ruby ecosystem research (P0-3)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/ECOSYSTEM_RESEARCH.md)
|
|
231
|
-
- [Minimal Checkout Verifier public API proposal — design only (P0-4)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/API_PROPOSAL.md)
|
|
232
|
-
- [Phase 0 research decision — initial HOLD, **P0-5b CONDITIONAL GO for a narrow offline PoC only**](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RESEARCH_DECISION.md)
|
|
233
|
-
- [Python baseline verification — P0-5a: official pytest 186 PASS / 2 FAIL, signed negative probes 12 PASS (plus earlier isolated 11 PASS)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PYTHON_BASELINE_VERIFICATION.md)
|
|
234
|
-
- [Minimal Fail Closed Profile — strict two-hop autonomous Checkout and Host trust gates (P0-5b)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/FAIL_CLOSED_PROFILE.md)
|
|
235
|
-
- [Ruby interoperability feasibility — P1-0 ES256/JWK + Checkout Hash + official schema: 14 PASS](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RUBY_FEASIBILITY_SPIKE.md)
|
|
236
|
-
- [Ruby SD-JWT Root & Disclosure — P1-1 pinned Python SDK issuance, hidden constraint fail closed: 10 PASS](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RUBY_SDJWT_RESEARCH.md)
|
|
237
|
-
- [Ruby two-hop delegation — P1-2 pinned Python signed Open→Closed, cnf/sd_hash/aud/nonce: 15 PASS](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RUBY_DELEGATION_SPIKE.md)
|
|
238
|
-
- [Ruby Merchant Checkout binding — P1-3 signed Checkout JWT, Host exact bytes, hash, restricted merchant/SKU/quantity/amount: 18 PASS](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RUBY_CHECKOUT_BINDING_SPIKE.md)
|
|
239
|
-
- [Security Gap Review — P1-4 12 ranked risks, 6 gates, generic Gem implementation HOLD](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/SECURITY_GAP_REVIEW.md)
|
|
240
|
-
- [Signed Security Negative Observations — P1-5 18 probes, **6 RED / 11 GREEN / 1 Host boundary**](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/SECURITY_NEGATIVE_TESTS.md)
|
|
241
|
-
- [Security Hardening Research — P1-6 fixed six prior REDs: **0 RED, 17 GREEN, 43 historical regressions passed**](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/SECURITY_HARDENING_RESEARCH.md)
|
|
242
|
-
- [Host Security Contract — P1-7 Host trust, VerifiedEvidence vs ALLOW, nonce atomicity, revocation and Receipt (design only)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_SECURITY_CONTRACT.md)
|
|
243
|
-
- [Host Security Test Plan — P1-7 34 planned race, trust, context and Receipt cases (NOT run)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_SECURITY_TEST_PLAN.md)
|
|
244
|
-
- [Host Replay Lab Design — P1-8 PostgreSQL 16, two workers, crash/retry test plan (DESIGN ONLY, NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_REPLAY_LAB_DESIGN.md)
|
|
245
|
-
- [Host Replay PG16 Evidence — P1-9a four isolated Host DB cases PASS; remaining 30 NOT RUN](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_REPLAY_P19A_EVIDENCE.md)
|
|
246
|
-
- [Host Crash Recovery Evidence — P1-9b HR04/HR05 real SIGKILL and durable PG recovery; 6/34 Host cases exercised](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_REPLAY_P19B_EVIDENCE.md)
|
|
247
|
-
- [Host Unknown COMMIT / Mock Provider Evidence — P1-9c HR06/HR07 offline only, 8/34 Host cases executed](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_REPLAY_P19C_EVIDENCE.md)
|
|
248
|
-
- [Host Checkout/Revocation Race — P1-10a HR10 four PG16 interleavings PASS; 9/34 Host case IDs (research only)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_REPLAY_P110A_EVIDENCE.md)
|
|
249
|
-
- [HC06 External Revocation Design — P1-10b authority consistency, TOCTOU and negative tests (design only, NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_HC06_DESIGN.md)
|
|
250
|
-
- [HC06 Offline Synthetic Evidence — P1-10c eight model tests, two expected unsafe counterexamples; not a full HC06 proof](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110C_EVIDENCE.md)
|
|
251
|
-
- [HC06 Cross-Service Protocol Design — P1-10d Authority reservations, durable Host COMMIT, revocation timing and failure matrix (DESIGN ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110D_PROTOCOL.md)
|
|
252
|
-
- [HC06 Independent Failure-Injection Test Plan — P1-10e revocation during reservation, unknown COMMIT, reservation timeout (DESIGN ONLY, NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110E_TEST_PLAN.md)
|
|
253
|
-
- [HC06 Minimal Independent Harness Decision — P1-10f E-R01/R02 local two-process/two-PG16 feasibility assessment (DESIGN ONLY, NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110F_HARNESS_DECISION.md)
|
|
254
|
-
- [HC06 Independent PG16 Synthetic Evidence — P1-10g E-R01/R02 2 runs / 118 assertions, Host abort SIGKILL; distributed HC06 HOLD](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110G_EVIDENCE.md)
|
|
255
|
-
- [HC06 Authority Finalize Proof-Boundary Review — P1-10h trusted Host decision, forged/replayed reports and PENDING on uncertainty (DESIGN ONLY, NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110H_PROOF_BOUNDARY_REVIEW.md)
|
|
256
|
-
- [HC06 Synthetic Authority Evidence Negatives — P1-10i H01 unsafe baseline + guarded STOP, H02–H06 limited checks (6 runs / 178 assertions, distributed HC06 HOLD)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110I_EVIDENCE.md)
|
|
257
|
-
- [HC06 Independent Authority Proof Feasibility Decision — P1-10j no direct Host DB, authenticated durable decision prerequisites, anti-rollback and Fail Closed (DESIGN ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110J_DECISION.md)
|
|
258
|
-
- [HC06 Host–Authority Contract Checklist — P1-10k C01–C12 roles, evidence required, hard STOP gates; all OPEN/UNCONFIRMED (DESIGN ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110K_CONTRACT_CHECKLIST.md)
|
|
259
|
-
- [AP2 v0.2.0 Official Spec/SDK Mapping — P1-10l C01–C12 vs Mandate, Checkout, Receipt (fixed SHA; SUPPORTED vs NOT SPECIFIED vs UNKNOWN; READ-ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HOST_EXTERNAL_REVOCATION_P110L_AP2_SPEC_MAPPING.md)
|
|
260
|
-
- [Verifier vs Host/Authority Revocation — P1-10m scope and GO/HOLD gates (A: cryptographic evidence; B: strong HC06 revocation; DESIGN ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_VS_REVOCATION_P110M_SCOPE.md)
|
|
261
|
-
- [Strict A-only Offline Ruby PoC GO/HOLD Reassessment — P1-10n G01–G08 and 8 planned acceptance cases, unrun at that step (DESIGN ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110N_OFFLINE_POC_GATE.md)
|
|
262
|
-
- [A-only Signed Offline Acceptance — P1-10o AN-P01/AN-N01–N07 (8 runs / 45 assertions, signed claim drift rejected, N07 HOST_BOUNDARY; SYNTHETIC ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110O_EVIDENCE.md)
|
|
263
|
-
- [A-only Verifier Residual Gap Review — P1-10p issuer layout, unknown nested Constraint fields and GP01–GP09 priorities (DESIGN ONLY / all new tests NOT RUN at P1-10p)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110P_RESIDUAL_GAPS.md)
|
|
264
|
-
- [GP01 Signed Unknown Nested Constraint — P1-10q historic pre-fix unexpected ACCEPT / RED-HOLD (1 synthetic run / 8 assertions)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110Q_GP01_EVIDENCE.md)
|
|
265
|
-
- [GP01 Fixed-Issuer Nested Constraint Allowlist — P1-10r: historic RED to bounded REJECT + signed positive, dedicated 2 runs / 10 assertions (RESEARCH ONLY)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110R_GP01_FIX_EVIDENCE.md)
|
|
266
|
-
- [Signed Constraint Shape and Value-Type Residual Gaps — P1-10s: S01–S08, including requirement ID and Merchant name types (DESIGN ONLY, all new cases NOT RUN)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110S_CONSTRAINT_SHAPE_TYPE_GAPS.md)
|
|
267
|
-
- [S01 Signed Requirement ID Type Mismatch — P1-10t: latest corrected observer local Docker signature VALID, official Schema INVALID, Ruby ACCEPT / RED-HOLD (1 run / 6 assertions; earlier 1/7 historical; no CI)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110T_S01_PREPARED_NOT_RUN.md)
|
|
268
|
-
- [P1-10u signed S01 String type check + separate signed positive regression — PR #42, Mac Docker 2 runs / 12 assertions / 0 failures: signed S01 exact-type REJECT and known-good evidence-only ACCEPT; dedicated CI NOT RUN, general Gem/production HOLD](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110U_S01_TYPE_FIX_PREPARED_NOT_RUN.md)
|
|
269
|
-
- [Research phases and release gates](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/RESEARCH_PLAN.md)
|
|
270
|
-
- [Phase 1研究総括とPhase 2-A設計GO/HOLD判断 — 当時の引き継ぎ記録 / Historical handoff](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PHASE1_RESEARCH_CLOSURE_PHASE2_GATE.md)
|
|
271
|
-
- [Phase 2-A 最小Merchant Verifier設計パッケージ — Issue #45 / PROPOSED / DESIGN ONLY / 未実装・新規テストNOT RUN](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PHASE2A_MINIMAL_VERIFIER_DESIGN.md)
|
|
272
|
-
- [Phase 2-A Issuer/SD-JWT権限制約の開示完全性Gate — Issue #47 / DESIGN ONLY / 未検証・Phase 2-B HOLD](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PHASE2A_DISCLOSURE_COMPLETENESS_GATE.md)
|
|
273
|
-
- [Phase 2-A DC01–DC05 独立署名オラクル実験計画 — Issue #47 / DESIGN ONLY / 全ケースNOT RUN](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/PHASE2A_DC01_DC05_SIGNED_ORACLE_PLAN.md)
|
|
274
|
-
- [Historical P1-10u signed S01 fixed-observer evidence and completed local Docker 2/12 (merged PR #42)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110U_S01_TYPE_FIX_PREPARED_NOT_RUN.md)
|
|
275
|
-
- [Historical P1-10t new-chat handoff — proposes P1-10u and is now superseded; do not rerun as current instructions](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/VERIFIER_P110T_S01_PREPARED_NOT_RUN.md#5-新チャット引き継ぎ次の作業2026-10-12)
|
|
276
|
-
- [Historical project-wide handoff — Japanese (P1-10r era; P1-10s next-task text not yet updated)](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/HANDOFF.md)
|
|
277
|
-
- [Trust model and security boundaries](https://github.com/cuichangquan/ap2-mandate-verifier/blob/8d9845ff4b5618b9e57eda86d3a1e447d4124b47/docs/SECURITY_BOUNDARY.md)
|
|
278
|
-
|
|
279
|
-
## Primary official references
|
|
280
|
-
|
|
281
|
-
- [AP2 Specification](https://ap2-protocol.org/ap2/specification/)
|
|
282
|
-
- [AP2 Agent Authorization](https://ap2-protocol.org/ap2/agent_authorization/)
|
|
283
|
-
- [AP2 Checkout Mandate](https://ap2-protocol.org/ap2/checkout_mandate/)
|
|
284
|
-
- [AP2 official source / Python SDK](https://github.com/google-agentic-commerce/AP2)
|
|
285
|
-
- [FIDO Alliance Agentic AI initiative](https://fidoalliance.org/fido-alliance-agentic-ai/)
|
|
286
|
-
|
|
287
|
-
## Relationship to other OSS
|
|
288
|
-
|
|
289
|
-
- [ActingFor](https://github.com/cuichangquan/acting_for): Rails-native delegated authorization using host-resolved identities and locally stored delegations.
|
|
290
|
-
- [a2a-rails](https://github.com/cuichangquan/a2a-rails): A2A protocol integration for Rails. It does not verify AP2 Mandates.
|
|
291
|
-
|
|
292
|
-
Both are **separate projects**. Integration comes after the verification contract is proven.
|
|
293
|
-
|
|
294
|
-
## 日本語
|
|
295
|
-
|
|
296
|
-
分身AIが外部サービスに持ち込む**検証可能な委任証明**を、Ruby側でどこまで安全に検証できるかを研究するリポジトリです。AP2 v0.2のCheckout Mandateから調査します。署名確認だけで購入を許可したり、未知の発行者を無条件に信用したりしません。固定profileのpre2 GemはGitHubで研究用途限定公開済みです。RubyGems公開・改訂候補の配布は別承認待ちで、本番利用・Phase2BはHOLDです。
|
|
207
|
+

|
|
297
208
|
|
|
298
209
|
## License
|
|
299
210
|
|
data/docs/SUPPORT_CONTRACT.md
CHANGED
|
@@ -1,9 +1,46 @@
|
|
|
1
|
-
# Fixed-profile
|
|
1
|
+
# Fixed-profile AP2 verification — 0.1.0 baseline / 0.2.0 candidate
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
is
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
**Fixed-profile verification contract; Evidence is not Host ALLOW or payment permission.**
|
|
4
|
+
Distribution availability is determined by the official RubyGems version listing, not by this document. Specific Host production GO remains separate.
|
|
5
|
+
Owner adopted the existing verification API and bounded stable-release conditions below. Publication and a specific Host's production operation are separate decisions; this contract does not authorize either.
|
|
6
|
+
Published research-only pre3 remains unchanged. Its historical observations below do not certify this new archive.
|
|
7
|
+
|
|
8
|
+
## Unreleased 0.2.0 candidate API addition
|
|
9
|
+
|
|
10
|
+
Repository candidate metadata is 0.2.0; this is not a publication or validated-archive claim. Published 0.1.0 and its historical evidence below remain unchanged. The initial source-only NOT_RUN record was followed by the limited candidate observation below; it does not validate later packaged-document changes.
|
|
11
|
+
|
|
12
|
+
`verify_checkout(**inputs)` delegates directly to `ResearchResult.verify(**inputs)` without input transformation. It requires the same seven inputs listed below (six original Strings and externally supplied integer Unix seconds), fixed profile, bounds and trusted Host preconditions. `verify_research` is retained unchanged without deprecation warnings; `verify(presentation_json:)` remains syntax-only and never produces successful Evidence.
|
|
13
|
+
|
|
14
|
+
Both full entries preserve Result/ResearchResult, status/code and immutable Evidence v2. Missing or unknown keywords return `:unavailable` / `:research_verification_unavailable`, `success? == false`, `evidence == nil`. Positional arguments or invalid keyword expansion can raise before entry; exceptions and missing results never authorize an operation. Success remains `:verified_research` / `:scoped_research_verified`, checked facts rather than Host ALLOW. No profile, trust, revocation, Host or payment responsibility is broadened.
|
|
15
|
+
|
|
16
|
+
## Limited prior 0.2.0 candidate observation
|
|
17
|
+
|
|
18
|
+
[PR #213](https://github.com/cuichangquan/ap2-mandate-verifier/pull/213) records a separately approved build/install/audit at source HEAD `771eebb1094c19931aadafd32feaa70e2caa48f6` (same tree as merged main `9b981be68a1abaf318a7ae78497b3d74d8aefdda`). The retained local candidate was 32,256 bytes, SHA256 `0a126e170e482fea5138865d658f4c21687dc238e595236456f687ceb8aab211`; it is not a published download or this document's new artifact.
|
|
19
|
+
|
|
20
|
+
The limited Debian 12/arm64 observation used MRI 4.0.9 and the fixed Gem dependencies, OpenSSL library 3.0.22 / OS package `libssl3:arm64 3.0.22-1~deb12u2`. All 13 payload files matched source/archive/installed bytes, ordinary RubyGems require loaded 10 product Ruby files, and 118 logical cases passed: research42 + checkout42 + unavailable24 + legacy7 + input rejection2 + constructor rejection1. Saved inputs/independent expected values were reused; source190/885 were not rerun in this attempt. Earlier auxiliary-diagnostic STOP records remain preserved in PR #213.
|
|
21
|
+
|
|
22
|
+
This is an additional bounded observation, not adoption of Debian as a supported platform or proof of general runtime security, symbol binding, whole-wire accounting or resource performance. The 0.1.0 baseline and historical evidence below retain their own artifact identities. README.md and this contract are packaged; editing them creates different candidate bytes. The documentation-final candidate build/install, 13-payload/10-loaded identity checks and 118 installed cases are pending separate approval and NOT_RUN. Final dependency/provider advisory review and exact-artifact publication approval remain required. Real Issuer trust/revocation, actual Host operation, performance and production GO remain HOLD.
|
|
23
|
+
|
|
24
|
+
## Verification contract
|
|
25
|
+
|
|
26
|
+
Preserve `verify_research`, its seven keyword inputs, existing status/code and Evidence v2 identifiers, and legacy APIs' non-success behavior. No API rename, new trust enrollment, remote lookup, DB or payment operation is added. Fixed AP2 commit b4587ac1d055888a73b4b21750973cffba961793 and the exact profile v1 body/hash, seven supported shapes, ES256/P256 and existing bounds remain unchanged.
|
|
27
|
+
Gem-owned signature/original-wire/closure, delegation, binding, supplied-trust selection, constraints, time intersection and fail-closed checks remain Gem responsibilities. Unsupported forms are rejected; do not claim generic AP2/full Schema conformance or real-Issuer interoperability.
|
|
28
|
+
|
|
29
|
+
Host inputs must be authenticated, independent of the token and current: trust/keys/profile/revocation/rollback protection, clock and order/challenge state. Recheck before use; atomically consume nonce with order CAS, reconcile unknown results as PENDING, and decide final ALLOW/payment separately.
|
|
30
|
+
Evidence is immutable checked facts in the same trusted Ruby process, not ALLOW or a transport credential. JSON/Hash reconstruction does not authenticate it. Rejection, unavailability, exceptions and no result never authorize an operation. Trusted Ruby is a precondition, not a malicious-Ruby sandbox.
|
|
31
|
+
|
|
32
|
+
No worst-case CPU/RSS/concurrency or numeric SLA is promised. Host process/time/memory/concurrency limits supplement, not replace, Gem finite input bounds. Issuance, presentation generation, Receipt, Rails adapter, real payments and Host DB operations are outside this verifier.
|
|
33
|
+
Supported-input semantics and existing API/status/code/Evidence contracts must not change silently. Security-driven acceptance narrowing requires impact/reason/migration disclosure; breaking required-field/profile/API changes must be explicit. Dependency updates are not automatically compatible.
|
|
34
|
+
|
|
35
|
+
The proposed baseline remains MRI4.0.9 plus JSON2.19.9/JWT3.3.0/base640.3.0/OpenSSL gem4.0.2/Digest3.2.1, with the exact observed MBA arm64-darwin25 and Ubuntu24.04/x86_64 configurations. RubyGems version constraints do not enforce MRI/OS/provider identity. All OS versions, other engines/architectures and arbitrary provider updates are not supported by past observations.
|
|
36
|
+
Historical D3 observed MBA component identities and four selected crypto symbol sources; OS dyld hashes/all symbol bindings/global runtime security remain unproved. JSON2.19.9 official IO-buffer fix/tag/source identity is adopted static evidence; inconsistent GHSA patched-version metadata remains recorded. Neither observation is global S3 PASS. The earlier R1 archive subsequently passed Mac/Ubuntu packaging checks. It is a different archive; see the separate release-package record for current bytes and observations.
|
|
37
|
+
|
|
38
|
+
Initial maintenance contact: Owner cuichangquan via repository Issues for ordinary bugs and private vulnerability reporting for vulnerabilities. No secrets, real Mandates or personal data in reports. Maintain only the latest patch in the selected initial stable series; no prerelease/old-series backport, fixed support years, response/fix/disclosure deadline or 24/7 promise.
|
|
39
|
+
Manual dependency/provider review is adopted monthly, on relevant advisories and before releases; no active automatic monitor is implied. Updates/deprecation/end of support must identify affected versions, reason and migration path without inventing a fixed notice period. Known major unaddressed issues or inability to maintain mean HOLD, not a blanket disclaimer.
|
|
40
|
+
|
|
41
|
+
## Existing API/limits and historical evidence baseline
|
|
42
|
+
|
|
43
|
+
The API/limit specification below preserves the existing contract. All pre2/pre3/MBA409/R1 observations are historical, not proof of a newly built archive. Exact current source/archive/installed identities and observations are recorded externally in [release-package evidence](../research/stable010_release_linux_package/README.md); no old result is relabelled.
|
|
7
44
|
|
|
8
45
|
## Supported proposition and environment
|
|
9
46
|
|
|
@@ -28,8 +65,8 @@ Digest3.2.1/resolv0.7.2/zlib3.2.3/Bundler4.0.20;885 source regressions passed
|
|
|
28
65
|
as MBA409-20261023-VALIDATION01. PACKAGE01 records the original validation snapshot's
|
|
29
66
|
package/install checks; PACKAGE02 is the later evidence-reference correction.
|
|
30
67
|
Linux4.0.9 was not yet observed at that packaging snapshot; the later pre2 run
|
|
31
|
-
39939021098 is identified below
|
|
32
|
-
The
|
|
68
|
+
39939021098 is identified below as historical pre2 evidence.
|
|
69
|
+
The Gem contains no OpenSSL/JSON native binary and performs no dependency
|
|
33
70
|
download/build itself. Missing fixed/native providers must stop an offline
|
|
34
71
|
validation rather than trigger extra download/build. Actual native paths/hashes
|
|
35
72
|
are environment observations, not proved by gem versions. Bundler4.0.20 is the
|
|
@@ -42,7 +79,7 @@ run39869876461 (885 source checks,52 installed checks,13 payload/10 loaded).
|
|
|
42
79
|
Stage19 records MBA7inputs x3 observations. See the commit-pinned Stage21
|
|
43
80
|
supplement below. Those Ruby4.0.1 observations do not validate this Ruby4.0.9
|
|
44
81
|
candidate. The later pre2 Linux observation is separately identified below;
|
|
45
|
-
|
|
82
|
+
the old pre3 NOT_RUN wording was subsequently superseded by run40038620413. Neither earlier archive supplies new-archive evidence.
|
|
46
83
|
Windows, Intel Mac, other Rubies/engines and all OS versions are unverified.
|
|
47
84
|
No additional Actions run is authorized.
|
|
48
85
|
|
|
@@ -186,13 +223,18 @@ extensions are included. Repository research data/harnesses are now under
|
|
|
186
223
|
research/; historical evidence bytes and logical pins were preserved.
|
|
187
224
|
Local candidate installation can reuse existing fixed dependency homes/default
|
|
188
225
|
OpenSSL: it proves installed candidate usability, not fresh offline installation
|
|
189
|
-
of all dependencies or future download availability. Stable
|
|
190
|
-
realIssuer/production/Phase2B/Stage16 GO require separate decisions.
|
|
191
|
-
|
|
192
|
-
##
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
226
|
+
of all dependencies or future download availability. Stable release or further
|
|
227
|
+
public distribution, realIssuer/production/Phase2B/Stage16 GO require separate decisions.
|
|
228
|
+
|
|
229
|
+
## Published pre3 versus historical evidence
|
|
230
|
+
|
|
231
|
+
The published version is0.1.0.pre.3 under RubyGems owner cuichangquan.
|
|
232
|
+
The Owner's completed publication check matched the official API, distributed
|
|
233
|
+
archive and MBA original:37888B, SHA256
|
|
234
|
+
8ad627818dc69b450d0fba970dafaf368ec42dd64fb51eec631731027de3882c.
|
|
235
|
+
MBA409-PRE3PACKAGE02-20261023 observed13 payload/10 loaded/52 installed checks.
|
|
236
|
+
The post-release Mac mini audit could not independently refetch RubyGems;
|
|
237
|
+
that audit is not a second publication or package-validation observation.
|
|
196
238
|
The historical MBA409 VALIDATION01/PACKAGE01/PACKAGE02 records below identify pre2,
|
|
197
239
|
not new pre3 execution. Product lib and dependency requirements remain unchanged.
|
|
198
240
|
The later pre2 Linux run39939021098 passed885/52 and13/10 at commit
|
|
@@ -282,3 +324,4 @@ https://github.com/cuichangquan/ap2-mandate-verifier/pull/173
|
|
|
282
324
|
The summary must explicitly identify the completed observation; a missing,
|
|
283
325
|
failed or mismatched report is not success. No local path is a public evidence
|
|
284
326
|
URL. Raw local environment logs are not published by this package.
|
|
327
|
+
|
data/lib/ap2_mandate_verifier.rb
CHANGED
|
@@ -125,4 +125,7 @@ module AP2MandateVerifier
|
|
|
125
125
|
# All older methods continue to return non-success Result values.
|
|
126
126
|
def self.verify_research(**inputs) = ResearchResult.verify(**inputs)
|
|
127
127
|
|
|
128
|
+
# Fixed-profile checkout verification; Evidence is not Host ALLOW or payment permission.
|
|
129
|
+
def self.verify_checkout(**inputs) = ResearchResult.verify(**inputs)
|
|
130
|
+
|
|
128
131
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ap2_mandate_verifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AP2 Mandate Verifier contributors
|
|
@@ -79,9 +79,10 @@ dependencies:
|
|
|
79
79
|
- - '='
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: 3.2.1
|
|
82
|
-
description: Stateless fixed
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
description: Stateless verification of the fixed AP2 profile with immutable Evidence
|
|
83
|
+
using verify_checkout and the retained verify_research API. Requires trusted Host
|
|
84
|
+
inputs and the documented runtime; not Host authorization, payment permission or
|
|
85
|
+
general AP2 conformance.
|
|
85
86
|
executables: []
|
|
86
87
|
extensions: []
|
|
87
88
|
extra_rdoc_files: []
|
|
@@ -119,5 +120,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
120
|
requirements: []
|
|
120
121
|
rubygems_version: 4.0.20
|
|
121
122
|
specification_version: 4
|
|
122
|
-
summary: Fixed-profile AP2
|
|
123
|
+
summary: Fixed-profile AP2 verification for Ruby
|
|
123
124
|
test_files: []
|