Skip to content

実装: cleanup-pr 実行後に preview URL コメントを削除または無効化する #586

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "PR #585 レビューで提起された optional follow-up — cleanup-pr 時に残存する preview URL コメントの削除または無効化"
change_kind: workflow

Parent Issue

なし(単独改善)

Parent Goal Ref

Current Validated Scope

  • .github/workflows/deploy-pages.yml の cleanup-pr ジョブに actions/github-script ステップを追加し、クローズ済み PR の preview URL コメントを「Preview removed」メッセージに更新する

Remaining Parent Gaps

なし

Outcome

.github/workflows/deploy-pages.yml の cleanup-pr ジョブが更新され、PR close 時に gh-pages 上の pr-<N>/ を削除した後、deploy-pr が投稿した preview URL bot コメントを削除せず「Preview removed」状態へ更新する。

対象コメントは <!-- loop-protocol-pr-preview --> marker を含む GitHub Actions bot コメントに限定し、人間コメントや marker のないコメントは変更しない。

pnpm typecheck / pnpm lint / pnpm test / pnpm build が全て PASS している。

In Scope

  • .github/workflows/deploy-pages.yml の cleanup-pr ジョブに actions/github-script step を追加
  • cleanup-pr ジョブへの same-repository PR guard 追加(fork PR / Dependabot PR での close event をスキップ)
  • preview comment の更新ロジック
    • github.paginate(github.rest.issues.listComments, { per_page: 100 }) を使う
    • user.login === 'github-actions[bot]' かつ <!-- loop-protocol-pr-preview --> marker を含むコメントのみ対象
    • 対象コメントがない場合は no-op(新規コメントを作成しない)
    • コメント削除は禁止。既存コメントを Preview removed に更新する
  • cleanup-pr ジョブへの pull-requests: write 追加(contents: write を維持したまま)

Out of Scope

Acceptance Criteria

  • AC1: cleanup-pr job に actions/github-script step が存在する
  • AC2: cleanup-pr job の if 条件に github.event.pull_request.head.repo.full_name == github.repository が含まれる(same-repository guard)
  • AC3: cleanup-pr job の actions/github-script ステップは github.paginate(github.rest.issues.listComments, ...) を使用する
  • AC4: cleanup-pr job の actions/github-script ステップは user.login === 'github-actions[bot]' かつ <!-- loop-protocol-pr-preview --> marker を含むコメントのみを更新対象とする
  • AC5: 対象コメントがある場合、削除ではなく Preview removed 本文へ更新される(updateComment を使用し deleteComment は使用しない)
  • AC6: 対象コメントがない場合、新規コメントを作成しない(no-op)
  • AC7: cleanup-pr ジョブの permissions に contents: write と pull-requests: write の両方が設定されている
  • AC8: pnpm typecheck / pnpm lint / pnpm test / pnpm build が全て PASS
  • AC9: cleanup-pr の actions/github-script ステップ内に createComment の呼び出しがない

Verification Commands

# AC1
# baseline: FAIL — "Preview removed" テキストは cleanup-pr 実装前は存在しない
$ rg -n "Preview removed" .github/workflows/deploy-pages.yml
# AC2
# baseline: FAIL — cleanup-pr の if 条件は現在 'closed' で終わっており && がない
$ rg -n "action == 'closed' &&" .github/workflows/deploy-pages.yml
# AC3
# baseline: FAIL — cleanup-pr スクリプトに per_page: 100 は現在存在しない(deploy-pr は未指定)
$ rg -n "per_page: 100" .github/workflows/deploy-pages.yml
# AC4
# baseline: FAIL — "Preview removed" テキストは cleanup-pr 実装前は存在しない
$ rg -n "Preview removed" .github/workflows/deploy-pages.yml
# AC5
# baseline: FAIL — "Preview removed" テキストは cleanup-pr の updateComment 実装前は存在しない
$ rg -n "Preview removed" .github/workflows/deploy-pages.yml
# AC6
# preflight-scope: pr_review_only
# reviewer: cleanup-pr ブロック内に createComment の呼び出しがないことを diff で目視確認する
# AC7
# preflight-scope: pr_review_only
# reviewer: PR の diff で cleanup-pr ジョブの permissions ブロックに
#           contents: write と pull-requests: write の両方があることを確認する
# AC8
$ pnpm typecheck
# AC8
$ pnpm lint
# AC8
$ pnpm test
# AC8
$ pnpm build
# AC9
# preflight-scope: pr_review_only
# reviewer: cleanup-pr ブロック内に createComment の呼び出しがないことを diff で目視確認する

