Repository navigation
docs(#560): establish final gate, VC diff rules, preflight-scope per-command, stale-result invalidation - #563
Conversation
…command, stale-result invalidation - termination-policy.md: require CONTRACT_REVIEW_RESULT_V1.status == "go" as final gate after approve; define handoff gate and contract snapshot idempotency with body_sha256 - dor.md: add VC baseline diff rule, rg/grep exit code semantics (0=unexpected_pass/1=expected_fail/2=block), preflight-scope per-command rule (1 marker = 1 command only), pytest exit code table (exit 5 != expected baseline fail) - workflow.md: add rule that any Issue body change after human_escalation invalidates prior contract-review result and requires full re-run Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
検証結果レポートIssue #560: issue-refinement-loop issue-contract rev
総合判定
```yaml |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 9/9 PASS — AC1〜AC7 は pr_review_only VCs で全件確認済み、AC8/AC9 は CI (head_sha: 3141212) で PASS
- Allowed Paths: 遵守 — 変更ファイル 3 件すべて Allowed Paths 内
- CI Verification: 全 7 チェック pass (build / e2e / lint / python-test / test / typecheck / validate-generated-artifact)、head_sha 一致確認済み
- 検証コマンド結果: TEST_VERDICT_MACHINE コメントあり、verification_skipped_count: 0、全 AC PASS
- Schema Change Applicability: not_schema_change(diff に schema 定義追加なし)
Blockers
- Safety Claim Matrix が未提出 — 変更パス
.claude/skills/issue-refinement-loop/references/termination-policy.mdが.claude/skills/**に該当するため、pr-review-judge SKILL.md の safety-sensitive 判定ルール(fail-closed)により Safety Claim Matrix が必須となります。- PR 本文に
## Safety Claim Applicabilityまたは## Safety Claim Matrixセクションが存在しません。 - 対処:
not_safety_claim_changeを根拠付きで明示するか(例: "変更はワークフロー終了ポリシー文書の追記のみで、transport / permission / sandbox / auth いずれの実装も変更しない")、Safety Claim Matrix を追記してください。 - 参考: SKILL.md § 4.6「Safety-sensitive PR の判定(fail-closed)」
- PR 本文に
Non-blockers
- (なし)
LOOP_VERDICT
LOOP_VERDICT:
verdict: REQUEST_CHANGES
blockers:
- "Safety Claim Matrix または not_safety_claim_change 明示が PR 本文にない (.claude/skills/** path match による fail-closed 判定)"
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 3141212d9c807d1d25e7cff540e95a499e1d26eb
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: 9/9 PASS — all ACs verified against PR diff and TEST_VERDICT_MACHINE
- Allowed Paths: compliant — 3 changed files all within Allowed Paths (termination-policy.md, dor.md, workflow.md)
- CI Verification: all 7 checks pass (build, e2e, lint, python-test, test, typecheck, validate-generated-artifact) at head SHA 3141212
- 検証コマンド結果: TEST_VERDICT_MACHINE (verification_commands_pass: 9, verification_skipped_count: 0) — AC1-AC7 pr_review_only confirmed via diff; AC8 pnpm test 313/313 PASS; AC9 pnpm build PASS
AC Coverage Detail
- AC1: termination table row updated to require
CONTRACT_REVIEW_RESULT_V1.status == "go"— PASS (diff line 7) - AC2: "SKILL.md が本ファイルを normative reference として消費するため、SKILL.md を変更せずとも実効性がある" — PASS (diff Final Gate section)
- AC3: Contract Snapshot Idempotency section with
body_sha256, stale result invalidation, handoff gate table — PASS - AC4: rg/grep exit code table (exit 0=unexpected_pass, 1=expected_fail, 2=block) and baseline差分性ルール in dor.md — PASS
- AC5: preflight-scope per-command規約 "1 つのマーカーが効く範囲は直後の 1 コマンドのみ" in dor.md — PASS
- AC6: pytest exit code table including exit 5 (no tests collected) warning in dor.md — PASS
- AC7: "human_escalation 後の Issue 本文変更と contract review 再実行" section in workflow.md with body_sha256 and stale result handling — PASS
Safety Claim Gate
- Changed paths include
.claude/skills/**→ safety-sensitive PR - Safety Claim Matrix present in PR body: 2 claims, both with
Not controlled: N/A - No unbounded safety claims detected (claims are bounded: "Markdown only", "no permission escalation")
- SAFETY_CLAIM_OVERCLAIM_REQUEST_CHANGES: not triggered
Schema Consumer Inventory Gate
- Changed files are Markdown docs only, no schema contract changes
- schema_change_applicability: not_schema_change — Schema Consumer Inventory not required
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
LOOP_VERDICT:
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 3141212d9c807d1d25e7cff540e95a499e1d26eb
recommendations: []
follow_up_issue_requests: []
判定: REQUEST_CHANGES先ほどの中間メモで述べた「旧 ただし、PR #563 はまだ merge すべきではありません。理由は、自然言語・表の final gate は追加されているが、同じ normative file 内の構造化ポリシー、producer contract、stale 判定の実装経路が整合していないためです。 Blocker 1:
|
- Blocker 1: replace bare `verdict == "approve" -> done` route with final gate that checks contract_review.status and body_sha256 - Blocker 2: add policy-only note for body_sha256 producer-side follow-up; fix Final Gate to separate status:blocked vs next_action:human_judgment - Blocker 3: rewrite implement-issue Handoff Gate table to use next_action field correctly; clarify status valid values Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: UNSTABLE
baseline_only: false
verification_commands_pass: 9
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []検証結果レポートIssue #560: Issue Contract Refinement Loop / issue-contract-review 周辺
総合判定
修正内容確認iteration 1 の修正(Blocker 3 点)が正常に反映されています:
ブランチ状態
9 個の検証コマンドがすべて PASS。PR #563 iteration 1 は全 AC を達成しました。 |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: 9/9 PASS — TEST_VERDICT_MACHINE (verification_commands_pass: 9, verification_skipped_count: 0); CI run headSha bd3cd84 matches PR head, conclusion=success
- Allowed Paths: 遵守 — 変更ファイル 3 件 (termination-policy.md, dor.md, workflow.md) すべて Allowed Paths 内
- CI Verification: 全 7 チェック pass (build / e2e / lint / python-test / test / typecheck / validate-generated-artifact); CI run headSha=bd3cd84c457f891cc785e12ad01bf4239f8a1db1 確認済み
- 検証コマンド結果: TEST_VERDICT_MACHINE あり (verification_skipped_count: 0); AC1〜AC7 pr_review_only — diff 照合 PASS; AC8 pnpm test 313/313 PASS; AC9 pnpm build PASS
Previous Iteration Blockers (all 3 resolved)
- LOOP_POLICY_V1.routes の bare
verdict == "approve" → doneルート: 解消 —verdict == 'approve' and contract_review.status == 'go' and contract_review.body_sha256 == issue.body_sha256に置換済み - body_sha256 producer contract 未実装: 解消 — policy-only note 追記済み、follow-up #566 OPEN 確認済み
status: human_judgmentの schema 不在: 解消 — handoff gate 表でnext_action: human_judgmentを使用、CONTRACT_REVIEW_RESULT_V1.status有効値go | blockedを明記
Blockers
## Schema Change Applicabilityセクションが PR 本文に存在しない- PR テンプレートおよび pr-review-judge SKILL.md §4.5 は
not_schema_changeの場合でも## Schema Change Applicabilityセクションで明示を要求しています("schema_change_applicability: not_schema_changeを明示し、その根拠が diff と一致している場合は Schema Consumer Inventory の提出を不要とする")。 - 現在の PR 本文には
## Schema Change Applicabilityセクションが存在しないため、APPROVE 禁止条件(## Schema Change Applicabilityセクションが存在しない → APPROVE 禁止)が該当します。 - 対処: PR 本文に
## Schema Change Applicabilityセクションを追加し、decision: not_schema_change、reason: 変更は Markdown policy 文書 3 件のみ。LOOP_POLICY_V1.routes は Initial Known Schemas 非登録を記載してください。 - なお、差分内容自体は明らかに
not_schema_change(Markdown prose 追記のみ、Initial Known Schemas の before/after なし)であり、schema 変更の実質的な問題はありません。セクション記載のみが不足しています。
- PR テンプレートおよび pr-review-judge SKILL.md §4.5 は
Non-blockers
- なし
LOOP_VERDICT
LOOP_VERDICT:
verdict: REQUEST_CHANGES
blockers:
- "## Schema Change Applicability セクションが PR 本文に存在しない (SKILL.md §4.5 APPROVE 禁止条件)"
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: bd3cd84c457f891cc785e12ad01bf4239f8a1db1
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: AC1-AC9 全
[x]記載。TEST_VERDICT_MACHINE にて 9 VC 全 PASS(verification_skipped_count: 0) - Allowed Paths: diff 3 ファイルすべて Allowed Paths 内(termination-policy.md / dor.md / workflow.md)
- CI Verification: 7 チェック全 pass(build/e2e/lint/python-test/test/typecheck/validate-generated-artifact)、headSha=bd3cd84c457f891cc785e12ad01bf4239f8a1db1 と一致
- 検証コマンド結果: TEST_VERDICT_MACHINE(2026-06-02T03:15:39Z 投稿)にて AC1-AC7 rg VC PASS、AC8 pnpm test 313/313 PASS、AC9 pnpm build PASS
- Schema Change Applicability:
decision: not_schema_change明示あり。変更は .md ファイル 3 件のみ。Schema Consumer Inventory 不要 - Safety Claim Matrix:
.claude/skills/**変更で safety-sensitive 判定。2 bounded claims(Not controlled: N/A)、Evidence は AC8/AC9 対応、無限定安全主張なし。Gate PASS - Runtime Verification:
not_applicable(docs-only 変更、pnpm test で回帰確認完結) - head SHA 一致: CI run 26796029931 の headSha = bd3cd84 = 現 PR head。Stale SHA なし
- 前回ブロッカー解消確認:
- LOOP_POLICY_V1.routes 裸ルート → iteration 1 commit で修正済み(TVM PASS)
- body_sha256 policy-only → note 追記 + follow-up #566 起票済み
- status: human_judgment → next_action で表現するよう修正済み
- Schema Change Applicability セクション欠落 → PR 本文に追加済み(decision: not_schema_change)
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: bd3cd84c457f891cc785e12ad01bf4239f8a1db1
recommendations: []
follow_up_issue_requests: []
Summary
termination-policy.md: reviewerapprove後にCONTRACT_REVIEW_RESULT_V1.status == "go"を final gate として必須化。handoff gate(go/blocked/human_judgment)と body_sha256 による stale snapshot invalidation を定義。LOOP_POLICY_V1.routes を final gate 条件付きルートに更新dor.md: VC baseline 差分性ルール(baseline fail/post-impl pass の変化のみ使用可)、rg/grep exit code 意味(exit 0=unexpected_pass/1=expected_fail/2=block)、preflight-scope per-command 規約(1 マーカー = 直後 1 コマンドのみ有効)、pytest exit code table(exit 5 を expected_baseline_fail と混同しない)を追記workflow.md: human_escalation 後に Issue 本文を 1 文字でも変更した場合は prior contract-review result が stale になり full re-run が必要なルールを追記受け入れ条件の達成状況
termination-policy.mdにCONTRACT_REVIEW_RESULT_V1.status == "go"必須の記述が追加されたtermination-policy.mdに SKILL.md 非変更でも実効性がある旨が明記されたtermination-policy.mdに snapshot idempotency・handoff gate・body_sha256 stale result invalidation が定義されたdor.mdに VC baseline 差分性ルールと rg/grep exit code 意味が追記されたdor.mdに preflight-scope marker の per-command 規約が追記されたdor.mdに pytest exit code semantics(exit 5 注意を含む)が追記されたworkflow.mdに human_escalation 後の Issue 本文変更で contract review 再実行が必要なルールが追記されたpnpm testPASS(313 tests passed)pnpm buildPASSSchema Change Applicability
decision: not_schema_change
変更対象はすべて Markdown prose(
.mdファイル)のみ。issue-contract-review/SKILL.md等の Initial Known Schemas(CONTRACT_REVIEW_RESULT_V1 等)を変更していない。検証コマンド結果
AC1〜AC7 の rg VC は
# preflight-scope: pr_review_onlyのため PR レビュー時に確認。Allowed Paths 遵守
.claude/skills/issue-refinement-loop/references/termination-policy.md— modifieddocs/dev/dor.md— modifieddocs/dev/workflow.md— modifiedAllowed Paths 外の変更: なし(
allowed_paths_compliance: true)Safety Claim Matrix
.mdファイル 3 件)であり、実行可能コード・権限設定・sandbox 動作を変更しないpnpm test313/313 PASS、AC9pnpm buildPASS。Allowed Paths 外の変更なしtermination-policy.mdの変更は issue-refinement-loop の完了条件を強化するポリシー追記であり、新規の権限昇格・外部通信経路・ツール呼び出しを導入しないContract Snapshot
contract_snapshot_url: #560 (comment)
Follow-up Issues
issue-contract-review/SKILL.mdのCONTRACT_REVIEW_RESULT_V1出力にbody_sha256を追加(body_sha256 producer-side 実装。本 PR は policy-only)Closes #560