Skip to content

調査: #2102 scope-clean reconciliation と VC current-head binding の間で base-only HEAD drift 時の live verification 再実行を最小化できるか #2756

Open

Description

@squne121

Summary

PR #2749 で、current-head review / live verification 済みの HEAD 5457a88... に対して main を取り込んだ結果、PR-owned の変更3ファイル自体は不変のまま HEAD が 9ce36ee... へ移動し、impl-review-loop の current-head binding が stale になった。

現行契約ではこれは意図どおりであり、route_stale_head_rereview と VC current-head binding に従って verification / PR review を再実行する必要がある。一方、頻繁に main を追随する運用では、PR差分に無関係な base-only drift でも高価な live verification が繰り返され、bounded loop の iteration 消費・Claude CLI 実行コスト・手戻りが増える可能性がある。

本 Issue は current-head authority を弱めずに、この再実行コストを安全に削減できる条件が存在するかを調査する。

Trigger / Evidence

Existing Contracts to Preserve

This Issue must not weaken those guarantees by simply accepting a stale SHA-bound verdict.

Existing Partial Mechanism / Narrowed Gap

Issue #2102 already implements route_scope_clean_reconciliation for main drift and selectively invalidates/rebinds base-bound snapshot / CI / review evidence without spending the ordinary implementation iteration budget. That mechanism is a required precedent and must be reused rather than reimplemented.

The remaining question in this Issue is narrower:

This Issue must investigate only that integration boundary. Any implementation should extend or compose with #2102 rather than adding a parallel drift/reconciliation framework.

Goal

Determine whether a narrow, deterministic fast path can distinguish:

  1. review staleness — current HEAD must always be reviewed again; from
  2. verification invalidation — expensive VC/live verification must be rerun only when its actual semantic inputs changed,

while keeping full rerun as the fail-closed default.

Investigation Scope

  • Characterize update_branch / main integration cases where:
    • PR patch/diff is unchanged,
    • PR-owned files are unchanged,
    • verification commands are unchanged,
    • but commit SHA changes only because base history advanced.
  • Inventory current VC_ADJUDICATION_RESULT_V1 binding inputs and identify which inputs are safety-critical versus conservative identity-only coupling.
  • Evaluate whether a content/tree/dependency-closure fingerprint can prove verification-input equivalence across two HEADs without trusting agent self-report.
  • Evaluate whether current-head PR review can be rerun while selectively reusing a prior expensive verification result only when equivalence is deterministically proven.
  • Treat runtime/integration/live-Claude verification as non-reusable unless the investigation can prove that all relevant runtime inputs are unchanged.
  • Measure the proposed rule against PR fix: 完了済み structured runtime-smoke の post-session statusLine を not_applicable として扱う #2749 as a concrete case.

Safety / Non-Goals

  • Do not bypass current-head PR review.
  • Do not reuse a prior verification result merely because PR changed filenames or textual patch look unchanged.
  • Do not replace current-head CI with cached CI.
  • Do not introduce TTL-based trust, agent self-attested equivalence, or a broad generic command cache.
  • Do not change PR fix: 完了済み structured runtime-smoke の post-session statusLine を not_applicable として扱う #2749's current execution path; that PR should complete the existing full current-head verification/review contract independently of this investigation.

Acceptance Criteria

Likely Relevant Files

  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/impl-review-loop/steps/step-5-mergeability-handling.md
  • .claude/skills/impl-review-loop/steps/step-5-feedback-and-termination.md
  • .claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py
  • .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
  • related tests under .claude/skills/impl-review-loop/tests/

Notes

This is an optimization/reliability investigation, not a blocker for PR #2749. Until a safe rule is implemented and reviewed, current behavior remains authoritative: changed HEAD => current-head verification/review according to the existing loop contract.

Activity

  1. added
    triage-required
    on Sep 25, 2026
  2. changed the title [-]調査: impl-review-loop の base-only HEAD drift で current-head verification 全再実行が必要になるコストを安全に削減できるか[/-] [+]調査: #2102 scope-clean reconciliation と VC current-head binding の間で base-only HEAD drift 時の live verification 再実行を最小化できるか[/+] on Sep 25, 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

    triage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions