Skip to content

ci(agent-commerce): 結合 E2E の依存プラグイン参照を EC-CUBE org の 4.4 ブランチへ切り替える - #7056

Open
nanasess wants to merge 1 commit into
EC-CUBE:4.4from
nanasess:chore/agentic-commerce-e2e-plugin-refs
Open

ci(agent-commerce): 結合 E2E の依存プラグイン参照を EC-CUBE org の 4.4 ブランチへ切り替える#7056
nanasess wants to merge 1 commit into
EC-CUBE:4.4from
nanasess:chore/agentic-commerce-e2e-plugin-refs

Conversation

@nanasess

@nanasess nanasess commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

概要(Overview・Refs Issue)

エージェントコマース結合 E2E (agentic-commerce-e2e.yml) が参照している依存プラグインを、開発期間中の fork から EC-CUBE org の 4.4 ブランチへ切り替えます。

以下 2 件がマージされ、fork を参照する必要がなくなったためです。

あわせて、e2e/agent/ のドキュメントが実装と食い違っていた箇所を修正します(#6872 で本体にマージされた後、記述が実態と乖離していました)。

方針(Policy)

path リポジトリ方式とダミー extra.id の注入は org 移行後も必要なため維持しました。 「org に移ったので通常の VCS 参照に戻せる」とは判断できず、実際に確認した結果は次のとおりです。

リポジトリ デフォルトブランチ デフォルトの composer 名 4.4 の composer 名 4.4extra.id
EC-CUBE/eccube-api4 4.2 ec-cube/api42 ec-cube/api44 (4.4.0) なし
EC-CUBE/sample-payment-plugin 4.2 ec-cube/samplepayment42 ec-cube/samplepayment44 (3.0.0) 999999
  • composer の VCS ドライバはデフォルトブランチ由来の名前で repo をキーするため、新名の 4.4 ブランチが名前不一致でスキップされ "not found" になります。この制約は fork 固有ではなく org でも同じでした。
  • api444.4 ブランチでも composer.jsonextra.id を持たないため、ec-cube/plugin-installer 用のダミー id 注入も引き続き必要です。

そのため機構は変えず、コメントの理由書きのみ実態(デフォルトブランチが 4.2 系)に合わせて更新しています。

実装に関する補足(Appendix)

CI 設定

  • API44_VCS / SAMPLEPAYMENT44_VCS を EC-CUBE org の URL に変更
  • 参照ブランチ既定値を feature/agentic-commerce4.4 に変更(workflow_dispatch / workflow_call の inputs 各 2 箇所、Job A/B のフォールバック 4 箇所)
  • main.yml の caller 側コメントを更新(「org 移行後に別 PR で差し替え」の TODO を解消)

ドキュメントの実装との齟齬修正

landing 待ち表記の更新に加え、突き合わせで見つかった以下 3 件を修正しました。

  1. ローカル実行手順の router が誤り — README は php -S 127.0.0.1:8000 codeception/router.php を指示していましたが、codeception/router.php は GET に対し return false を返し、PHP built-in server の静的フォールバック挙動が PHP バージョン依存で app ルートを 404 にし得ます。workflow 自身はこれを理由に index.php を直接 router にしているため、README も CI と同じ方式に統一しました。
  2. AGENT_E2E_ITEM_ID の既定値が誤り — README は「ACP=1 / UCP=2」としていましたが、実装は acp-checkout.php / ucp-checkout.php ともに 2 です。1 は fixtures の visible=0 なダミー規格で purchase flow が明細を除去するため、ACP で 1 を既定とする記述は成立しません。
  3. 統合ブランチ運用の注意書きが陳腐化 — 「このブランチ (feature/agentic-commerce-e2e) はテスト専用の統合ブランチ」という注記が、feat(agent-commerce): 結合 E2E を通常 CI に統合 + UCP discovery payment_handlers 自動広告 #6872 で本体 4.4 にマージされた後も残っており参照先が存在しない状態でした。コア実装のマージ経緯(feat(agent-commerce): エージェントコマース共通基盤 Phase 1a (#6777) #6802/feat(agent-commerce): Product Feed/Catalog/Discovery を実装 (#6794 トラックA) #6815/feat(agent-commerce): CheckoutSession 中核を実装 (#6777 トラックB前提・Phase 1b) #6825/feat(agent-commerce): UCP checkout (#6574) のコア実装 #6837/feat(agent-commerce): ACP checkout (#6776) のコア実装 #6843/feat(agent-commerce): 結合 E2E を通常 CI に統合 + UCP discovery payment_handlers 自動広告 #6872)の記載に差し替えました。

acp-checkout.php の TODO は、ブロッカー(トークン発行の landing)は解消済みですが作業本体(payload を AcpCheckoutSessionMapper の契約に実データで突き合わせる)は未実施のため、項目自体は残し前提条件の記述のみ更新しています。

テスト(Test)

ローカルで実施済み

  • 4.4 ブランチの git clone --depth 1 --branch 4.4(両リポジトリ・匿名 HTTPS)が成功し、HEAD が上記 merge commit そのものであることを確認
  • clone した composer.json の名前・version が workflow の require(ec-cube/api44:* / ec-cube/samplepayment44:*)と、plugin code が --code=Api44 / --code=SamplePayment44 と一致することを確認
  • Job A が assert する dev.ucp.payment.cardUcpSampleCardHandler::HANDLER_ID に存在することを確認
  • Job B の前提(client_credentials / acp:checkout ucp:checkout scope / ECCUBE_OAUTH2_ENCRYPTION_KEY)が api44 の 4.4 に存在することを確認
  • 両 workflow の YAML parse と、解決後のブランチ既定値が全て 4.4 になることを確認
  • php -l e2e/agent/*.php / Rector / PHPStan level 6 いずれも green(pre-push hook で実行)

CI で確認したいこと

  • Agentic Commerce E2E の Job A (integration smoke, PHP 8.2-8.5 × pgsql/mysql) が green
  • Job B (checkout E2E, OAuth2 トークン発行 + ACP/UCP セッション + complete) が green

相談(Discussion)

Packagist 公開後は path リポジトリ方式ごと通常の composer require に単純化できます。本 PR では機構を変えず参照先の切り替えに留めました。

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

CI 設定 (.github/workflows/) と E2E ハーネスのドキュメントのみの変更で、src/ 配下の製品コードには一切触れていません。

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 改善
    • E2E テスト環境の参照先を EC-CUBE 4.4 系に統一しました。
    • 決済 API の認証条件とサンプル決済機能に関する案内を更新しました。
    • ローカル実行時のルーティング設定、環境変数、商品 ID の説明を改善しました。
    • CI 実行および依存リポジトリの利用手順を最新化しました。

eccube-api4#191 と sample-payment-plugin#54 が両リポジトリの 4.4 ブランチへ
マージされたため、開発期間中に参照していた fork を org 参照に差し替える。

- API44_VCS / SAMPLEPAYMENT44_VCS を EC-CUBE org の URL に変更
- 参照ブランチの既定値を feature/agentic-commerce から 4.4 に変更
  (workflow_dispatch / workflow_call の inputs、Job A/B のフォールバック)

path リポジトリ方式とダミー extra.id の注入は org 移行後も引き続き必要なため維持した。
両リポジトリのデフォルトブランチは 4.2 系で composer 名も旧名 (ec-cube/api42 /
ec-cube/samplepayment42) のため、VCS ドライバではデフォルトブランチ由来の名前で
repo がキーされ、新名の 4.4 ブランチが名前不一致でスキップされる。また api44 は
4.4 ブランチでも composer.json に extra.id を持たない。コメントの理由書きのみ
実態に合わせて更新している。

あわせて e2e/agent のドキュメントが実装と食い違っていた箇所を修正する。

- landing 待ちを前提にした記述を、landing 済みかつ skip ゲートはローカル実行用と
  いう位置づけに更新 (README / acp-checkout.php の docblock・skip メッセージ・TODO)
- ローカル実行手順の router を codeception/router.php から index.php に修正。
  router.php は GET に対し false を返し、静的フォールバックの挙動が PHP バージョン
  依存で 404 になり得るため、CI と同じく front controller を直接 router にする
- AGENT_E2E_ITEM_ID の既定値の記述を修正。README は ACP=1 としていたが実装は
  ACP/UCP ともに 2 で、1 は visible=0 のダミー規格のため purchase flow が明細を除去する
- 統合ブランチ運用を説明していた注意書きを、コア実装のマージ経緯の記載に差し替え

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fb8300ed-48ff-4126-a04e-f4541abb6cfe

📥 Commits

Reviewing files that changed from the base of the PR and between f03d0da and 9575639.

📒 Files selected for processing (4)
  • .github/workflows/agentic-commerce-e2e.yml
  • .github/workflows/main.yml
  • e2e/agent/README.md
  • e2e/agent/acp-checkout.php

📝 Walkthrough

Walkthrough

Agentic Commerce E2E の参照先を EC-CUBE の 4.4 ブランチへ変更しました。README と checkout スクリプトの説明を、Api44SamplePayment44、新しい実行手順に合わせて更新しました。

Changes

Agentic Commerce 4.4 移行

Layer / File(s) Summary
CI 参照先の 4.4 化
.github/workflows/agentic-commerce-e2e.yml, .github/workflows/main.yml
既定ブランチと VCS リポジトリを EC-CUBE の 4.4 構成へ変更しました。Job A/B の clone 設定と関連説明も更新しました。
E2E 実行手順の更新
e2e/agent/README.md
依存リポジトリ、ACP トークン条件、index.php ルーター、実行コマンド、環境変数の説明を更新しました。
Checkout 前提表示の更新
e2e/agent/acp-checkout.php
skip メッセージと TODO を Api44SamplePayment44client_credentials、scope の前提に合わせました。checkout フローの制御ロジックは変更していません。

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 95756

This PR updates E2E dependency references and aligns workflow defaults and documentation with the 4.4 branch; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: dotani1111, saori-kakiuchi

Poem

うさぎが跳ねて、4.4へ
ブランチそろえて、ぴょんと実行
Api44 に token を渡し
SamplePayment44 が待っている
E2E の道を整えたよ 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、結合 E2E の依存プラグイン参照を EC-CUBE org の 4.4 ブランチへ切り替える主な変更を明確に示しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.75%. Comparing base (f03d0da) to head (9575639).

Additional details and impacted files
@@            Coverage Diff             @@
##              4.4    #7056      +/-   ##
==========================================
+ Coverage   77.67%   77.75%   +0.07%     
==========================================
  Files         597      597              
  Lines       29333    29333              
==========================================
+ Hits        22785    22808      +23     
+ Misses       6548     6525      -23     
Flag Coverage Δ
Unit 77.75% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant