-
Notifications
You must be signed in to change notification settings - Fork 718
feat(agent-commerce): 結合 E2E を通常 CI に統合 + UCP discovery payment_handlers 自動広告 #6872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dotani1111
merged 47 commits into
EC-CUBE:4.4
from
nanasess:feature/agentic-commerce-e2e
Jul 29, 2026
Merged
Changes from 45 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
cce7282
merge: ucp を統合ブランチへマージ (E2E 用全部入り)
nanasess 05c39a9
merge: feed を統合ブランチへマージ (E2E 用全部入り)
nanasess d7e99bc
test(agent-commerce): 結合 E2E ワークフローと PHP エージェントシミュレータを追加
nanasess 1ddf4cc
ci(agent-commerce): VCS プラグイン解決に COMPOSER_AUTH を付与
nanasess ecdda4e
ci(agent-commerce): プラグイン取り込みを path リポジトリ方式へ変更
nanasess f98dd01
ci(agent-commerce): api44 に path インストール用ダミー extra.id を注入
nanasess 4afabaf
ci(agent-commerce): 共存検証を dtb_plugin 参照に修正 (eccube:plugin:list は不在)
nanasess b5fc5a7
ci(agent-commerce): discovery スモークに HTTP ステータス/サーバログ診断を追加
nanasess 3a5a318
ci(agent-commerce): built-in server の router を index.php へ変更
nanasess 5ef0ce9
ci(agent-commerce): Job A スモークを PHP 8.2/8.3/8.4 × pgsql/mysql に拡張
nanasess 9a6dfec
ci(agent-commerce): Job B でトークンを実発行し OAuth2 認証フローを検証 (#188)
nanasess 545b4b7
ci(agent-commerce): generate-keypair に --overwrite を付与
nanasess 33aa1df
ci(agent-commerce): create-client の引数を <name> <identifier> <secret> に修正
nanasess 3c8a7bc
feat(agent-commerce): エージェント注文の Payment 解決を handler_id 駆動の拡張可能 resolv…
nanasess b0901e0
ci(agent-commerce): ACP E2E に決済 complete シナリオ (成功/3DS/拒否) を追加
nanasess 86a0876
ci(agent-commerce): E2E integration-smoke の matrix に PHP 8.5 を追加
nanasess 92c7429
fix(agent-commerce): resolver の支払方法候補を販売種別起点に解決する
nanasess c25f934
ci(agent-commerce): Job B に決済ハンドラ配線の診断ステップを追加
nanasess 1ffe8fd
ci(agent-commerce): [TEMP] Job A をスキップし Checkout E2E 単独実行 + 診断常時化
nanasess b9b36f4
ci(agent-commerce): [TEMP] complete の payment_handler_not_found に ord…
nanasess 1c846a7
fix(agent-commerce): resolver は割当済み Payment を優先し再読込注文でも解決する
nanasess a8246ce
fix(agent-commerce): E2E は購入可能な ProductClass を使う + reload 回帰追加
nanasess 1fd34d2
ci(agent-commerce): E2E のデバッグ用 TEMP 変更を除去し full matrix を復帰
nanasess a61b3c0
ci(agent-commerce): UCP エージェントシミュレータを追加
nanasess 355e19e
refactor(agent-commerce): resolveByHandlerId を base getHandlerId 経由へ統一
nanasess fa44f0b
style(agent-commerce): rector 指摘を反映 (reload テストの assert 形式)
nanasess 98296f3
test(agent-commerce): DefaultAgentPaymentMethodResolver のユニットテストを追加
nanasess aa5a9e7
feat(agent-commerce): UCP discovery の payment_handlers を登録ハンドラから自動広告
nanasess 3a49bc0
test(agent-commerce): 未登録 handler_id 時に paymentMethod が null のままであることを固定
nanasess 00e90dd
ci(agent-commerce): Checkout E2E ジョブ名の日本語を修正
nanasess 7ebb273
fix(composer): config.platform に ext-sodium を追加し sodium 拡張なし環境で API プ…
nanasess 9b50c4d
ci(agent-commerce): 結合 E2E を sodium 拡張なし環境で実行し #6827 を検証
nanasess 3e11a31
fix(install): sodium 非対応環境での WebApi プラグイン自動アンインストールを廃止
nanasess 988f993
ci(agent-commerce): 結合 E2E の setup-php から不要な redis 拡張を除去
nanasess 4c1fbed
Merge remote-tracking branch 'upstream/4.4' into feature/agentic-comm…
nanasess 058bdce
Merge remote-tracking branch 'upstream/4.4' into feature/agentic-comm…
nanasess aa0cc90
Merge remote-tracking branch 'upstream/4.4' into feature/agentic-comm…
nanasess b73f7af
Merge branch '4.4' into feature/agentic-commerce-e2e
nanasess d598750
ci(agent-commerce): 結合 E2E を main.yml の通常 CI に組み込む
nanasess f95e584
docs(agent-commerce): E2E シミュレータに EC-CUBE ライセンスヘッダー付与と README 補完
nanasess 18266fe
Merge branch '4.4' into feature/agentic-commerce-e2e
nanasess 372b602
Merge remote-tracking branch 'upstream/4.4' into feature/agentic-comm…
nanasess 967c207
fix(doctrine): EccubeBundle の auto_mapping を無効化し Proxy との二重宣言を防止
nanasess 6042b71
ci(agent-commerce): checkout に persist-credentials: false を付与 (#6950 準拠)
nanasess 65c08fe
Merge remote-tracking branch 'origin/feature/agentic-commerce-e2e' in…
nanasess 6bc673e
fix(agent-commerce): 決済ハンドラのタグ付けを registerForAutoconfiguration へ移行
nanasess f1e32f7
Merge remote-tracking branch 'upstream/4.4' into feature/agentic-comm…
nanasess File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Agentic Commerce E2E — PHP エージェントシミュレータ | ||
|
|
||
| 本体 (ACP/UCP) ↔ [eccube-api4](https://github.com/EC-CUBE/eccube-api4) (OAuth2) ↔ sample-payment-plugin (決済ハンドラ) の結合を、 | ||
| 「AI エージェント役」のクライアントが **外部 HTTP** で検証するハーネス。CI からは | ||
| [`.github/workflows/agentic-commerce-e2e.yml`](../../.github/workflows/agentic-commerce-e2e.yml) (`workflow_dispatch`) が呼び出す。 | ||
|
|
||
| ## 構成 | ||
|
|
||
| | ファイル | 役割 | | ||
| |---|---| | ||
| | `acp-checkout.php` | ACP discovery スモーク + checkout フロー (create→update→get→complete)。OAuth2 Bearer (api4) 認証 | | ||
| | `ucp-checkout.php` | UCP checkout フロー (create→get→update→complete)。RFC 9421 署名は CI では不要 (`ucp_checkout_enabled` ゲートのみ・api4 非依存) | | ||
|
|
||
| ## 2 フェーズと skip ゲート | ||
|
|
||
| ### `acp-checkout.php` (ACP) | ||
|
|
||
| 1. **discovery スモーク** — 常に実行。`/.well-known/ucp` (常時公開) と `/.well-known/acp.json` | ||
| (`acp_checkout_enabled` ゲート) の生存・形状 (秘密鍵非混入・`merchant_id` 非混入等) を検証。 | ||
| api4 / 決済ハンドラに非依存なので **day 1 から green**。 | ||
| 2. **checkout フロー** — `AGENT_E2E_TOKEN` がある時のみ。OAuth2 Bearer で ACP 5 エンドポイントを叩く。 | ||
| トークン発行は **eccube-api4#188 (client_credentials + `acp:`/`ucp:` scope)** と決済ハンドラの | ||
| landing が前提。未 landing の間は `AGENT_E2E_TOKEN` が空のまま → フェーズ 1 のみ実行して正常終了。 | ||
|
|
||
| ### `ucp-checkout.php` (UCP) | ||
|
|
||
| 1. **checkout セッション** — 常に実行。`ucp_checkout_enabled` ゲートのみで、UCP のインバウンド認証 | ||
| (RFC 9421 署名) は CI では `requireSignature=false` のため署名なしで通る (api4 非依存)。 | ||
| create → get → update を検証。 | ||
| 2. **complete シナリオ** — `AGENT_E2E_PAYMENT_READY=true` の時のみ。sample-payment の UCP 決済ハンドラ | ||
| 経由で成功 / escalation / 拒否の 3 シナリオを検証。 | ||
|
|
||
| ## ローカル実行 | ||
|
|
||
| ```bash | ||
| # 1. フラグを立て result cache pool を消す (BaseInfo は result cache されるため必須) | ||
| bin/console dbal:run-sql "UPDATE dtb_base_info SET acp_checkout_enabled = 1, ucp_checkout_enabled = 1" | ||
| bin/console cache:pool:clear --all | ||
|
|
||
| # 2. ビルトインサーバ起動 (EC-CUBE は public-dir="." のため codeception/router.php を router にする) | ||
| php -S 127.0.0.1:8000 codeception/router.php & | ||
|
|
||
| # 3. ACP discovery-only (トークン無し) | ||
| BASE_URL=http://127.0.0.1:8000 php e2e/agent/acp-checkout.php | ||
|
|
||
| # 3'. ACP checkout 込み (api4#188 + 決済ハンドラ landing 後) | ||
| BASE_URL=http://127.0.0.1:8000 AGENT_E2E_TOKEN=<bearer> php e2e/agent/acp-checkout.php | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| # 4. UCP checkout セッションのみ (署名なし・api4 非依存) | ||
| BASE_URL=http://127.0.0.1:8000 php e2e/agent/ucp-checkout.php | ||
|
|
||
| # 4'. UCP complete 込み (決済ハンドラ landing 後) | ||
| BASE_URL=http://127.0.0.1:8000 AGENT_E2E_PAYMENT_READY=true php e2e/agent/ucp-checkout.php | ||
| ``` | ||
|
|
||
| ## env | ||
|
|
||
| | 変数 | 既定 | 説明 | | ||
| |---|---|---| | ||
| | `BASE_URL` | `http://127.0.0.1:8000` | 稼働中サーバ | | ||
| | `AGENT_E2E_TOKEN` | (空) | OAuth2 Bearer (ACP のみ)。空ならフェーズ 2 を skip | | ||
| | `AGENT_E2E_PAYMENT_READY` | `false` | `true` の時のみ complete (決済) を実行。ACP/UCP 共通 | | ||
| | `AGENT_E2E_ITEM_ID` | ACP=`1` / UCP=`2` | checkout で使う ProductClass id (UCP の `1` は visible=0 の規格) | | ||
|
|
||
| > **注意**: このブランチ (`feature/agentic-commerce-e2e`) は ACP/UCP/feed/共通基盤を 1 本に集約した | ||
| > **テスト専用の統合ブランチ**。各機能は個別 PR (#6802/#6815/#6825/#6837/#6843) で 4.4 へマージされる。 | ||
| > E2E 成果物は 4.4 マージ後に専用 PR で移送する。 | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.