Repository navigation
feat(#564): add implementation-ready handoff gate to impl-review-loop preparation - #568
Conversation
… preparation Closes #561-type handoff gap: issue-refinement-loop termination_reason:approved no longer implies implementation_ready without CONTRACT_REVIEW_RESULT_V1 status:go. Changes: - termination-policy.md: add HANDOFF_STATE_V1 with refinement_approved_gate_pending / implementation_ready distinction; issue-reviewer approve alone is forbidden from triggering impl_review_loop_handoff - preparation.md: add intake gate (Step 0) with INTAKE_GATE_RESULT_V1 schema, 5 subreasons in priority order (metadata_not_ready > missing_contract_go > stale_contract_review > body_snapshot_mismatch > request_changes_after_go), body_sha256 / generated_at freshness check, REVIEW_RESULT_INVALIDATION_V1 go invalidation marker; deprecate auto issue-contract-review execution path - test_intake_gate.py: 19 regression fixtures covering AC1-AC6 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
検証結果レポートIssue #564: issue-refinement-loop の impl-review-loop handoff gap 修正
総合判定
詳細確認結果AC1: refinement_approved_gate_pending 状態定義
AC2: intake_gate_failed と subreason 優先順位
AC3: metadata_not_ready 定義
AC4: body_sha256 / stale_contract_review freshness チェック
AC5: REQUEST_CHANGES / go 無効化 marker
AC6: #561 型 regression fixture
AC7 & AC8: ビルド・テスト成功
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BLOCKED
baseline_only: false
verification_commands_pass: 8
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: [] |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
AC coverage: 6/8 ACs verified via diff inspection + TEST_VERDICT_MACHINE; runtime ACs (AC7/AC8) confirmed via CI_CHECK_RUN_SCOPED (headSha=c19cc860d9e62b6cb54571160d06b7c483aa8577, conclusion=success, run 26797547525). All 8 ACs pass content-wise.
Allowed Paths: COMPLIANT. Changed files are exactly the 3 Allowed Paths declared:
.claude/skills/issue-refinement-loop/references/termination-policy.md.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/tests/test_intake_gate.py
CI Verification: All 6 checks pass on headSha c19cc86 (build, e2e, lint, python-test, test, typecheck). CI_CHECK_RUN_SCOPED conditions met.
TEST_VERDICT_MACHINE: Present. verification_skipped_count: 0, all 8 VCs PASS. Note: TEST_VERDICT_MACHINE reported merge_state_status: BLOCKED but current API shows CLEAN — stale at time of posting; current state is authoritative.
検証コマンド結果 (pr_review_only VCs): Verified against diff directly — local rg returns empty (pre-merge main), but PR diff confirms all AC terms present in added content.
Schema Change Applicability: not_schema_change. Changes are YAML-in-Markdown schema definitions within skill docs, not consumer-boundary contracts from schema-governance.md Initial Known Schemas.
Safety Claim Gate — BLOCKER
Changed paths include .claude/skills/**, which triggers safety-sensitive classification per PR_REVIEW_JUDGE Step 4.6 (fail-closed rule, no carve-out for docs-only changes). PR body contains no Safety Claim Matrix section.
Required action: Add ## Safety Claim Matrix to PR body with columns Claim / Implemented? / Not controlled / Evidence / Follow-up. For this PR, the claim is likely bounded (process-documentation change with no executable permission/auth logic) so Not controlled should be empty and Claim should document the scope boundary. This should be straightforward to complete.
Blockers
- [BLOCKER] Safety Claim Matrix missing: PR touches
.claude/skills/**path, triggering safety-sensitive classification (Step 4.6). PR body has no## Safety Claim Matrixsection. Per skill rule: "safety-sensitive PR なのに Safety Claim Matrix セクションが存在しない → APPROVE 禁止". Add the section to PR body and repost for review.
Non-blockers
なし
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- id: safety_claim_matrix_missing
rule: Safety_Claim_Gate_Step_4_6
detail: >
PR touches .claude/skills/** (explicit safety-sensitive path, fail-closed).
No Safety Claim Matrix section present in PR body.
Required: add ## Safety Claim Matrix with Claim/Implemented?/Not controlled/Evidence/Follow-up columns.
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: c19cc860d9e62b6cb54571160d06b7c483aa8577
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 8/8 全 AC PASS(TEST_VERDICT_MACHINE 確認済み)
- Allowed Paths: 遵守。変更ファイル 3 件すべて Issue #564 Allowed Paths 内(.claude/skills/impl-review-loop/steps/preparation.md / tests/test_intake_gate.py / .claude/skills/issue-refinement-loop/references/termination-policy.md)
- CI Verification: build/e2e/lint/python-test/test/typecheck 全 pass、head SHA c19cc86 一致確認
- 検証コマンド結果: TEST_VERDICT_MACHINE v1 コメントにて verification_commands_pass: 8、verification_commands_fail: 0、verification_skipped_count: 0
- Safety Claim Matrix: PR 本文に追記済み。3 claim すべて Implemented=Yes / Not controlled=なし / Evidence がVC証跡に対応 / Follow-up=なし。前回 blocker 解消を確認。
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: c19cc860d9e62b6cb54571160d06b7c483aa8577
recommendations: []
follow_up_issue_requests: []
Verdict: REQUEST_CHANGESPR #568 は Issue #564 の主要方向性には合っていますが、現状は merge 不可です。既存レビューの APPROVE は浅い keyword VC に寄りすぎており、契約の厳密要件を取りこぼしています。 Blockers1. AC5 未充足:
|
…take_gate_failed propagation, unicode check Blocker 1: replace REVIEW_RESULT_INVALIDATION_V1 marker with GO_INVALIDATION_POLICY_V1 (source/accepted_marker/target_issue_url_must_match/ordering_key) per Issue #564 AC5 spec. Update AC5 tests to assert the 4 required fields. Blocker 2: add on_intake_gate_failed block in preparation.md specifying LOOP_STATE.termination_reason = intake_gate_failed on stop. Add intake_gate_failed to termination_reason valid values in both preparation.md and SKILL.md. Blocker 3: Unicode scan confirmed clean (no Cf/Cc chars in 3 target files). Non-blocker: update "4 サブ理由" -> "5 つのサブ理由" to match actual count. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
REQUEST_CHANGES 対応 fix summarycommit: 457a395 Blocker 1: AC5 go 無効化 marker — GO_INVALIDATION_POLICY_V1 への差し替え
AC5 テストを 5 件に更新( Blocker 2: on_intake_gate_failed の LOOP_STATE 伝播規約
Blocker 3: Unicode 検査3 ファイルをスキャン(Cf/Cc カテゴリ): クリーン(0 件)。 Non-blocker「4 サブ理由」 -> 「5 つのサブ理由」に修正。 検証
|
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: iteration 1 の 3 blockers はすべて解消確認済み
- Blocker 1 (AC5 GO_INVALIDATION_POLICY_V1):
GO_INVALIDATION_POLICY_V1の 4 フィールド(source: issue_comment/accepted_marker: fenced_yaml REVIEW_RESULT_V1.status == request_changes/target_issue_url_must_match: true/ordering_key: created_at)がpreparation.mdに存在。テストも 4 フィールドを assert 済み。RESOLVED - Blocker 2 (termination_reason 伝播):
on_intake_gate_failed:ブロックにset LOOP_STATE.termination_reason: intake_gate_failedとdo_not_continue_to_step_1: trueが定義。SKILL.md の有効値リストにもintake_gate_failed追加済み。RESOLVED - Blocker 3 (Unicode scan): 前回の CLEAN 確認を継承。RESOLVED
- Blocker 1 (AC5 GO_INVALIDATION_POLICY_V1):
- Allowed Paths: 4 ファイルすべて Allowed Paths 内 (
termination-policy.md/preparation.md/test_intake_gate.py/SKILL.md) - CI Verification: 全 7 checks PASS (build/e2e/lint/python-test/test/typecheck/validate-generated-artifact)。head SHA 457a395 と CI run headSha が一致。CI_CHECK_RUN_SCOPED 条件充足。
- TEST_VERDICT_MACHINE: 存在し、verification_skipped_count: 0、全 AC PASS、branch_behind_main 記載なし。
Blockers
-
[NEW BLOCKER]
## Schema Change Applicabilityセクション欠落 (Step 4.5)PR 本文に
## Schema Change Applicabilityセクションが存在しない。PR テンプレートおよび SKILL.md Step 4.5 のルールにより、not_schema_changeを明示しない限り APPROVE 禁止。本 PR の変更内容:
preparation.mdにINTAKE_GATE_RESULT_V1(新規 schema)とGO_INVALIDATION_POLICY_V1(新規 machine-readable policy block)を追加SKILL.mdのLOOP_STATE.termination_reason有効値にintake_gate_failedを追加(issue-refinement-loop/SKILL.mdが LOOP_STATE を参照するため consumer 境界をまたぐ可能性あり)termination-policy.mdにHANDOFF_STATE_V1を追加
SKILL.md Step 4.5 の fail-closed ルール: 「判定が疑わしい場合は
uncertainとする」。新規 schema 追加かつ複数 skill ファイルにまたがる変更のため、少なくともuncertain相当。対応: PR 本文に以下を追加してください。
## Schema Change Applicability - decision: not_schema_change | uncertain | schema_change - reason: (理由を記載)not_schema_changeを主張する場合、上記 schema 追加がすべて「内部ロジック・コメント・説明文のみで consumer 境界をまたがない」ことを diff と照合して根拠を示してください。uncertainまたはschema_changeの場合は## Schema Consumer Inventoryセクションも必要です。
Non-blockers
なし
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- schema_change_applicability_section_missing
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 457a3958241ac2657460422c5f824de2d639f909
recommendations: []
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 8/8 PASS. TEST_VERDICT_MACHINE v1 confirms verification_commands_pass: 8, verification_commands_fail: 0, verification_skipped_count: 0.
- Allowed Paths: COMPLIANT. 4 changed files (
SKILL.md,preparation.md,test_intake_gate.py,termination-policy.md) are all within Issue #564 Allowed Paths. - CI Verification: All 7 checks pass on headSha 457a395 (run 26802390232, conclusion=success). CI_CHECK_RUN_SCOPED conditions met (head SHA matches, workflow=ci, conclusion=success).
- 検証コマンド結果: TEST_VERDICT_MACHINE v1 present. All 8 VCs PASS. No SKIP, no fallback.
- Schema Change Applicability: PASS.
## Schema Change Applicabilitysection present withschema_change_applicability: schema_changeexplicitly stated. Previous blocker resolved. - Schema Consumer Inventory: PASS. Section present with schema diff table,
rgsearch results, consumer update status (all updated in PR or confirmed no-update-needed), Compatibility Decision (additive,migration_or_followup: N/A). No "未対応" consumer. - Safety Claim Matrix: PASS. Section present with 3 bounded claims, all
Implemented?=Yes,Not controlled=なし. Evidence corresponds to diff and VC. No overclaim. - Runtime Verification:
decision: not_applicableper Issue #564 — no runtime evidence required.
Prior Blockers (all resolved)
- [iteration 1] Safety Claim Matrix missing → RESOLVED (added to PR body)
- [iteration 2] Schema Change Applicability section missing → RESOLVED (added with full Schema Consumer Inventory)
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 457a3958241ac2657460422c5f824de2d639f909
recommendations: []
follow_up_issue_requests: []
Summary
Closes #564
Resolves the #561-type handoff gap where
issue-refinement-looptermination_reason: approvedcould be misread as "implementation_ready" without confirmingCONTRACT_REVIEW_RESULT_V1 status: go.Changes
termination-policy.md: AddedHANDOFF_STATE_V1with explicitrefinement_approved_gate_pending/implementation_readydistinction.issue-reviewer approvealone is nowforbidden_next: [impl_review_loop_handoff].preparation.md: Added Intake Gate (Step 0) withINTAKE_GATE_RESULT_V1schema, 5 subreasons in priority order, body_sha256/generated_at freshness check,REVIEW_RESULT_INVALIDATION_V1go invalidation marker, and deprecation of autoissue-contract-reviewexecution path.test_intake_gate.py: 19 regression fixtures covering AC1–AC6.Verification
pnpm testpnpm builduv run pytest .claude/skills/impl-review-loop/tests/test_intake_gate.py -vAllowed Paths compliance
.claude/skills/issue-refinement-loop/references/termination-policy.md✓.claude/skills/impl-review-loop/steps/preparation.md✓.claude/skills/impl-review-loop/tests/test_intake_gate.py✓contract_snapshot_url: #564 (comment)
Safety Claim Matrix
.md/.py拡張子のみ。pnpm test313/313 PASSsteps/preparation.mdの intake gate は process documentation(読み取り専用ルール定義)であり、runtime permission / tool registry / MCP transport を変更しないallowed_paths_presentチェック追加のみ。 executable code への依存なしtest_intake_gate.pyは Markdown ファイルを読み取るテストであり、subprocess 実行・ネットワーク呼び出し・ファイル書き込みを行わないuv run pytest .claude/skills/impl-review-loop/tests/test_intake_gate.py -v19 passed🤖 Generated with Claude Code
Schema Change Applicability
schema_change_applicability: schema_change本 PR は以下の新規 machine-readable schema を追加し、既存 schema のフィールドを拡張する:
INTAKE_GATE_RESULT_V1(impl-review-loop/steps/preparation.md)GO_INVALIDATION_POLICY_V1(impl-review-loop/steps/preparation.md)HANDOFF_STATE_V1(issue-refinement-loop/references/termination-policy.md)LOOP_STATE.termination_reason有効値にintake_gate_failedを追加(impl-review-loop/SKILL.md)Schema Consumer Inventory
変更対象スキーマと差分
INTAKE_GATE_RESULT_V1GO_INVALIDATION_POLICY_V1source,accepted_marker,target_issue_url_must_match,ordering_key,precedenceHANDOFF_STATE_V1LOOP_STATE.termination_reasonConsumer 列挙
結果:
.claude/skills/impl-review-loop/SKILL.md:termination_reason有効値リストにintake_gate_failedを参照 → 更新済み(本 PR).claude/skills/impl-review-loop/steps/preparation.md: 定義元 → 更新済み(本 PR).claude/skills/impl-review-loop/tests/test_intake_gate.py: テスト → 追加済み(本 PR)結果(preparation.md 以外の consumer):
SKILL.md:termination_reasonの有効値列挙 → 更新済み(本 PR)step-5-feedback-and-termination.md: 既存値(approved,max_iterations,human_escalation)のみ設定 → 更新不要(exhaustive enum check なし)step-5-mergeability-handling.md,conflicting-pr-escalation-runbook.md,step-4-pr-review.md: 既存値のみ設定 → 更新不要GO_INVALIDATION_POLICY_V1/HANDOFF_STATE_V1の既存 consumer: なし(新規 schema のため既存 consumer は存在しない)Compatibility Decision
additive(全変更が非破壊的追加)LOOP_STATE.termination_reason