Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "markerless open/draft PR の decision-time body marker と closing relation の意味変化を HEAD 不変でも ownership/disposition に反映する"
change_kind: code
dedupe_key: "impl-review-loop-v1:markerless-live-body-closing-authority-rebind"Parent Issue
なし(#2972 / PR #2985 の別スコープ follow-up。親子登録はしない)
Parent Goal Ref
- Goal: 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の markerless open/draft PR の ownership 誤判定防止を補完する。
- Desired Destination: impl-review-loop landing evidence の candidate freshness/rebind branch と同 skill の既存テスト。実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の glob matcher 差分は本 Issue の write-capable scope ではない。
Current Validated Scope
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.pyの_live_freshness_reference()と disposition 前の再評価、および同 skill の既存 unit / fake-gh intake integration test に限定する。- 収集時に markerless な open/draft candidate について、HEAD / Issue body / main SHA が不変でも decision-time の live PR body marker semantics または
closingIssuesReferencesによる current target authority が変化した場合の freshness rebind を扱う。
Remaining Parent Gaps
- 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の glob 被覆 grammar、実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 の PR files 全件取得・完全性はそれぞれ別 Issue の責務。本 Issue は両者の merge 後に実装する。
Background
#2972 / PR #2985 の独立レビューで判明した別スコープの欠陥(finding、APPROVE)。現状 _live_freshness_reference() は decision-time に live PR body / closingIssuesReferences を取得するが、その意味的再導出は主に irrelevant sibling と historical carve-out の参加 candidate に限定される。通常の markerless open/draft candidate は HEAD 等の identity が同じなら収集時の scope_coverage / current_scope_ownership / provenance を保持したまま existing_pr_resume し得る。根本原因は取得不足ではなく、取得済み live authority の通常 markerless branch への再束縛不足。
決定論的な修正として marker の追加・削除・malformed 化と current target の closing relation 昇格・降格を rebind 時に意味的に比較し、変化時は bounded な再収集・再評価または等価の live 再導出で freshness を確証してから disposition を確定する。PR body 全文の byte equality を要求する案は無関係な prose edit も停止させるため不採用。operator の marker 手入力・リトライによる回避は stale authority を検知できず都度介入が必要なため不採用。
Outcome
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py と既存テストが更新され、markerless open/draft PR の live body marker または current target closing relation の意味変化が HEAD / Issue / main SHA 不変でも decision-time disposition に反映され、古い ownership に基づく existing_pr_resume は発生せず、意味不変な prose edit は resume を妨げない状態となる。
Runtime Verification Applicability
- decision: not_applicable
- reason: fake
ghtransport の unit / intake integration test で収集と decision-time fetch の差分をオフライン・決定論的に検証する。実 GitHub mutation や外部 service smoke は不要。
In Scope
- 通常の markerless open/draft candidate に対し、既に取得する live PR body と
closingIssuesReferencesの current target 向け意味を再導出する。PR body の無関係 prose だけの変更は identity drift と扱わない。 - markerless → 同一 Issue の valid marker / malformed marker、marker 付き → markerless を含む意味変化が起きたら、旧
scope_coverage/current_scope_ownershipをそのまま採用せず、再収集・再束縛後に正規の coverage / ownership 規則で確定する。malformed marker や確認不能な live payload を marker 不在として扱わない。 - current target の closing relation 昇格・降格を双方向に反映し、closing-priority と候補の conflict counting を再評価する。単独候補だけの局所変更で他候補の authority を見落とさない。
- bounded retry 後も authority が確認できない・drift が続くときは
reconciliation_requiredとし、既存の irrelevant sibling carve-out / 複数 candidate fail-closed を維持する。 - 既存 unit test と fake-gh intake integration test に HEAD / Issue / main SHA 固定の before / after fixture と positive / negative を追加する。
Out of Scope
- 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の
_allowed_paths_covered()glob grammar、実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 の PR files pagination / completeness、実装: IMPLEMENTATION_SCOPE_COVERAGE_V1 marker の再検証を追加し malformed marker の idempotent通過を防ぐ #2811 の open-pr pre-write marker validation、実装: impl-review-loop の irrelevant sibling cross-reference による qualification 前 freshness 誤停止を解消する #2767 の irrelevant sibling qualification 規則そのものの変更。 - PR body marker schema 新設、closing relation 以外の新規 authority、live GitHub 書き込みや実 API smoke。
Acceptance Criteria
- AC1: HEAD / Issue body / main SHA 固定で markerless open/draft candidate の live marker 追加(valid / malformed)または marker 削除が起きると、旧
scope_coverage/current_scope_ownershipからの stale resume をせず、更新後の marker/markerless 規則で再評価する。malformed は fail-closed。 - AC2: 同じ identity 固定で current target の
closingIssuesReferencesが追加または削除された場合、closing-priority / provenance を双方向で再評価し、古い authority で resume しない。 - AC3: PR body の marker semantics / closing relation が不変な prose-only edit は不必要な retry や
freshness_rebind_failedを起こさず、従来の正当な markerless resume を維持する。 - AC4: live body または
closingIssuesReferencesの欠落・型異常・fetch / parse 失敗、もしくは bounded retry 後も意味的 drift が安定しない場合は確認済み markerless とみなさず fail-closed。HEAD identity だけ一致しても resume しない。 - AC5: fake-gh intake production composition で marker/closing relation の live 意味変化が pre-Step-1 action に反映され、複数 candidate の conflict と irrelevant sibling carve-out の既存安全規則を退行させない。
- AC6: impl-review-loop の既存 pytest 全体が成功する。
Verification Commands
# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_markerless_live_marker_add_remove_rebind
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_markerless_live_closing_relation_promote_demote_rebind
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_markerless_live_prose_only_stays_fresh
# AC4
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py::test_markerless_live_authority_unconfirmed_fail_closed
# AC5
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py::test_markerless_live_authority_change_intake_rebind
# AC6
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/Allowed Paths
.claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 または 実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 の未マージ差分との衝突・依存が解消できない場合
Required Skills
なし
Required Design References
- docs/dev/workflow.md
- docs/dev/runtime-verification-policy.md
Scope Delta(任意)
N/A(#2972 の glob matcher、#2991 の PR files completeness には含まれない意味論的 freshness rebind)
Source
- source_issue: 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972
- source_pr: fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する #2985
- finding: fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する #2985 (comment)
- approved_review: fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する #2985 (comment)
- dedupe_key: impl-review-loop-v1:markerless-live-body-closing-authority-rebind
- dedupe: all-state 検索で同一 Outcome なし。実装: impl-review-loop の irrelevant sibling cross-reference による qualification 前 freshness 誤停止を解消する #2767 は irrelevant sibling qualification 誤停止、実装: IMPLEMENTATION_SCOPE_COVERAGE_V1 marker の再検証を追加し malformed marker の idempotent通過を防ぐ #2811 は open-pr pre-write validation、実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 は glob matcher、実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 は PR files completeness で別 Outcome。
- overlap_preflight: ISSUE_OVERLAP_PREFLIGHT_RESULT_V1 decision=duplicate / reason_code=goal_ref_duplicate(実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 と Allowed Paths 3 件が完全一致した path signal)。title / Outcome の完全一致はなく semantic duplicate ではない。実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 / 実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 merge 後に着手し同ファイルを並行編集しない。
Delivery Rule
- 1 Issue = 1 PR。専用 worktree、Draft PR 既定。
- Depends on 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 / 実装: markerless 既存 PR の変更ファイル一覧を全件取得・検証して ownership 誤停止を防ぐ #2991 merge。同一ファイル群の独立 Outcome であり、両方を取り込んでから freshness branch のみを変更する。
Activity