Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "main の前進を通常の並行イベントとして扱い、issue-refinement-loop と impl-review-loop が base-bound evidence を選択的に無効化して scope-clean に再束縛・再検証できるようにする"
change_kind: codeParent Issue
なし(単独改善)
Parent Goal Ref
- Goal: main drift 発生時に loop/policy/executor の証跡束縛を安全かつ決定論的に再確立する。
- Desired Destination: なし(実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 の RVA-only 契約とは独立した実装 Issue)。
Current Validated Scope
- live 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 は RVA-only であり、loop/policy/executor redesign をその Allowed Paths に含めないことを live body で確認した。
- main drift を concurrency event として、refinement と implementation の各 loop が base-bound evidence を選択的に invalidation / rebind / reverify する制御面に限定する。
- controlled commit の canonical interface を materialize-request end-to-end に統一し、snapshot-json 単独 authority を拒否する。
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040、fix(contract-review): RVA 欠落を fail-closed に統一 #2070、fix-bootstrap-refs #2081 は背景参照だけであり、本文・comment・close・dependency は mutation しない。親 Issue は設けない。
Remaining Parent Gaps
なし(本 Issue は単独の implementation contract であり、#2070 の回復は後続 flow の責務)。
Outcome
main drift を検出した loop/policy/executor が更新済み実装と回帰テストにより、stale な snapshot・CI・review evidence を再利用せず、Allowed Paths の latest-main net diff を基準に選択的な再束縛・再検証を完了できる状態にする。
Runtime Verification Applicability
- decision: not_applicable
- reason: loop state、Git topology、policy parity、executor の静的・subprocess 契約を Python/TypeScript 回帰テストと repository gate で検証する変更であり、外部 runtime session は必要としない。
Background
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 は current contract が RVA-only のため、同 Issue の Allowed Paths を loop/policy/executor redesign に拡張しない。
- fix(contract-review): RVA 欠落を fail-closed に統一 #2070 は本 Issue の後続 flow で安全に回復できる対象であり、本 PR の delivery target ではない。
- fix-bootstrap-refs #2081 は main drift と stale evidence の背景参照に限定する。
- 採用方針: prompt 注記や手作業 rebase を workaround とせず、guard、policy、loop route、snapshot materialization、publish executor の決定論的な再束縛を実装する。
In Scope
- evidence epoch、base SHA、expected-head / expected-old CAS、iteration counter を loop state と route 判定に明示し、main drift は implementation iteration budget を消費しないようにする。
- refinement loop と implementation loop の責務境界を保ち、各々が保有する mutation と evidence のみを invalidation / rebind / reverify する。
- impl loop の BEHIND fast path と、fast path 非適用時の deterministic scope-clean reconciliation を実装する。
- materialize-request を controlled commit の唯一の canonical interface とし、snapshot-json 単独入力を拒否する。
- protected ref、identity、write guard、Allowed Paths、latest-main net diff、postcondition live readback の policy parity を guard・executor・rules・docs に反映する。
- stale Allowed Paths、base SHA mismatch、CAS race、protected ref、identity/write guard failure、semantic ambiguity、stale CI/review/snapshot、poll bound を含む adversarial regression を追加する。
Out of Scope
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040、fix(contract-review): RVA 欠落を fail-closed に統一 #2070、fix-bootstrap-refs #2081 の Issue 本文、comment、close、dependency relation の mutation。
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 の RVA source paths、RVA decision policy、runtime-verification schema の変更。
- raw
git add、git commit、generic force push、protected branch の直接更新、外部 service 権限の変更。 - fix(contract-review): RVA 欠落を fail-closed に統一 #2070 の recovery PR、実装 Issue 以外の workflow redesign、Allowed Paths 外の consumer / CI 設定変更。
Design Invariants
- raw add / commit / generic force は authority にしない。controlled commit は materialize-request のみを入力契約とし、snapshot-json 単独 authority は拒否する。
- expected-head と expected-old は CAS として検証し、protected ref・identity・write guard を bypass しない。
- live postcondition readback を省略せず、Allowed Paths の判定は latest main との差分で行う。
- main drift は implementation iteration budget を消費しない。semantic ambiguity だけを停止条件にする。
- refinement mutation と implementation mutation の責任を混在させず、各 loop は stale CI/review/snapshot evidence を再利用しない。
- stale Allowed Paths は scope-clean reconciliation の成功根拠にせず、current main に再束縛した scope snapshot を必要とする。
Acceptance Criteria
- AC1 (Phase A: evidence epoch / rebind / budget): main の base SHA が evidence epoch の base と異なるとき、refinement loop は base-bound snapshot / review evidence を stale と分類し、current main に束縛した epoch を要求する。main drift は implementation iteration counter を増加させず、drift 起因の再試行を budget exhaustion と分類しない。reconciliation は current base、expected head、evidence epoch、scope snapshot を再束縛し、古い CI/review/snapshot URL を reusable evidence として返さない。stale CI、review、Contract Snapshot、scope snapshot は evidence epoch が current base に一致しない限り reverify 対象となり、approval / go evidence に再利用されない。scope snapshot materialization は issue scope を current main へ再束縛し、旧 base に結び付く materialization を postcondition readback 前に失敗として扱う。
- AC2 (Phase B: implementation routing / reconciliation / fail-closed): impl loop は current PR head が main に対して BEHIND の場合、許可された BEHIND fast path を選び、semantic reconciliation を不必要に起動しない。BEHIND fast path の precondition を満たさない場合、impl loop は deterministic scope-clean reconciliation に遷移する。semantic ambiguity がない scope-clean drift は reconciliation 成功として route され、human stop に昇格しない。semantic ambiguity、base SHA fingerprint mismatch、または current main で解消できない Allowed Paths conflict は fail-closed stop とし、mutation を実行しない。route verdict と publish replay executor は drift recovery 後の current head / current base を明示し、old head の publish 又は review verdict を成功として返さない。update_branch の input validation と poll bounds は fast path / reconciliation のどちらでも bounded であり、unbounded poll や generic retry を導入しない。
- AC3 (Phase C: controlled mutation / policy / Allowed Paths / adversarial): reconciliation は latest main と Allowed Paths の net diff を使い、stale Allowed Paths の snapshot を成功根拠として使わない。expected-head CAS mismatch と expected-old CAS mismatch はそれぞれ決定論的な failure reason で拒否され、最新 ref の上書きを行わない。controlled commit executor は materialize-request を end-to-end で受け取り、materialize-request を欠く snapshot-json 単独入力を拒否する。raw add、raw commit、generic force、protected ref 更新、identity mismatch、write guard failure は policy と executor で同じ拒否結果になる。successful controlled mutation は expected-head / expected-old、protected / identity / write guard、Allowed Paths scope を検証し、live postcondition readback が一致した場合だけ成功を返す。adversarial test suite は stale Allowed Paths、stale evidence epoch、BEHIND/non-BEHIND 分岐、CAS race、protected/identity/write guard、snapshot-json bypass、semantic ambiguity、postcondition readback mismatch を固定する。
- AC4 (Phase D: responsibility boundary): refinement loop の Issue-body / scope-snapshot mutation と implementation loop の branch / PR evidence mutation は別 route として保持され、互いの mutation authority を再利用しない。
- AC5 (Phase E: complete gates and Allowed Paths): targeted pytest、Python policy/guard tests、pnpm typecheck、pnpm lint、pnpm test、pnpm build が PASS し、変更は Allowed Paths 内に閉じる。
Verification Commands
# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_main_drift_evidence_epoch.py -q# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_main_drift_routing.py -q# AC3
# baseline-expect: fail
$ uv run --locked pytest scripts/agent-guards/tests/test_main_drift_controlled_mutation.py -q# AC4
# baseline-expect: fail
$ uv run --locked pytest scripts/agent-ops/tests/test_main_drift_replay_publish.py -q# AC5
# baseline-expect: fail
$ uv run --locked pytest tests/agent_ops/test_main_drift_update_branch.py -q# AC5
# preflight-scope: pr_review_only
$ pnpm typecheck# AC5
# preflight-scope: pr_review_only
$ pnpm lint# AC5
# preflight-scope: pr_review_only
$ pnpm test# AC5
# preflight-scope: pr_review_only
$ pnpm buildAllowed Paths
scripts/agent-guards/controlled_git_change_exec.pyscripts/agent-guards/git_mutation_command_policy.pyscripts/agent-guards/worktree_scope_guard.pyscripts/ci/codex_execpolicy_matrix.pyscripts/agent-guards/tests/test_controlled_git_change_exec.pyscripts/agent-guards/tests/test_pretool_fastpath_classifier.pyscripts/agent-guards/tests/test_materialize_issue_scope_snapshot.pyscripts/agent-guards/tests/test_main_drift_controlled_mutation.py.codex/rules/default.rulesdocs/dev/agent-runtime-ops.mddocs/dev/hook-boundaries.md.claude/skills/impl-review-loop/scripts/route_loop_verdict_v2.py.claude/skills/impl-review-loop/steps/.claude/skills/impl-review-loop/tests/.claude/skills/impl-review-loop/tests/test_main_drift_routing.py.claude/skills/implement-issue/scripts/update_branch.py.claude/skills/implement-issue/tests/.claude/skills/issue-refinement-loop/scripts/.claude/skills/issue-refinement-loop/tests/.claude/skills/issue-refinement-loop/tests/test_main_drift_evidence_epoch.pyscripts/agent-ops/pr_head_replay_publish_exec.pyscripts/agent-ops/tests/test_pr_head_replay_publish_exec.pyscripts/agent-ops/tests/test_main_drift_replay_publish.pytests/agent_ops/test_update_branch_input_validation.pytests/agent_ops/test_update_branch_poll_bounds.pytests/agent_ops/test_main_drift_update_branch.py
Dependency Dispositions
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040: background only。RVA-only current contract の Allowed Paths 外なので dependency / parent / mutation を設定しない。
- fix(contract-review): RVA 欠落を fail-closed に統一 #2070: background only。本 Issue の merge 後に別 flow で recovery を判断する。blocked-by / blocking relation は設定しない。
- fix-bootstrap-refs #2081: background only。main drift の観測根拠として参照するが、dependency / mutation は設定しない。
- current main: implementation 開始前に current base を再読し、overlap があれば scope-clean reconciliation の入力にする。hard blocker にはしない。
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- semantic ambiguity、base SHA fingerprint mismatch、または scope-clean で解消不能な current-main conflict が発生した場合
- materialize-request authority、CAS、protected/identity/write guard、live postcondition readback のいずれかを弱化する必要がある場合
- 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 RVA source paths、実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040/fix(contract-review): RVA 欠落を fail-closed に統一 #2070/fix-bootstrap-refs #2081 の Issue mutation、又は raw git mutation が必要になった場合
Required Skills
- Python(subprocess 契約、pytest)
- TypeScript(policy matrix と pnpm gate)
- Git topology(base/head、CAS、protected ref)
- pytest / Vitest(決定論的な回帰テスト)
Required Design References
docs/dev/agent-runtime-ops.mddocs/dev/hook-boundaries.mddocs/dev/workflow.mddocs/dev/agent-skill-boundaries.md
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。- repo-approved
tmp/配下の専用 worktree で実装し、Draft PR を既定とする。 - implementation 前、reconciliation 前、publish 前に current main / current head / evidence epoch を readback する。
- fix(contract-review): RVA 欠落を fail-closed に統一 #2070 の recovery は本 Issue の merged PR を前提に後続 flow で扱い、本 Issue の PR には含めない。
Notes for Reviewer
- title / scope は main drift の loop/policy/executor reconciliation に限定する。実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 の RVA-only source paths は含めない。
- scope overlap preflight は C1
allowed_paths_overlap(実装: operator-selected human context の scope reframe を自動継続し scope expansion stop を撤去する #2086、実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 等)を返した。実装: operator-selected human context の scope reframe を自動継続し scope expansion stop を撤去する #2086 の operator-selected scope reframe および 実装: implementation Issue の Runtime Verification Applicability 欠落を authoring・readiness・reviewer・consumer 全経路で fail-closed に統一する #2040 の RVA-only contract とは outcome と mutation authority が異なる。実装開始時は current main を readback し、共通 directory 内の actual net diff が重なる場合だけ scope-clean reconciliation または Stop Conditions を適用する。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Aug 11, 2026
squne121 commentedon Aug 11, 2026
squne121 commentedon Aug 11, 2026
Contract Review Result
squne121 commentedon Aug 11, 2026
Contract Review Result
fix: harden main drift rebind and CAS (#2102)
fix: preserve implementation router boundary (#2102)
fix(loop): enforce live main-drift facts (#2102)
squne121 commentedon Aug 11, 2026
結論
判定は
REQUEST_CHANGESです。 #2102 の狙いである「main drift を例外停止ではなく通常の concurrency event として扱う」方針自体は妥当です。しかし、現状の契約のまま実装すると、base churn による livelock、update_branchの false-green、fresh Contract Snapshot を再生成できない dead-end、replay 時の latest-main scope 判定不足が残ります。特に AC2/AC3/AC5/AC6/AC14/AC16/AC17 を修正してから implementation に渡すべきです。この Issue 自体が対象問題をよく実証しています。#2102 の本文は
2026-08-11T14:44:35Zに更新されていますが、その約9秒後の14:44:44Zに main は0fbdf82ee41c9e911fd829197a8881a163093ed8へ進みました。さらに #2086 の実装 PR #2096 は現在も open / Draft で、同じ issue-refinement control-plane を変更中です。つまり「Issue contract を作った直後に main/overlap が動く」は仮想的なケースではありません。敵対的レビュー
P0 —
evidence epochが「選択的 invalidation」を表現できていません。AC14 は base epoch が変われば CI、review、Contract Snapshot、scope snapshot をまとめて reverify する契約ですが、証跡ごとの依存対象が異なります。現在の
ci.ymlはpull_requesttrigger でactions/checkoutに ref を指定しておらず、さらに artifact へGH_HEAD_SHAとGH_SHAを別々に記録しています。GitHub の仕様上、pull_requestのGITHUB_SHAは PR merge branch の merge commit です。したがって現在の required CI は実質的に base+head に依存します。 ([GitHub Docs]1)一方
visual-impact-policy-trustedは CheckRun 自体を current head に束縛しつつ、consumer 内で live base SHA を再取得して base→head diff を再計算しています。つまり「CheckRun が head-bound」というだけでは evidence dependency を表現できません。base changed => everything staleを実装するのではなく、たとえば次の程度まで dependency を明示すべきです。現在の main ruleset は required checks を
typecheck/lint/test/build/python-testとし、strict_required_status_checks_policy: trueです。GitHub の strict mode は topic branch が base と最新状態であることを要求します。したがって現状では結果的に required CI 全再検証になってもよいのですが、それを dependency model の結果として導出すべきです。 ([GitHub Docs]2)P0 —
update_branch.pyには base race が残っています。現行実装は
PUT .../update-branchが202を返した後に_get_current_base_sha()を実行しています。しかし関数コメントはその値を「update-branch call の直前の base」と説明しており、コードと意味論が一致していません。さらに base 取得に失敗すると head ancestry だけへ意図的に degrade して成功可能です。GitHub の Update branch API が CAS として受け取るのは
expected_head_shaだけで、expected base SHA は指定できません。また成功は非同期の202 Acceptedです。つまり API 単体では「観測した base に対して更新した」ことを CAS 保証できません。([GitHub Docs]3)実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 用 fast path は、pre/post で
baseRefOid,headRefOidを同じ live PR readback から取得し、最終状態でcurrent_base_shaがnew_head_shaの ancestor であることまで確認すべきです。base が途中で進んでいても final base が新 head に含まれていれば、その final base で新 epoch を生成すればよいです。含まれていなければbase_drift_during_updateとして drift lane に戻します。base readback failure を成功へ degrade する現在の挙動は AC16 と両立しません。P0 — 「drift retry は implementation iteration を消費しない」だけでは livelock します。
AC2 は正しい方向ですが、AC17 が制限しているのは主に
update_branchの poll bound であり、main が継続的に進む場合の outer rebind 回数には上限がありません。main が十分活発なら、iteration=0 のまま永久に epoch を作り直せます。既存 実装: repair_action candidate を controlled Issue transaction へ自動適用する main control-plane consumer を追加する #2039 には「pre-dispatch stale 再生成は最大1回」「mutation 後 retry は別 budget」という先例があり、改善: issue-refinement-loop fail_closed constraints の reason semantics と consumer rewrite budget を閉じる #1023 でも通常 iteration を消費しない repair に no-progress state を併設しています。
したがって
implementation_iterationとは別に、たとえばdrift_rebind_attempts <= 2を設けるべきです。超過時はhuman_judgment_requiredではなくconcurrent_base_churnのような機械的停止理由にします。これは意味判断の失敗ではありません。P0 — stale Contract Snapshot を捨てた後の「fresh producer」が契約されていません。
これは最も実装時に詰まりやすい点です。current main の
materialize_issue_scope_snapshot.pyはすでに GitHub REST から default branch の live SHA を取得し、Contract Snapshot fingerprint のbase_sha_at_snapshotがその live base と一致することを要求しています。Issue body と Allowed Paths digest も照合します。つまり old Contract Snapshot URL を AC14 どおり stale にしただけでは、次の materialize は
base_sha_fingerprint_mismatchで止まります。誰が current base に束縛された fresh Contract Snapshot を生成し、その新しい trusted comment/source ID を materialize-request へ渡すのかが AC にありません。必要なのは概ね
detect base drift → fresh contract review producer → trusted source readback → current-base scope materialization → loop resumeという明示的な再生成 chain です。refinement loop が producer を所有し、implementation loop は生成済み fresh authority だけを consume する、という責務分離が自然です。P0 — replay publisher はまだ「latest-main reconciliation executor」ではありません。
現在の
pr_head_replay_publish_exec.pyはsource_base..source_headの binary diff を expected current PR head に apply しています。また Allowed Paths は Issue body の## Allowed Pathsを独自に文字列 split して取得しており、canonical materializer/parser と別実装です。publish CAS 自体は exact expected-old lease と post-push PR readback を備えています。実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 の AC5 を満たすなら、candidate の最終 authority gate は exact current base から評価しなければなりません。
git diff current_base_sha candidate_headの two-tree net diff を canonical Allowed Paths matcher に通し、rename の old/new path の双方を評価する必要があります。git diff A...Bは merge-base→B の意味なので、最終的な latest-main net diff gate には不適切です。([Git]4)なお現在 publisher が使っている
--force-with-lease=<ref>:<expected-old>は generic force push と同一視してはいけません。Git の公式仕様でも、この完全形は remote ref が explicit<expect>と一致した場合だけ更新する CAS です。実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 の「generic force を拒否」は維持しつつ、exact expected-old lease は sanctioned transaction と明文化してください。([Git]5)P1 —
semantic ambiguityが停止条件なのに判定規則がありません。Design Invariant は「semantic ambiguity だけを停止条件にする」としていますが、これはそのままでは machine-decidable ではありません。また AC8 と Stop Conditions には base fingerprint mismatch、Allowed Paths conflict、authority failure など別の停止理由も存在し、用語上も矛盾しています。
実装可能にするなら、semantic ambiguity を保守的な deterministic predicate に落とすべきです。
git merge-tree --write-treeは worktree/index を汚さず real merge conflict を判定できるので第一段階の conflict oracle に使えます。([Git]6) その上で「main drift 側と Issue delta が同一ファイルを変更していれば semantic ambiguity」「互いに disjoint で、final net diff が current Allowed Paths 内なら scope-clean」のような保守的規則にすれば、LLM の主観判定を authority にしなくて済みます。P1 —
evidence_epochを LOOP_STATE に入れる契約と Allowed Paths が一致していません。current
LOOP_STATE_V1の SSOT は.claude/skills/issue-refinement-loop/references/loop-state.mdで、全フィールドとiteration/max_iterationsの意味を定義しています。formal JSON schema は 実装: review/refinementのreplay・envelope・custom publisherをbounded loopへ置換する #1873 で撤去済みなので schema migration 自体は不要ですが、実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 が要求する「evidence epoch を loop state に明示」はこの SSOT の変更です。ところが 実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 の Allowed Paths はscripts/とtests/は含むものの、この reference を含みません。さらに同 reference には、reviewer が既に
REVIEWED_BODY_SHA256を出力するのにdecide_next_loop_action.pyが stale-body 判定へ使っていない、という明示的 TODO があります。main drift evidence を扱う 実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 はこの既存 hook を無視すべきではありません。最小修正は
references/loop-state.mdを Allowed Paths に追加し、reviewer schema 自体は拡張せず、route へ別入力live_evidence_bindingを渡す形です。これなら pr-reviewer の minimal verdict 契約を壊しません。P1 — AC10 は新機能ではなく、current main の既存 security invariant です。
現在の
controlled_git_change_exec.pyは--snapshot-jsonを authority として無条件拒否し、--materialize-requestを必須とし、同一 transaction 内で live materializer を呼ぶ実装になっています。これは 実装: issue-refinement-loop / impl-review-loop の main drift を自動再束縛・scope-clean reconciliation する #2102 AC10 が要求している内容そのものです。したがって
test_main_drift_controlled_mutation.pyが baseline で存在しないことを理由にbaseline-expect: failとするだけでは、「挙動が未実装」と「専用 regression test が未作成」を混同します。AC10 は preserve/non-regression AC へ変更し、成熟した controlled executor を不必要に書き換えない方が安全です。同じ理由でmaterialize_issue_scope_snapshot.pyも、実際の deficit が見つからない限り Allowed Paths に追加しない方がよいです。Issue #2102 に入れるべき修正
実装 state machine は、少なくとも次の形まで固定すると曖昧さが大幅に減ります。
Issue body上は、AC2 に独立 drift budget、AC3 に final-base ancestry、AC6 に fresh Contract Snapshot producer chain、AC14 に evidence-type dependency、AC17 に outer drift boundを追加すべきです。AC10 は新規実装から regression-preservation へ変更してください。また Allowed Paths に少なくとも
.claude/skills/issue-refinement-loop/references/loop-state.mdを追加する必要があります。Runtime Verification Applicability: not_applicableも変更を推奨します。exact lease/CAS は一時 bare remote を使えば実 subprocess で race を再現できますし、update_branchは非同期202APIなので mock-only では GitHub 自体の挙動を証明できません。最低でも local bare-remote CAS/reconciliation をimmediateverification にし、GitHub API の非同期特性については「external E2E 未検証」を明記すべきです。#1688 にも remote write/postcondition を runtime verification する先例があります。 ([GitHub Docs]3)さらに main の ruleset は strict required checks なので、この機能は単なる利便性改善ではなく、現在の merge policy と整合する制御面です。 #2096 はまだ Draft/open で、#2105 はすでにその branch に stacked merge されています。#2102 自身も #2086 overlap を認識しているため、実装開始時に #2096 の disposition を live readback し、同一ファイルを触るならその差分を最初の reconciliation input に含めるべきです。
以上を反映すれば、#2102 は **「main drift を無視する自動 retry」ではなく、「immutable SHA に束縛された evidence を dependency 単位で失効させ、bounded CAS transaction で再収束する制御面」**として実装可能になります。この形なら
1 Issue = 1 PRを維持してよく、現時点では分割より contract refinement を優先するのが適切です。fix(#2102): wire main-drift reconciliation into production routing an…
fix(#2102): raise Japanese ratio of new resume-procedure heading
fix(#2102): document main-drift producer contract and semantic_ambigu…
fix(#2102): revert unapproved SKILL.md scope delta, relocate producer…
squne121 commentedon Aug 12, 2026
Contract Review Result
fix(#2102): fix_delta iteration 4 -- controlled_git_change_exec trans…
fix(#2102): fix_delta iteration 5 -- lint hygiene for main_drift evid…
fix(#2102): fix_delta iteration 5 -- main_drift producer default gate…
fix(loop): main drift evidence を再束縛する (#2102) (#2118)