Repository navigation
Open
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "deploy-pr の GitHub Pages preview liveness check が実際に配信された成果物のcommit SHAを検証し、stale/古いbuildの誤PASSを防ぐ"
change_kind: workflowParent Issue
なし(単独改善)
Parent Goal Ref
- Goal: 単独改善(親 Issue なし)。deploy-pr の live asset liveness check が index/asset の HTTP 200 応答のみを検証しており、配信されている成果物が今回の PR head のビルド成果物であることまでは検証していない問題を解消する
- Desired Destination: N/A(単独 Issue、parent tracker には属さない)
Current Validated Scope
.github/workflows/deploy-pages.ymlのdeploy-prjob内Verify preview assets are liveステップに、live配信されたindex/assetのcontentへの期待commit SHA検証ロジックを追加する
Remaining Parent Gaps
なし(親 Issue なし、単独改善のため)
Outcome
.github/workflows/deploy-pages.yml の deploy-pr job の Verify preview assets are live ステップが、live配信された index.html および asset(JS/CSS等)の content に期待 commit SHA(steps.commit-sha.outputs.sha / VITE_LOOP_COMMIT_SHA 相当)が含まれることを検証し、含まれない場合に CI step が exit 非0 で失敗する状態になっている。既存の retry/backoff ロジック(#1357 で追加)と deploy-main job のロジックは変更されず、.github/workflows/deploy-pages.yml は有効な YAML のまま PASS する。
In Scope
.github/workflows/deploy-pages.ymlのdeploy-prjob のVerify preview assets are liveステップ内で、fetch 済みの index.html / 各 asset の content に期待 commit SHA が含まれるかを grep 等で検証する処理を追加する- 検証失敗時に CI step を exit 非0 で失敗させ、原因が特定できるエラーメッセージを stderr に出力する
Out of Scope
- 調査: deploy-pr job の live asset check green 化のための GitHub Pages Settings Source 診断 #1315(GitHub Pages Settings Source の設定状態診断)の解決
deploy-mainjob のロジック変更cleanup-prjob の変更deploy-pr内の他ステップ(fetch_pages_url_with_bounded_retryの retry/backoff ロジック自体、preview storage namespace 検証、base path 検証等)の変更deploy-prを required status check にする変更
Acceptance Criteria
- AC1:
deploy-prjob のVerify preview assets are liveステップに、live配信された成果物の content に期待 commit SHA が含まれない場合に検出してエラーメッセージを出力するロジックが追加されている - AC2: 既存の
fetch_pages_url_with_bounded_retry関数(実装: deploy-pr(GitHub Pages preview asset liveness check)の断続的な404タイムアウト失敗を調査・修正する #1357 で追加されたretry/backoffロジック)が変更されず1個のまま維持されている - AC3:
Verify preview assets are liveステップ自体が1個のまま重複・分割されていない - AC4:
deploy-mainjob のロジック(chore: deploy main to gh-pagesコミットメッセージを含む)が変更されていない - AC5:
.github/workflows/deploy-pages.ymlが有効な YAML としてパースできる
Verification Commands
# AC1
$ test "$(rg -c "commit SHA .* not found in live preview assets" .github/workflows/deploy-pages.yml)" != "0"
# AC2
$ test "$(rg -cF "fetch_pages_url_with_bounded_retry() {" .github/workflows/deploy-pages.yml)" = "1"
# AC3
$ test "$(rg -c "name: Verify preview assets are live" .github/workflows/deploy-pages.yml)" = "1"
# AC4
$ test "$(rg -c "chore: deploy main to gh-pages" .github/workflows/deploy-pages.yml)" = "1"
# AC5
$ uv run python3 -c "__import__('yaml').safe_load(open('.github/workflows/deploy-pages.yml'))"Allowed Paths
- .github/workflows/deploy-pages.yml
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Scope Delta(任意)
N/A
Notes for Reviewer
- 本 Issue は PR fix: deploy-pr preview asset liveness check の404タイムアウトを調査・修正する #1358(Closes 実装: deploy-pr(GitHub Pages preview asset liveness check)の断続的な404タイムアウト失敗を調査・修正する #1357)のレビューコメントで指摘され、PR fix: deploy-pr preview asset liveness check の404タイムアウトを調査・修正する #1358 の Safety Claim Matrix でも「live checkが最新PR headの成果物であることの証明(
VITE_LOOP_COMMIT_SHAgrep等)」はnot implemented/本Issue(#1357)のスコープ外として follow-up 化が明記されていた peaceiris/actions-gh-pagesは destination_dir 設定でPRごとのサブディレクトリ(pr-番号)に配信し、keep_files: true で既存ファイルを残すため、理論上は過去 run の index/assets が残存して 200 を返すだけでも既存の liveness check(HTTP 200 のみ検証)が通過しうる- 既存の
Verify commit SHA in distステップは build 済みdist/ディレクトリの中身を検証するものであり、GitHub Pages に実際に配信された成果物の検証ではないため、本 Issue の対象と重複しない .github/workflows/deploy-pages.ymlの編集は人間レビュー必須(.github/CLAUDE.mdの編集ガード方針に従う)- 実装時のエラーメッセージ文言は AC1 の VC 文字列(
commit SHA .* not found in live preview assets相当)に一致させること
Delivery Rule
- 1 Issue = 1 PR を原則とする
- worktree での作業とし、Draft PR を既定とする
.github/workflows/deploy-pages.ymlの編集は human_review_required(.github/CLAUDE.mdの編集ガード方針)
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity