Skip to content

実装: reconciliation_required 中の V2 worker dispatch を禁止し fresh reconciliation 再判定を固定する #2823

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "impl-review-loop の pre-Step-1 reconciliation_required が implementation-worker V2 repair へ直行せず、reconciliation 後の fresh disposition 再判定を必須にする"
change_kind: workflow

Parent Issue

none

Parent Goal Ref

N/A(PR #2816 の運用で発見した独立 follow-up)

Current Validated Scope

N/A

Remaining Parent Gaps

N/A

Outcome

impl-review-loop の pre-Step-1 landing disposition が reconciliation_required で、canonical pre_step1_data_plane.start_data_plane == false の場合、root/main orchestrator が implementation-worker の V1/V2 を一切 dispatch せず、fresh evidence の reconciliation → landing disposition 再評価を先に完了することを手順と focused regression で固定する。

特に open_draft_scope_ownership_not_exact が Issue scope delta による durable marker の stale ownership だけで発生した場合は、既存 PR / worktree を duplicate せず、canonical PR-body update / marker regeneration 等の reconciliation を行い、fresh intake で existing_pr_resume 等の許可された disposition に変わったことを確認してから downstream repair/verification/review に進む。

既存の route_loop_verdict_v2.py::resolve_pre_step1_data_plane_action() を authority とし、新しい registry / schema / approval layer / wrapper は追加しない。

Runtime Verification Applicability

  • decision: not_applicable
  • reason: current production route の既存 boolean/action 契約と orchestration procedure の parity を focused pytest / static contract test で固定できるため

In Scope

  • .claude/skills/impl-review-loop/steps/preparation.md に、start_data_plane: false は implementation-worker V1 と V2 の全 mode(少なくとも apply_pr_review_fix_delta / update_pr_body_hygiene / update_branch)を pre-Step-1 では禁止することを明示する
  • reconciliation_required、特に open_draft_scope_ownership_not_exact が scope delta / stale durable marker による場合の最小 reconciliation 順序を明示する:
    1. worker を起動しない
    2. existing PR/worktree を duplicate しない
    3. canonical evidence/PR-body reconciliation を実施
    4. fresh landing disposition を再取得
    5. existing_pr_resume / ordinary_dispatch_or_explicit_recovery 等、current route が許可した action にだけ進む
  • .claude/skills/impl-review-loop/steps/step-1-implementation.md に、Step 1 / V2 repair dispatch は pre-Step-1 data-plane gate を迂回する authorization ではないことを明記する
  • 既存 test architecture に focused regression を追加し、reconciliation_required → start_data_plane:false → worker suppression が V2 repair を含む契約であることと、reconciliation 後の fresh existing_pr_resume が duplicate PR 作成なしの resume route になることを固定する
  • PR 実装: IMPLEMENTATION_SCOPE_COVERAGE_V1 marker の canonical-parser 検証を validate_pr_body.py に集約する (#2811) #2816 で観測された failure sequence を regression rationale として記録する

Out of Scope

Acceptance Criteria

  • AC1: preparation.md が start_data_plane:false のとき implementation-worker V1/V2 の dispatch を禁止すると明示し、V2 repair を例外扱いしない
  • AC2: reconciliation_required の open_draft_scope_ownership_not_exact が scope delta / stale marker 起因の場合、reconciliation → fresh disposition 再判定 → downstream action の順序が documented contract として明示される
  • AC3: step-1-implementation.md が pre-Step-1 suppression を満たさない invocation から V1/V2 worker を開始しない precondition を明示する
  • AC4: focused regression が resolve_pre_step1_data_plane_action({"disposition":"reconciliation_required", ...}) の start_data_plane == false / suppression action を確認し、V2 repair が bypass exception ではないことを contract-level assertion で固定する
  • AC5: focused regression が reconciliation 後に exact current-scope ownership を持つ open/draft candidate が existing_pr_resume へ遷移し、duplicate new PR/worktree dispatch ではなく resume になることを確認する
  • AC6: impl-review-loop の relevant tests が pass し、既存 production route function を authority としたまま新規 mechanism を追加していない

Verification Commands

# AC1 / AC2
$ rg -n "start_data_plane|reconciliation_required|apply_pr_review_fix_delta|open_draft_scope_ownership_not_exact|fresh.*disposition" .claude/skills/impl-review-loop/steps/preparation.md

# AC3
$ rg -n "pre-Step-1|start_data_plane|V2|repair" .claude/skills/impl-review-loop/steps/step-1-implementation.md

# AC4 / AC5
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py -q

# relevant contract tests
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_preparation_entry_policy.py -q

# regression suite
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/ -q

Allowed Paths

  • .claude/skills/impl-review-loop/steps/preparation.md
  • .claude/skills/impl-review-loop/steps/step-1-implementation.md
  • .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
  • .claude/skills/impl-review-loop/tests/test_preparation_entry_policy.py

Stop Conditions

  • Allowed Paths 外の production code 変更が必要と判明した場合
  • pre_step1_data_plane の schema / action enum 変更が必要と判明した場合
  • current route function 自体に defect があり、docs/test parity だけでは閉じられないと判明した場合
  • 新規 generic orchestration framework / approval layer が必要になる場合
  • nested SubAgent delegation が必要になった場合

Required Skills

なし

Required Design References

Scope Delta(任意)

N/A

Notes for Reviewer

Delivery Rule

  • 1 Issue = 1 PR
  • current main から canonical worktree を使う
  • 実 merge / auto-merge は行わない

Activity

  1. added
    enhancement
    phase/implementation
    on Sep 28, 2026
  2. squne121 commented on Oct 14, 2026

    @squne121
    OwnerAuthor

    再現観測(#3053 / PR #3054)

    承認済み Scope Delta(Allowed Paths 2 文書の追加)で open_draft_scope_ownership_not_exact が発生し、start_data_plane: false で停止した。既存の open Draft PR の IMPLEMENTATION_SCOPE_COVERAGE_V1 marker が旧 Issue 本文を記録していたことだけが原因で、正規の recovery 手順は文書化されていなかった。

    今回は、追加スコープを既存 worktree で実装して push し、canonical builder(build_scope_coverage_marker)で現行 Issue 本文・実装後 head の marker を再生成し、update_pr.py で PR 本文を更新した。その後の fresh build_intake_capsule.py は existing_pr_resume / resume_existing_pr を返した。旧 SHA の書き換えではなく、実装後の再生成である。

    本 Issue の手順固定の対象は、この「実装後 marker 再生成 → fresh 再判定」の順序と、worker を dispatch できない間の control-plane の許可範囲(既存 worktree 内の Allowed Paths 編集)である。新規 Issue は起票しない。

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

    enhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions