fix(order): 人間のモバイル注文 checkout の支払いを注文に束縛し公開 notify の横取りを塞ぐ (A2c・掟 15) - #607
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
cipherwebllc
force-pushed
the
fix/r6-a2c-checkout-binding
branch
from
September 24, 2026 07:40
2a0fb15 to
776e6c8
Compare
第 6 回レビュー A2 の人間の checkout 側 (P1)。user 承認済みの方針 (relay/recover は intentSalt で束縛・ 標準 ERC-20 は残余として受容) と設計 v0.2。intentSalt を注文 digest とブラウザだけが持つ秘密の hash にし、 notify で秘密を添えて on-chain の Settled/AuthorizationUsed の nonce と照合する。 未送信の注文記録は署名後・broadcast 前に保存し、通知の受理で消す。 flag ENABLE_ORDER_BIND_ENFORCE (server・既定 OFF) は束縛の欠落を注意表示で受け、ON で拒否。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-a2c-checkout-binding
branch
from
September 24, 2026 14:40
776e6c8 to
2c45570
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
第 6 回レビュー A2 のうち、人間のモバイル注文 checkout 側の残り (P1) です。これまでは、公開の order/notify に他人の支払い tx を添えると、その支払いを自分の注文として登録できました。
user 承認済みの方針 (relay/recover は intentSalt で束縛・標準 ERC-20 は残余として受容・設計 v0.2) で塞ぎます。
仕組み
intentSalt) を「注文 digest + ブラウザだけが持つ秘密」の hash にします。注文 ID・メモ・状態 token は署名前に固定します。Settled/AuthorizationUsedの nonce と照合してから、注文・手数料・push の処理に進みます。ENABLE_ORDER_BIND_ENFORCE(server 専用・既定 OFF)公開文言 (承認をお願いします)
既存の文言を新しい場面でも使います (文言は不変):
CheckoutForm.orderNotifyTooOld・CheckoutForm.urlInvalidTitle。README の env 表と
.env.local.exampleにENABLE_ORDER_BIND_ENFORCEを追加しました (掟 9)。掟 12 の例外 (既存の挙動が変わる点)
processingのときだけにしました。 通信エラー・5xx・429・422tx_not_foundは再試行できます。それ以外は終端で、束縛つきの注文ではスタッフへの案内を出します (JSON でない 4xx とbindingConflictを含む)。successUrlへの遷移は、notify の受理を待ってから行います。checkout.successの計測は従来どおり送ります。order_binding_mismatchを返します。bindingConflict: trueを追加します。この照合は上限つきの注文一覧に限り、照合の読み取りに失敗したら 503kv_errorを返します。ENABLE_ORDER_BIND_ENFORCEを ON にすると、旧来のagent-order/payのallowLegacy経路は束縛なしの notify を送るため 422 になります。支払い自体は済んでいても、外側の応答がorderRegistered:falseになり得ます。点灯前に運用の確認が必要です (本 PR は既定 OFF)。受容した残余
検証 (base = 3b20582)
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc