Uh oh!
There was an error while loading. Please reload this page.
feat: Playwright ブラウザ接続構成 + Google Drive エビデンス保管 Skill 追加 - #19
feat: Playwright ブラウザ接続構成 + Google Drive エビデンス保管 Skill 追加#19takemi-ohama wants to merge 5 commits into
Conversation
… (v4.10.0) - playwright-browser-connect: ローカル Chromium / Windows CDP / macOS CDP の 3 パターン対応 - playwright-evidence-drive: テストエビデンス一式の Google Drive 保管・共有 - config.py に BrowserConfig dataclass 追加 (mode: local|cdp-remote) - scenario.config.yaml に browser: セクション追加 - conftest.py.template に connect_over_cdp() 対応 browser fixture 追加 - 関連 Skill の参照リンクを更新 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | REQUEST_CHANGES
Playwright のブラウザ接続構成(local/CDP)と Google Drive へのエビデンス保管機能の追加を確認しました。既存のスクリプト群を Skill として体系化し、柔軟な接続モードをサポートする設計は非常に有用です。
一方で、conftest.py.template における browser fixture の実装において、pytest-playwright 標準のカスタマイズ用 fixture である browser_type_launch_args が考慮されていない点が見受けられました。これにより、テンプレート内のコメントで案内されている設定(slow_mo 等)が機能しない状態となっているため、修正を推奨します。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | REQUEST_CHANGES
CDP 接続設定と local mode のブラウザ起動 fixture は、生成された runtime で接続失敗または既存オプション無視が起きるため修正が必要です。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- conftest.py.template: browser_type_launch_args を依存に追加し local モードで --headed/slow_mo/channel 等が反映されるよう修正 (#1, #6) - conftest.py.template: 変数名 b → browser に改名 (#2) - conftest.py.template: CDP 接続時に非 Chromium ブラウザの fail-fast チェック追加 (#5) - config.py: BrowserConfig.cdp_endpoint の既定値を ws:// → http:// に変更 (#4) - CHANGELOG.md: v4.10.0 エントリを追加 (#3) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 2 | gemini | REQUEST_CHANGES
新規追加された Playwright 関連スクリプトのドキュメント例と実装の不整合を修正する必要があります。また、CDP 接続時の設定引き継ぎなど、テンプレート側の微調整を推奨します。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 2 | codex | REQUEST_CHANGES
CDP remote の主要要件である既存 Chrome セッション再利用と、生成テンプレートの CDP endpoint 例に未修正の不整合があります。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- SKILL.md: upload_evidence.py の引数 --parent → --parent-folder-id に修正 - SKILL.md: gdrive_upload_dir.py の引数を --local/--parent に修正 - SKILL.md: build_gdoc_with_drive_links.py の引数を --md/--folder/--run-id/--name に修正 - conftest.py.template: CDP 接続時に slow_mo を渡すよう修正 - conftest.py.template: local モードで pwk_config.playwright.headless を setdefault で尊重 - conftest.py.template: CDP モード既存 Session 再利用用の _cdp_default_context fixture 追加 - playwright-browser-connect/SKILL.md: conftest.py スニペットをテンプレートと同期 - scenario.config.yaml / SKILL.md: CDP URL を ws:// → http:// に統一 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- SKILL.md: upload_evidence.py の引数 --parent → --parent-folder-id に修正 - SKILL.md: gdrive_upload_dir.py の引数を --local/--parent に修正 - SKILL.md: build_gdoc_with_drive_links.py の引数を --md/--folder/--run-id/--name に修正 - conftest.py.template: CDP 接続時に slow_mo を渡すよう修正 - conftest.py.template: local モードで pwk_config.playwright.headless を setdefault で尊重 - conftest.py.template: CDP モード既存 Session 再利用用の _cdp_default_context fixture 追加 - playwright-browser-connect/SKILL.md: conftest.py スニペットをテンプレートと同期 - scenario.config.yaml / SKILL.md: CDP URL を ws:// → http:// に統一 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 3 | codex | REQUEST_CHANGES
playwright-evidence-drive 側では Drive スクリプトの新しい CLI 引数に更新されていますが、playwright-kit-ops のエビデンスアップロード例は旧形式のままです。Skill ごとに案内が分岐しないよう、gdrive_upload_dir.py と build_gdoc_with_drive_links.py の実行例を実スクリプトの --local/--parent、--md/--folder/--run-id/--name に揃えてください。
Uh oh!
There was an error while loading. Please reload this page.
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 3 | gemini | REQUEST_CHANGES
PR #19 の実装を確認しました。Playwright の CDP 接続対応および Google Drive エビデンスアーカイブの Skill 分離は非常に有用な改善です。一方で、設定ファイルの尊重やロジックの重複について、以下の修正を提案します。
共通指摘
- [minor / 保守性]
playwright_kit.uploadersパッケージとscripts/upload_evidence.pyのロジックが重複しています。真実の源 (SSOT) を維持するため、スクリプト側がパッケージのupload関数を利用するようにリファクタリングを検討してください。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- SKILL.md: TCP proxy を廃止し --remote-allow-origins=* フラグによる Host ヘッダ検証回避に差し替え (proxy 不要でシンプル化) - conftest.py.template: CDP接続/localモード両方で scenario.config.yaml の playwright.slow_mo_ms をフォールバックとして反映 - config.py: cdp_endpoint が null (YAML でキーのみ定義) の場合に "None" 文字列にならないよう or 演算子でガード Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d17fb15 to
0e4a82fCompare
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 4 | gemini | REQUEST_CHANGES
今回の修正で、TCP proxy を廃止し --remote-allow-origins=* による構成簡略化が行われましたが、Windows (WSL2) 環境での接続性について懸念があります。また、設定パース時のバリデーションをより堅牢にすることで、設定不備による予期せぬクラッシュを防ぐことができます。
追加の指摘 (config.py)
PlaywrightConfig.from_rawのhar_modeバリデーションにおいて、har_mode:(null) の時に"none"となり、デフォルトの"minimal"ではなく明示的な "なし" 設定として扱われます。意図的でない場合はorでのフォールバックを検討してください。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 4 | codex | COMMENT
マーケットプレイス上の NDF 公開説明が今回の v4.10.0 / 46 skills の内容と乖離しているため、公開面の表記更新だけ対応してください。
Uh oh!
There was an error while loading. Please reload this page.
- SKILL.md: Chrome の 127.0.0.1 バインド問題に対応するネットワーク別接続ガイドを追加
(--remote-debugging-address=0.0.0.0 / socat / netsh portproxy の3方式 + 早見表)
- config.py: browser.mode が null の場合に ValueError でクラッシュする問題を修正
(raw.get("mode") or base.mode でデフォルト値へフォールバック)
- marketplace.json: NDF の description を v4.10.0 / 46 skills に更新
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 5 | gemini | REQUEST_CHANGES
Playwright 接続構成の分離と Google Drive エビデンスアーカイブ機能の追加により、WSL2/macOS 等のハイブリッド環境でのテスト実行が大幅に容易になります。機能自体は非常に有用ですが、以下の点について修正を推奨します:
- Drive アップロード時のファイル衝突 (重大):
pytest_plugin.pyのpytest_sessionfinish実装において、全テストの成果物(trace.zip 等)が単一の Drive フォルダにフラットにアップロードされるため、同名ファイルが衝突し、どのテストのエビデンスか判別できなくなります。ファイル名にテスト名を含めるか、Drive 上にディレクトリ階層を作成する対応が必要です。 - MIME タイプの不足:
uploaders/__init__.pyの_MIME_BY_EXTに.mdが定義されていないため、report.mdがapplication/octet-streamとして扱われます。 - 接続情報の整合性:
scenario.config.yamlの例示ポートが 9223 となっており、他ドキュメントとの不整合があります。
Uh oh!
There was an error while loading. Please reload this page.
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 5 | codex | COMMENT
CDP 接続テンプレートに、現行の browser-connect 手順と異なる旧ポート例が残っています。
Uh oh!
There was an error while loading. Please reload this page.
SKILL.md や他の例示と一致するよう、旧 proxy 前提の 9223 を標準の 9222 に修正。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
May 26, 2026
ℹ️ レビューコメント履歴整理のため本 PR を一度 close し、同じブランチ |
Summary
scenario.config.yamlにbrowser:セクション追加 (mode: local|cdp-remote,cdp_endpoint)conftest.py.templateにconnect_over_cdp()対応のbrowsersession fixture 追加config.pyにBrowserConfigdataclass 追加背景
Test plan
uv run pytest tests/ -x -q全テストパス (161 passed)claude plugin validate plugins/ndfパスBrowserConfig.from_raw()で local / cdp-remote の両モード正常パース確認