Allowed Paths

  • .github/workflows/deploy-pages.yml

Protected Path Exception

  • .github/workflows/deploy-pages.yml の変更は本 Issue の明示スコープとして人間承認済み。
  • 既存 workflow のうち deploy-pages.yml 以外は変更不可。
  • 実装 PR には Safety Claim Matrix を必須とする。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

  • GitHub Actions(actions/github-script ステップ / octokit.rest.issues API / github.paginate)

Scope Delta(任意)

N/A

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR 既定
  • worktree: git worktree add ../loop-protocol-issue-<N> -b issue-<N>

Background

PR #585 で追加した .github/workflows/deploy-pages.yml は、PR の opened/synchronize/reopened 時に pr-<N>/ へデプロイし当該 PR に preview URL をコメントする。PR closed 時の cleanup-pr ジョブは gh-pages の pr-<N>/ ディレクトリ削除のみを行うが、投稿済みの preview URL コメントは残存する。

deploy-pr ジョブは既に <!-- loop-protocol-pr-preview --> marker を持つ bot コメントの upsert を実装済みであるため、cleanup-pr では同 marker を使って対象コメントを特定し「Preview removed」状態に更新する。コメントを削除すると手動プレイテスト導線の証跡が失われるため、更新のみを行う。

fork PR / Dependabot PR では deploy-pr が same-repo guard でスキップされるため preview comment は存在しない。同様に cleanup-pr も same-repo guard でスキップして権限エラーを回避する。

Runtime Verification Applicability

  • decision: deferred
  • reason: GitHub Actions のライブ動作を検証するには実際の PR クローズイベントが必要なため、動作確認は deploy 後の手動確認に延期する。
  • deferred_destination: M1 手動プレイテストフェーズ(実際の PR クローズイベント発生時)
  • deferred_verification_condition: cleanup-pr ジョブが実行され、対象 PR の preview URL コメントが「Preview removed」に更新されていること

Source

PR #585 のレビューで提起された follow-up として自動起票。

dedupe_key: follow-up:squne121/loop-protocol:pr/585:3
source: PR #585 review (pr-review-judge)

Activity

  1. added
    triage-required
    phase/implementation
    enhancement
    agent/implementer
    on Jun 2, 2026
  2. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    判定: BLOCK / Issue 契約を修正してから実装すべき

    Issue #586 の目的自体は妥当です。PR #585 のレビューでも「cleanup-pr 実行後に preview URL コメントが残存する可能性」は任意改善として明示され、follow-up issue request も生成されています。([GitHub]1)
    ただし、現 Issue #586 のまま実装させると、誤削除・権限退行・検証不能・fork PR での失敗を誘発する可能性が高いです。


    主要ブロッカー

    1. 「削除または更新」が広すぎる。削除は証跡を失う

    Issue #586 は「preview URL コメントを削除または Preview removed に更新」としており、AC2 も削除・更新のどちらでも PASS する契約です。([GitHub]2)
    しかし PR #585 のコメントは手動プレイテスト導線の証跡でもあります。実装でコメントを削除すると「どの URL が一時的に存在し、いつ無効化されたか」の監査情報が消えます。

    推奨: 削除ではなく 既存 bot コメントの本文を更新に固定するべきです。コメント本文には次を残すべきです。

    <!-- loop-protocol-pr-preview -->
    ## Preview URL
    
    Preview removed for PR #<N>.
    
    Previous URL: https://squne121.github.io/loop-protocol/pr-<N>/
    
    > This PR preview has been removed because the PR was closed.

    GitHub REST API は issue / PR コメントの update と delete の両方を提供しますが、PR コメントは issue comment として扱われます。([GitHub Docs]3) この用途では delete より update が安全です。


    2. 対象コメントの特定条件が曖昧で、人間コメントを巻き込む余地がある

    Issue #586 は「preview URL を含むコメント(deploy-pr が投稿したもの)を特定」と書いています。([GitHub]2)
    これは危険です。人間がレビューコメントで preview URL を引用していた場合、実装次第では人間コメントを更新・削除できます。

    PR #585 の実装は既に <!-- loop-protocol-pr-preview --> marker を持ち、c.user.type === 'Bot' かつ marker を含むコメントを upsert 対象にしています。([GitHub]4)
    Issue #586 はこの既存仕様を契約に取り込むべきです。

    修正すべき条件:

    対象コメントは以下をすべて満たすものに限定する:
    - user.type == "Bot"
    - body に "<!-- loop-protocol-pr-preview -->" を含む
    - body に "https://squne121.github.io/loop-protocol/pr-${PR_NUMBER}/" を含む
    

    加えて、該当コメントがない場合は 新規コメントを作らず no-op とするべきです。close 後に「Preview removed」だけを新規投稿すると、ノイズが増えます。


    3. listComments のページネーション未指定は 31件目以降を取り逃がす

    Issue #586 の Verification Commands は rg -n "listComments" だけで AC2 を満たす設計です。([GitHub]2)
    これは静的文字列確認でしかなく、正しいコメントを見つけられる保証がありません。

    GitHub REST の issue comments list はデフォルト per_page: 30、最大 100 でページネーション対象です。([GitHub Docs]3)
    PR に bot やレビュー支援のコメントが多い場合、preview comment が 31 件目以降に落ち、cleanup が成功してもコメント更新に失敗します。

    実装契約に入れるべき要件:

    const comments = await github.paginate(github.rest.issues.listComments, {
      owner: context.repo.owner,
      repo: context.repo.repo,
      issue_number: prNumber,
      per_page: 100,
    });

    actions/github-script は pre-authenticated Octokit client と pagination plugins を提供します。([GitHub]5)


    4. cleanup-pr の権限契約が壊れやすい

    Issue #586 の AC3 は「cleanup-pr ジョブの権限ブロックに pull-requests: write が設定されている」と書いています。([GitHub]2)
    しかし PR #585 の既存 workflow は top-level permissions として contents: write / pull-requests: write を付けています。([GitHub]4)

    ここで実装者が cleanup-pr job に job-level permissions を追加し、pull-requests: write だけを指定すると、GitHub Actions の仕様上、未指定 permission は none になります。([GitHub Docs]6)
    その結果、既存の git push に必要な contents: write が消え、gh-pages cleanup が壊れます。

    AC3 は次のどちらかに修正すべきです。

    # A案: top-level permissions を維持するなら
    permissions:
      contents: write
      pull-requests: write

    または

    # B案: job-level に切るなら cleanup-pr で両方を明示
    cleanup-pr:
      permissions:
        contents: write
        pull-requests: write

    「コメント操作権限」だけを見て pull-requests: write に寄せるのは不十分です。cleanup-pr は gh-pages branch への push も行います。


    5. fork PR / Dependabot PR での close event を考慮していない

    PR #585 の deploy-pr には same-repository PR guard が入っています。([GitHub]4)
    一方、cleanup-pr は github.event.action == 'closed' だけで実行されます。([GitHub]4)

    GitHub Actions では fork 由来の pull_request workflow の GITHUB_TOKEN は通常 write 権限を付与できず、write は read-only に落とされます。Dependabot PR も fork 相当として read-only token で動きます。([GitHub Docs]6)
    そもそも fork PR では preview を作らない設計なので、cleanup-pr も同じ条件で skip すべきです。

    修正案:

    cleanup-pr:
      if: >-
        github.event_name == 'pull_request' &&
        github.event.action == 'closed' &&
        github.event.pull_request.head.repo.full_name == github.repository

    これを AC に入れないと、fork PR close 時に不要な cleanup failure が出ます。


    6. .github/workflows/ は保護パスなのに、Protected Path Exception がない

    Issue #9 では .github/workflows/ が「CI 定義(AI による無断改変禁止)」として保護対象に入っています。([GitHub]7)
    Issue #582 は protected path exception を明示していましたが、Issue #586 には同等の明示がありません。([GitHub]8)

    Issue #586 は .github/workflows/deploy-pages.yml の変更だけを許可しているため、protected path 例外を明記しないと、実装エージェント・レビューエージェント・hook 方針の間で契約衝突します。

    追加すべき文言:

    Protected Path Exception:
    - `.github/workflows/deploy-pages.yml` の変更は本 Issue の明示スコープとして人間承認済み。
    - 既存 workflow のうち `deploy-pages.yml` 以外は変更不可。
    - 実装 PR には Safety Claim Matrix を必須とする。

    修正版 Issue 契約案

    Outcome 修正案

    `.github/workflows/deploy-pages.yml` の `cleanup-pr` ジョブが、PR close 時に gh-pages 上の `pr-<N>/` を削除した後、`deploy-pr` が投稿した preview URL bot コメントを削除せず、`Preview removed` 状態へ更新する。
    
    対象コメントは `<!-- loop-protocol-pr-preview -->` marker を含む GitHub Actions bot コメントに限定し、人間コメントや marker のないコメントは変更しない。

    In Scope 修正案

    - `.github/workflows/deploy-pages.yml` の `cleanup-pr` ジョブに `actions/github-script` step を追加
    - cleanup-pr の same-repository PR guard 追加
    - preview comment の更新ロジック
      - `github.paginate(github.rest.issues.listComments, { per_page: 100 })` を使う
      - `user.type === "Bot"` かつ `<!-- loop-protocol-pr-preview -->` marker を含むコメントのみ対象
      - 対象 URL が `https://squne121.github.io/loop-protocol/pr-${PR_NUMBER}/` と一致することを確認
      - 該当コメントがない場合は no-op
      - コメント削除は禁止。既存コメントを `Preview removed` に更新する
    - cleanup directory が削除済み、または存在しない場合のみ removed 表示に更新
    - cleanup directory の削除 / push が失敗した場合はコメントを removed に更新しない

    Out of Scope 修正案

    - deploy-pr の preview comment 作成/upsert ロジック変更
    - main deploy の変更
    - SHA pinning / actionlint CI 導入(#280 で追跡)
    - docs 更新
    - pull_request_target への変更
    - PAT / GitHub App token の導入

    pull_request_target は権限面では強いですが、fork PR の untrusted code と混ぜると危険です。今回の改善は既存 pull_request workflow の範囲で完結させるべきです。

    Acceptance Criteria 修正案

    - AC1: `cleanup-pr` job に `actions/github-script` step が存在する
    - AC2: `cleanup-pr` job は same-repository PR の closed event のみで実行される
    - AC3: コメント更新対象は `user.type === "Bot"` かつ `<!-- loop-protocol-pr-preview -->` marker を含むコメントに限定される
    - AC4: `github.paginate(github.rest.issues.listComments, ...)` を使用し、30件超のコメントでも対象コメントを探索できる
    - AC5: 対象コメントがある場合、削除ではなく `Preview removed` 本文へ更新される
    - AC6: 対象コメントがない場合、新規コメントを作成しない
    - AC7: permissions は `contents: write` と `pull-requests: write` を維持し、job-level override で `contents: write` を消さない
    - AC8: `pnpm typecheck` / `pnpm lint` / `pnpm test` / `pnpm build` が PASS
    - AC9: `actionlint .github/workflows/deploy-pages.yml` 相当の workflow 構文検証が PASS

    追加すべき Verification Commands

    # workflow 構文
    actionlint .github/workflows/deploy-pages.yml
    
    # same-repo guard
    rg -n "github.event.pull_request.head.repo.full_name == github.repository" .github/workflows/deploy-pages.yml
    
    # marker-based targeting
    rg -n "loop-protocol-pr-preview" .github/workflows/deploy-pages.yml
    rg -n "user.type === 'Bot'|user.type === \"Bot\"" .github/workflows/deploy-pages.yml
    
    # pagination
    rg -n "github\\.paginate\\(.*listComments|paginate\\(github\\.rest\\.issues\\.listComments" .github/workflows/deploy-pages.yml
    
    # update only / no delete
    rg -n "updateComment" .github/workflows/deploy-pages.yml
    ! rg -n "deleteComment" .github/workflows/deploy-pages.yml
    
    # no create on cleanup
    # cleanup-pr block 内に createComment がないことを目視または awk で確認
    
    # 権限退行防止
    rg -n "contents: write" .github/workflows/deploy-pages.yml
    rg -n "pull-requests: write" .github/workflows/deploy-pages.yml
    
    # 標準品質ゲート
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    推奨コメント本文

    Issue #586 は目的は妥当ですが、このまま実装すると危険です。
    
    ブロッカー:
    1. 「削除または更新」ではなく「更新」に固定してください。preview URL コメントは手動プレイテスト導線の証跡でもあり、削除すると監査情報が消えます。
    2. 対象コメントを「preview URL を含むコメント」ではなく、`<!-- loop-protocol-pr-preview -->` marker を含む GitHub Actions bot コメントに限定してください。人間コメントを巻き込む余地があります。
    3. `listComments` はデフォルト 30 件なので、`github.paginate(github.rest.issues.listComments, { per_page: 100 })` を契約に入れてください。
    4. `cleanup-pr` に job-level permissions を追加する場合、`pull-requests: write` だけでは既存の gh-pages push 用 `contents: write` が消える可能性があります。`contents: write` と `pull-requests: write` の両方を維持してください。
    5. `deploy-pr` と同じ same-repository PR guard を `cleanup-pr` にも入れてください。fork PR / Dependabot PR では write token が read-only に落ちるため、close 時 cleanup/comment update を試みるべきではありません。
    6. `.github/workflows/` は protected path なので、Protected Path Exception と Safety Claim Matrix 要求を Issue に明記してください。
    
    推奨仕様:
    - コメント削除は禁止
    - 対象コメントがある場合のみ `Preview removed` に更新
    - 対象コメントがない場合は no-op
    - cleanup directory の削除または既に存在しないことを確認できた場合のみ removed 表示に更新
    - cleanup が失敗した場合はコメントを removed にしない

    この修正を入れれば、Issue #586 は「任意 UX 改善」から「安全に実装可能な workflow 改修」に格上げできます。

  3. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    コントラクトレビュー結果: BLOCKED (2026-06-03T00:00:00Z)

    生成者: issue-contract-review スキル

    不足項目の概要

    AC7 の Verification Commands に 2 つのブロッカーがあります。これを修正してください。

    ブロッカー 1: コマンドとして誤認識される非コマンド行

    "Preview removed" VC 実装後に diff で確認 という行は行頭に # がないため、preflight スクリプトがコマンドとして解釈し command_not_allowed でブロックされます。修正方法: 行頭に # を追加してコメント行にしてください。

    ブロッカー 2: baseline で pass してしまう rg コマンド

    rg -n "contents: write" .github/workflows/deploy-pages.yml というコマンドは、contents: write がすでに cleanup-pr ジョブの L164 に存在するため、実装前でも exit 0 になります。これは baseline fail を証明できない VC です。pull-requests: write も deploy-pr の L78 に既存なので、単純な rg では cleanup-pr 専用の追加を確認できません。

    修正方法: AC7 の VC 全体を # preflight-scope: pr_review_only 形式に変更し、PR diff 確認に切り替えてください。

    # AC7
    # preflight-scope: pr_review_only
    # reviewer: PR の diff で cleanup-pr ジョブの permissions ブロックに
    #           contents: write と pull-requests: write の両方があることを確認する

    VC Preflight の全結果

    AC1〜AC5 および AC8 はすべて go です。AC7 の 2 件のみブロックされています。

    • AC1 は baseline で正常に fail しており go
    • AC2 は baseline で正常に fail しており go
    • AC3 は baseline で正常に fail しており go
    • AC4 は baseline で正常に fail しており go
    • AC5 は baseline で正常に fail しており go
    • AC7 の 1 行目: コマンドとして誤認識されブロック(category: command_not_allowed)
    • AC7 の 2 行目: 実装前から pass するため baseline fail の証拠にならずブロック(category: unexpected_pass)
    • AC8 は回帰テストとして正常に通過(go)

    その他のチェック: テンプレート準拠は pass、ブロッカーは存在しない、product_spec_check は not_applicable、worktree の衝突もなし。

    推奨アクション

    Issue 本文の ## Verification Commands 内 AC7 ブロックを上記の修正案に変更したうえで、issue-contract-review を再実行してください。

    CONTRACT_REVIEW_RESULT_V1:
      status: blocked
      generated_at: "2026-06-03T00:00:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/586
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: false
          vc_failed_as_expected: 5
          vc_passed_unexpectedly: 1
          vc_unrunnable: 1
          vc_expected_pass: 4
          vc_skipped: 0
        ac_verifiability: blocked
        product_spec_check:
          applicability: not_applicable
          decision: pass
        worktree_branch_collision: clear
      next_action: fix_vc_and_rerun_contract_review
      blocked_reasons:
        - ac: AC7
          category: command_not_allowed
          fix: "行頭に # を付けてコメント行にする"
        - ac: AC7
          category: unexpected_pass
          fix: "preflight-scope pr_review_only を追加"
  4. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    コントラクトスナップショット (2026-06-03T00:00:00Z)

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-03T00:00:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/586
      body_sha256: "sha256:f4f838cf765681dc161463f6bf8e863d76cdacf7e1af1b1a89bf0a24b9765d17"
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 5
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 4
          vc_skipped: 2
          classifications:
            - ac: AC1
              command: "rg -n \"Preview removed\" .github/workflows/deploy-pages.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC2
              command: "rg -n \"action == 'closed' &&\" .github/workflows/deploy-pages.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC3
              command: "rg -n \"per_page: 100\" .github/workflows/deploy-pages.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n \"Preview removed\" .github/workflows/deploy-pages.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC5
              command: "rg -n \"Preview removed\" .github/workflows/deploy-pages.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC6
              command: "# preflight-scope: pr_review_only"
              category: skipped
              scope_class: pr_review_only
              decision: go
              verification_owner: pr-review-judge
              runtime_verification_required: false
            - ac: AC7
              command: "# preflight-scope: pr_review_only"
              category: skipped
              scope_class: pr_review_only
              decision: go
              verification_owner: pr-review-judge
              runtime_verification_required: false
            - ac: AC9
              command: "# preflight-scope: pr_review_only"
              category: skipped
              scope_class: pr_review_only
              decision: go
              verification_owner: pr-review-judge
              runtime_verification_required: false
            - ac: AC8
              command: pnpm typecheck
              exit_code: 0
              category: regression_gate
              scope_class: regression_gate
              confidence: low
              decision: go
            - ac: AC8
              command: pnpm lint
              exit_code: 0
              category: regression_gate
              scope_class: regression_gate
              confidence: low
              decision: go
            - ac: AC8
              command: pnpm test
              exit_code: 0
              category: regression_gate
              scope_class: regression_gate
              confidence: low
              decision: go
            - ac: AC8
              command: pnpm build
              exit_code: 0
              category: regression_gate
              scope_class: regression_gate
              confidence: low
              decision: go
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings: []

    実装計画の概要

    • Outcome: cleanup-pr ジョブが PR close 時に <!-- loop-protocol-pr-preview --> marker を含む bot コメントを「Preview removed」に更新する
    • Acceptance Criteria: AC1〜AC9(合計 9 件)
    • Allowed Paths: .github/workflows/deploy-pages.yml のみ
    • Worktree: .claude/worktrees/issue-586-cleanup-pr-preview-url
    • Branch: worktree-issue-586-cleanup-pr-preview-url
    • VC preflight: baseline fail = 5、回帰テスト pass = 4、pr_review_only = スキップ 3、想定外 pass = 0、実行不可 = 0
  5. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了(2026-06-03T06:38:00Z)

  6. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    impl-review-loop 完了報告 (2026-06-03T00:00:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations: []
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-06-03T00:00:00Z"
      rollup_plan_ref:
        body_sha256: "aad0da7c7b0204df686eb59c240362b2acbef34a74132137d1d4d13fc54c878a"
        generated_at: "2026-06-02T21:35:18.469796Z"
      decision: deferred
      executed_actions: []
      skipped_reason: null
      candidates_reviewed:
        - kind: issue
          number: 588
          confidence: medium
          suggested_action: human_review_required
          final_decision: deferred
          rejection_reason: "scope rollup は汎用 collision 判定のみ(差し戻し禁止)"
    LOOP_STATE:
      issue_number: 586
      contract_snapshot_url: https://github.com/squne121/loop-protocol/issues/586#issuecomment-4607190553
      contract_snapshot_source: materialized_by_issue_contract_review
      iteration: 0
      max_iterations: 3
      worktree: .claude/worktrees/issue-586-cleanup-pr-preview-url
      branch: worktree-issue-586-cleanup-pr-preview-url
      last_step: judgment
      last_loop_verdict: APPROVE
      blockers_history: []
      termination_reason: approved
      intake_gate:
        status: pass
        subreason: null
      product_spec_preflight:
        applicability: not_applicable
        decision: pass
        routing_action: continue
  7. added 2 commits that reference this issue on Jun 2, 2026
  8. squne121 commented on Jun 2, 2026

    @squne121
    OwnerAuthor

    マージ後クリーンアップ完了 (2026-06-03T00:00:00Z)

    • 実行結果: ok
    • Issue は PR マージで自動クローズ済み
    • 次のアクション: なし
    POST_MERGE_CLEANUP_REPORT_V1:
      status: ok
      generated_at: "2026-06-03T00:00:00Z"
      generated_by: post-merge-cleanup-worker
      human_review_required: false
      cleaned_branches:
        - worktree-issue-586-cleanup-pr-preview-url
      cleaned_worktrees:
        - path: .claude/worktrees/issue-586-cleanup-pr-preview-url
          note: "main sync 後に自動整理済み。物理ディレクトリなし確認済み。"
      unresolved_cleanup_items: []
      parent_issue_status:
        parent_issue_number: null
        all_children_closed: true
        recommended_action: n/a
      superseded_prs: []
      follow_up_issue_requests: []
      stash_restored: n/a
      stash_entry_ref: null
      warnings: []
      errors: []
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: post-merge-cleanup
      follow_up_issues: []
      note_only_observations: []
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