Skip to content

実装: deploy-pr の GitHub Pages preview liveness check に配信済み成果物のcommit SHA検証を追加する #1360

Open

Description

@squne121

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: workflow

Parent 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-pr job内 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-pr job の Verify preview assets are live ステップ内で、fetch 済みの index.html / 各 asset の content に期待 commit SHA が含まれるかを grep 等で検証する処理を追加する
  • 検証失敗時に CI step を exit 非0 で失敗させ、原因が特定できるエラーメッセージを stderr に出力する

Out of Scope

Acceptance Criteria

  • AC1: deploy-pr job の 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-main job のロジック(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

Delivery Rule

  • 1 Issue = 1 PR を原則とする
  • worktree での作業とし、Draft PR を既定とする
  • .github/workflows/deploy-pages.yml の編集は human_review_required(.github/CLAUDE.md の編集ガード方針)

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions