Repository navigation
Closed as duplicate
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "ensure_contract_snapshot が stale な go snapshot を再利用せず、現在の Issue body hash に一致する snapshot だけを採用する"
change_kind: workflowParent Issue
なし
Parent Goal Ref
- Goal: Issue body を修正した impl-review-loop が fresh contract snapshot を materialize して再開できるようにする。
- Desired Destination: body_sha256 が一致しない既存 go コメントを stale と扱い、新しい go snapshot を controlled publish できる状態。
Current Validated Scope
ensure_contract_snapshot.pyはfind_latest_go(results)の結果を body hash freshness 照合なしでexisting_goとして返す。- Issue 実装: root preflight の bytecode cache 誤検知を防止する #1439 は body 修正後も旧 hash の go comment を返され、新 snapshot を作成できなかった。
Remaining Parent Gaps
なし。
Outcome
body hash freshness を検証する publish helper と回帰テストが追加され、旧 go snapshot が current body に対して採用されず fresh snapshot を作成できる状態。
In Scope
- existing go を採用する前に comment body_sha256 と current Issue body_sha256 を照合する。
- hash 不一致、hash 欠落、または stale latest go では auto/post が fresh review を実行して snapshot を publish する。
- current body に一致する go と idempotency marker は既存どおり再利用する。
- stale、blocked、runtime error の既存 fail-closed routing を回帰テストで固定する。
Out of Scope
- Issue contract の内容変更。
- GitHub credential と remote write policy の変更。
CONTRACT_REVIEW_RESULT_V1schema の破壊的変更。
Runtime Verification Applicability
- decision: not_applicable
- reason: helper の deterministic unit/integration fixture で snapshot selection と publish routing を検証できる。
Acceptance Criteria
- AC1: current body hash と異なる go comment は
existing_goとして返されず、auto/post が fresh snapshot を publish する。 - AC2: hash が一致する go comment は既存どおり再利用される。
- AC3: hash 欠落、latest blocked、publisher failure は false green にならず既存の fail-closed status を返す。
- AC4: Issue 実装: root preflight の bytecode cache 誤検知を防止する #1439 と同じ stale-body 修正後の snapshot materialization を fixture で再現する。
Verification Commands
# AC1
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/scripts/tests/test_ensure_contract_snapshot.py -v
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/scripts/tests/test_ensure_contract_snapshot.py -v
# AC3
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/scripts/tests/test_ensure_contract_snapshot.py -v
# AC4
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/impl-review-loop/scripts/tests/test_ensure_contract_snapshot.py -vAllowed Paths
.claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py.claude/skills/impl-review-loop/scripts/tests/test_ensure_contract_snapshot.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- Python / pytest
Required Design References
docs/dev/workflow.md#Issue contract を作業計画の正本として扱う条件docs/dev/agent-skill-boundaries.md#Loop Sequencing & Preconditions
Delivery Rule
1 Issue = 1 PR- dedicated worktree を使用する
- Draft PR を既定とする
Scope Delta
N/A
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jul 11, 2026
P0-1: Issue #1445 と実質的に重複している
#1447 より先に、同じ不具合を扱う open Issue #1445 が存在します。#1445 は、問題箇所、check-only と auto の期待動作、正しいテストパス、発見経緯まで具体化されています。対して #1447 には supersedes: #1445、重複整理、責務差分の記述がありません。
両方とも 1 Issue = 1 PR を要求しているため、このままでは同じファイルを変更する2つの実装PRが並行生成され得ます。
必須対応
#1445 または #1447 の一方を canonical Issue に固定する。
他方を duplicate / superseded として閉じる。
#1445 の詳細な mode 別仕様を canonical Issue に統合する。
#1439だけでなく、発見元として記載されている #1431 / PR #1438 も evidence chain に残す。
現状では、内容がより具体的な #1445を残し、#1447を duplicate とする方が自然です。