Skip to content

再発防止: impl-review-loop の通常 APPROVE 経路でも Step 2 後の PR body evidence を同期する #3049

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "impl-review-loop の通常 APPROVE 経路で、Step 2 の実測 runtime/handoff evidence が PR body の未実施・未確認記述を更新した後も stale のまま terminal approval へ到達する再発を防ぐ"
change_kind: workflow
dedupe_key: "impl-review-loop:approved-path-post-step2-runtime-evidence-pr-body-sync:v1"

Parent Issue

なし。PR #3044 の独立した post-verification evidence publication gap。#3033 の実装/merge の blocker にはしない。

Parent Goal Ref

  • Source: PR #3044 adversarial review の P3 と、実セッション readback 証跡。
  • Desired Destination: current HEAD で実 Step 2 完了後、実際に観測した runtime evidence と PR body を矛盾なく公開し、HEAD / body readback と必要な CI / fresh review を経て canonical terminal gate へ進む。

Current Validated Scope / Evidence

Outcome

root は実際の Step 2 report と raw→JSON readback の観測から公開可能な事実だけを current PR body に同期する。過去の pending/未実施文言が残る場合は、既存 sanctioned PR-body update route、readback、current-head required CI / fresh review で是正し、terminal approval に進む。未観測の runtime verification を自動的に「確認済み」にしない。

In Scope

  1. 通常の APPROVE 経路(reviewer の REQUEST_CHANGES を待たない経路)で、Step 2 の 観測済み evidence と PR body の pending wording / evidence section を照合し、意味的矛盾があれば body-only 同期する位置と順序を、現行 impl-review-loop に最小限明記・実装する。可能なら既存の body-only machinery / implementation-worker update_pr_body_hygiene / open-pr/scripts/update_pr.py を再利用する。既存の #2971 reactive lane の eligibility と authority は維持する。
  2. HEAD 不変・Issue body/command binding 不変なら VC の無条件再実行は不要。ただし PR body 更新後の live readback、必要な edited-trigger required CI の freshness、変更後の reviewer verdict、保存した dispatch seq、step5-terminal-gate の authority は省略しない。
  3. 未観測/deferred の報告、すでに同期済み、実観測済みだが本文が stale の各ケースで、明確な positive/negative regression を追加する。証跡が無いケースに成功値を補完しない。
  4. PR Step 2 の test-runner report を lossless に Step 4 へ受け渡す手順と回帰テストを追加する #3044 自体の P3 本文修正は同 PR の最小修正として行う。本 Issue はそのための hard dependency にしない。

Out of Scope

Acceptance Criteria

Runtime Verification Applicability

  • decision: deferred
  • reason: Python unit/integration tests で routing を固定できても、実対話 Claude Code が Step 2 後に証跡を公開し PR body を同期したことは別の実セッションで確認が必要。
  • deferred_destination:
    • destination_type: phase
    • destination_ref: next-live-impl-review-loop-post-step2
  • deferred_verification_condition: 実対話的 Step 2 により生成した証跡を current PR body に同期し、HEAD / body readback / post-edit CI / fresh reviewer / terminal gate を確認する。未観測を PASS と扱わない。

Verification Commands

# AC1
# baseline-expect: fail
$ rg -n "APPROVE 経路の runtime evidence 同期" .claude/skills/impl-review-loop/steps/step-2-verification.md
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_pr_body_runtime_evidence_sync.py -q -k sync_observed_to_terminal
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_pr_body_runtime_evidence_sync.py -q -k unobserved_and_already_synced
# AC4
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_body_only_repair_plan.py -q

Allowed Paths

  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/step-2-verification.md
  • .claude/skills/impl-review-loop/steps/step-4-pr-review.md
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
  • .claude/skills/impl-review-loop/tests/test_pr_body_runtime_evidence_sync.py
  • .claude/skills/impl-review-loop/tests/test_body_only_repair_plan.py
  • .claude/skills/impl-review-loop/scripts/body_only_repair_plan.py
  • .claude/agents/implementation-worker.md

Stop Conditions

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

Required Skills

なし

Required Design References

  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/step-2-verification.md
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
  • .claude/skills/impl-review-loop/scripts/body_only_repair_plan.py
  • .claude/agents/implementation-worker.md
  • docs/dev/workflow.md

Delivery Rule

1 Issue = 1 PR。実装前に current issue-refinement-loop で Allowed Paths と手順の feasibility を再点検。PR #3044 の P1/P2 修正、レビュー、merge を止めない。実 merge は人間判断まで保留。

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions