Skip to content

feat: issue-refinement-loop に native dependency の producer/materializer choke point を追加する - #2447

Merged
squne121 merged 8 commits into
mainfrom
worktree-issue-2435-native-dependency-materialization
Aug 30, 2026
Merged

squne121 merged 8 commits into
mainfrom
worktree-issue-2435-native-dependency-materialization

Conversation

@squne121

@squne121 squne121 commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #2435(本 Issue を解決する)

Issue #2424 の refinement では #2422/#2423/#2432 が hard predecessor として確定し Issue 本文の
## Blocked By に記載されたが、GitHub native blockedBy の live readback は空集合のままだった
(body-only false green)。本 PR は、確定済み hard dependency を native blockedBy へ実際に
materialize し、mutation 後に独立した readback で postcondition を再検証する単一の共通
dependency-materialization choke point を追加し、かつその choke point を
issue-refinement-loop の実際の Step 5 終了処理(approved 終了直前)へ実配線した。

今回の追加修正(リポジトリ所有者からの差し戻し反映、第4回目の反復対応)

OWNER レビューにより、初回実装は choke point(producer + materializer)を追加しただけで、
実際の Step 5 終了経路のどこからも呼び出されておらず、#2424 型の body-only false-green が
merge 後も再発可能である P0 gap が指摘された。本 iteration で以下を修正した。

  1. P0 — choke point を実際の終了経路へ配線: dependency_materializer.py に
    evaluate_termination_dependency_gate() を追加した。issue-refinement-loop の Step 5 が
    approved / LOOP_HANDOFF_RESULT_V1 を投稿する前に必ず呼ぶ単一の choke point であり、
    derive_desired_predecessors() でこのサイクルの確定済み hard dependency を投影し、
    materialize_dependencies() を呼び、proceed / block_retryable / block_persistent の
    3値で orchestrator が取るべきアクションを返す。確定済み hard dependency が存在しない
    サイクルでは no-op で proceed を返す。body-only false-green 検出(AC5)もこの gate の
    decision に統合されており、standalone helper 単体テストに留まらない。SKILL.md Step 5 /
    references/termination-policy.md(新設「Dependency Materialization Gate」節)/
    references/dependency-materialization.md(新設「Step 5 termination gate」節)に必須
    invocation 契約を明記した。
  2. P1 — readiness の自己再実行を廃止: materialize_dependencies() は
    contract_readiness_check.py を自身の subprocess として二度と呼ばない。呼び出し側が
    同一サイクルで既に計算済みの readiness_result を forward するのみ(省略時は subprocess
    を起動しない no-op status: go の default を使う)。旧実装は本 module 自身の subprocess
    crash / non-JSON 出力を input_or_runtime_error に合成し、edit_issue_txn.py の既存
    readiness forwarding 契約経由で不要な human_judgment escalation に化けさせていた。
  3. P1 — Runtime Verification を wiring 経路へ再照準: 動作検証を、materializer への
    直接 CLI 呼び出しから dependency_materializer.py gate サブコマンド(新設 Step 5 choke
    point の実 CLI)経由へ変更した。詳細は下記「動作検証」節参照。
  4. P1 — テストを choke point 経由の integration 形へ寄せる: 新規 11 tests(gate の
    proceed/block_retryable/block_persistent、実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 regression fixture・explicit-remove
    +unrelated-blocker-preservation・body-only false-green のいずれも gate 経由の end-to-end
    検証、readiness 再実行禁止の回帰)。既存 36 tests は変更していない。
  • .claude/skills/issue-refinement-loop/scripts/dependency_materializer.py
    • producer: ISSUE_EXECUTION_DECISION_V1 の relations[].relation_type == "depends_on" /
      execution.predecessors[] を desired native predecessor 集合へ投影する
      (derive_desired_predecessors)。
    • stale predecessor 検出: 2つの確定済み decision snapshot(前回 vs 今回)の明示的差分としてのみ
      removal 対象を決定する (derive_stale_predecessors)。live native state に対する
      live_native - desired の full-set-replace 計算は一切行わない。
    • materializer: 既存 .claude/skills/edit-issue/scripts/edit_issue_txn.py の
      native_relationships / issue_relationship.update controlled executor へ explicit
      add/remove delta のみを渡す (materialize_dependencies)。この module 自身は GitHub への
      直接 GraphQL/REST 呼び出しを行わない。add/remove の schema key 名は
      edit_issue_txn.NATIVE_RELATIONSHIPS_KEYS から動的解決し、二重にハードコードしない。
      readiness は呼び出し側からの forward のみで、自身では再実行しない(fix_delta iter4 P1)。
    • mutation 後、(live_before - explicit_remove) ∪ explicit_add を独立に再計算し、executor の
      live readback と exact match するかを再検証する。executor 自身の status: ok 自己申告を
      そのまま信用しない。
    • 失敗分類: native-capability-unavailable / controlled-executor-failure /
      auth-or-environment-failure / readback-mismatch / semantic-human-judgment-required。
    • body-only false-green 検出 (detect_body_only_false_green): native capability が利用可能なのに
      本文の ## Blocked By だけを更新し native materialization を試みなかった場合を fail-closed で
      検出する(実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 incident shape そのもの)。
    • evaluate_termination_dependency_gate()(fix_delta iter4 新設): Step 5 が
      approved 終了を投稿する前に必ず呼ぶ choke point。CLI: dependency_materializer.py gate。
  • .claude/skills/issue-refinement-loop/references/dependency-materialization.md: SSOT 宣言、
    choke point 設計、失敗分類、readiness 判定との分離に加え、「readiness の再実行禁止」「Step 5
    termination gate」の2節を新設。
  • .claude/skills/issue-refinement-loop/references/termination-policy.md: 「Dependency
    Materialization Gate」節を新設し、Step 5 が approved 終了前に gate を呼ぶ必須契約・
    decision ごとの routing・termination_cause: dependency_materialization_blocked を定義。
  • .claude/skills/issue-refinement-loop/references/index.md: 上記 reference を登録。
  • .claude/skills/issue-refinement-loop/SKILL.md: SSOT 宣言・choke point pointer に加え、
    Step 5 節に必須 gate 呼び出しの一文を追記(500 行 thin-entrypoint budget 内、既存行への
    追記のみで新規行は増やしていない)。
  • .claude/skills/issue-refinement-loop/tests/test_dependency_materialization.py(既存 36 +
    新規 11 = 47 tests)。

In Scope / Out of Scope(Issue 本文どおり)

  • Out of Scope: 新しい dependency graph schema・ledger・mutation broker・別 GitHub relationship
    writer の追加、edit_issue_txn.py の既存 primitive の置き換え、check_blockers.sh の
    再設計、scope collision classification の変更、既存 Issue の一括遡及修正、semantic 判定ルールの
    全面再設計。いずれも本 PR には含まれない。
  • lane ごとの個別 native relationship writer は作らず、materialize_dependencies() /
    evaluate_termination_dependency_gate() を単一の choke point として設計した。実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 の
    confirmed-hard-predecessor 経路も同じ関数を再利用できる構造。本 gate は
    issue-refinement-loop 自身の Step 5 手順(SKILL.md / references/、Allowed Paths 内)
    として配線されており、.claude/agents/issue-editor.md 等の個別 lane 実装ファイル自体の
    変更は引き続き Allowed Paths 外のため対象外(OWNER レビューが「各 lane からの呼び出し配線」
    ではなく「Step 5 終了経路への実配線」を求めていたため、本 iteration でその要求は満たした)。

Checks

check result
pnpm typecheck PASS
pnpm lint PASS
pnpm test PASS (1874 tests)
pnpm build PASS
uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py PASS (24 tests)
uv run --locked ruff check .claude/scripts scripts schemas .claude/skills PASS
AC1: rg "hard dependency の SSOT は GitHub native" SKILL.md references/ PASS
AC2: rg "dependency-materialization choke point" SKILL.md references/ scripts/ PASS
AC3-9,11: pytest issue-refinement-loop/tests/ -k "native_dependency or blocked_by or dependency_materialization" PASS (49 tests, 47 in test_dependency_materialization.py = 36 既存 + 11 新規)
pytest edit-issue/tests/test_edit_issue_txn.py (regression) PASS (68 tests, no changes to this file)
AC10: rg -e "add_blocked_by" -e "remove_blocked_by" --glob "!edit-issue/**" scripts/ references/ PASS (exit 1 = no match)
Full pytest issue-refinement-loop/tests/ 1934 passed / 3 pre-existing unrelated TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatch failures(base ブランチでも同様に失敗する既知の環境依存 flake、本 PR 由来ではない)

動作検証 Runtime Verification(AC4 / AC6 / AC7、decision: immediate、fix_delta iter4 で再照準)

OWNER レビュー指摘(初回実装は materializer への bare CLI 呼び出しのみで producer→materializer
wiring を検証していなかった)を反映し、実 GitHub 上の disposable Issue に対して
新設の dependency_materializer.py gate サブコマンド(Step 5 termination gate の実 CLI、
evaluate_termination_dependency_gate())経由で検証した。native relationship primitive
自体は #1883/PR #1897 で live canary 済みのため再検証しない(本 Issue の RVA 記載どおり)。

Schema Change Applicability

  • decision: not_schema_change
  • reason: 既存 ISSUE_EDIT_TXN_INPUT_V1 / ISSUE_RELATIONSHIP_UPDATE_INPUT_V1 schema はそのまま消費するのみで、フィールド追加・変更は行っていない。新規スキーマ DEPENDENCY_MATERIALIZATION_RESULT_V1 / TERMINATION_DEPENDENCY_GATE_RESULT_V1 は本 PR 内で閉じた新規 internal contract であり、外部 consumer は本 PR 時点で存在しない。

Schema Consumer Inventory

N/A
reason: schema_change ではないため対象外。DEPENDENCY_MATERIALIZATION_RESULT_V1 / TERMINATION_DEPENDENCY_GATE_RESULT_V1 は現時点で dependency_materializer.py の CLI 呼び出し元(issue-refinement-loop Step 5 手順自身)以外に consumer を持たない新規 internal schema。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
本 module は GitHub への直接 GraphQL/REST mutation を一切行わず、既存 edit_issue_txn.py / issue_relationship.update controlled executor のみに委譲する yes AC10 VC(rg no-match)+ コード全体で subprocess 呼び出しは edit_issue_txn.py のみ(contract_readiness_check.py への subprocess 呼び出しは fix_delta iter4 で撤去済み)
native predecessor の removal は常に caller 明示の stale_predecessors_to_remove(gate 経由では前回/今回 decision snapshot の明示的差分)からのみ決定され、live native state の live - desired 計算からは決定しない yes test_dependency_materialization_compute_add_and_remove_targets_never_removes_unrelated_blocker + test_termination_gate_explicit_remove_with_unrelated_blocker_preservation_proceeds + 実 disposable Issue での live 検証(#2452 保持確認)
mutation 後の postcondition は executor の自己申告を信用せず本 module が独立に再計算・再検証する yes test_dependency_materialization_materialize_dependencies_readback_mismatch_never_reported_ok + 実 disposable Issue での live 検証(Step 1 の transient transport error を block_retryable として fail-closed に扱い、proceed を返さなかった実例)
失敗時(capability unavailable / auth-or-environment / controlled-executor failure 等)は決して success として報告されない(fail-closed) yes test_dependency_materialization_materialize_dependencies_capability_unavailable_fails_closed 等 8 tests + test_termination_gate_persistent_failure_classes_block_persistent 等 gate tests
issue-refinement-loop の Step 5 終了処理(approved / LOOP_HANDOFF_RESULT_V1 投稿)は、確定済み hard dependency が存在するサイクルで choke point (evaluate_termination_dependency_gate) を必ず経由する(fix_delta iter4 で解消。旧: 各 lane からの呼び出し配線が未接続) yes references/termination-policy.md「Dependency Materialization Gate」節、SKILL.md Step 5 の必須ゲート文、gate 経由の live disposable-Issue 検証(Step 1/Step 2 上記)
本 PR は #2406 の confirmed-hard-predecessor 経路や他の lane(trusted-anchor / human-context / controlled reframe)の呼び出し配線そのものの変更は含まない(choke point 関数の提供・Step 5 経路への配線・文書化までがスコープ。個別 lane 実装ファイル自体の変更は Issue #2435 Allowed Paths 外の Out of Scope 項目であり安全性ギャップではない — Step 5 choke point は lane を問わず一律に適用されるため) yes references/dependency-materialization.md の AC9 節、Issue #2435 Allowed Paths / Out of Scope

Notes

Related issue: #2435(本 PR に関連する Issue 番号)

Test and others added 2 commits August 30, 2026 19:16
…erializer choke point を追加する (#2435)

hard dependency (trusted human context / trusted anchor / controlled reframe / #2406
confirmed-hard-predecessor) が確定した際、これまで Issue body の `## Blocked By` prose のみが
更新され GitHub native blockedBy への materialization/readback が行われないことがあった
(#2424 retrospective: body には #2422/#2423/#2432 が記載されたが live readback は空集合)。

dependency_materializer.py を単一の共通 choke point として追加する。
ISSUE_EXECUTION_DECISION_V1 の depends_on relation / predecessors を desired native predecessor
集合へ投影し (producer)、既存 edit_issue_txn.py の native_relationships / issue_relationship.update
controlled executor へ explicit add/remove delta のみを渡し (materializer)、mutation 後に
独立した postcondition readback で exact match を再検証する。stale predecessor の removal は
常に2つの確定済み decision snapshot 間の明示的差分としてのみ決定し、live native state に対する
full-set-replace 計算は行わない。無関係な既存 native predecessor は決して自動削除されない。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…dency Materialization 節を圧縮する (#2435)

test_thin_entrypoint / test_step_0f_parent_owned_preflight の 500 行制約に抵触したため、
既存段落へ1文追記 + 参照マップへの1行追加のみに圧縮する(詳細は references/dependency-materialization.md 側に集約済み)。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2447/

The preview will be removed when this PR is closed.

Test and others added 2 commits August 30, 2026 19:32
)

CI job python-test-core が failure_class 算出行の長さ超過で失敗していたため、
複数行に整形して behavior を変えずに解消する。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
PR Body Japanese Check の per-block バリデータが日本語文字比率 0 の
見出しブロック `## dependency-materialization choke point(AC2)` を
prose として検出し fail していた問題を、見出しに「の設計」を追加して解消する。
@squne121

Copy link
Copy Markdown
Owner Author

impl-review-loop PR Review 結果

  • Mergeability: mergeable: MERGEABLE, merge_state_status: BEHIND(Draft PR、conflictなし)
  • Evidence Check: Allowed Paths gate status: ok(違反0件)。全required CI checks(typecheck/lint/test/build/python-test/python-test-core/validate-generated-artifact)SUCCESS。AC1/AC2/AC10 の rg 検証、AC3-9/11 の pytest(issue-refinement-loop native_dependency/blocked_by/dependency_materialization、edit-issue regression)全PASS。AC4/AC6/AC7 の live canary(disposable Issue chore(disposable): dependency-materialization canary TARGET (Issue #2435, safe to close) #2441-chore(disposable): dependency-materialization canary UNRELATED-PREEXISTING (Issue #2435, safe to close) #2444)を独立に再検証し、live blocked_by が主張どおり {2442, 2444} であることを確認。
  • Blockers: なし
  • Non-blockers: PR body の ## Checks テーブル形式は pr-review-judge reference の ## 受け入れ条件の達成状況 見出しと文字列一致しないが、内容(per-AC VC + evidence)は充足しており blocking にしない。
verdict: APPROVE
reviewed_head_sha: "9cb9a561c14b4b69cb10af6ee95df900d2e4e067"
blockers: []
warnings:
  - "PR body uses a '## Checks' table instead of the literal '## 受け入れ条件の達成状況' heading; substance is present and not a template requirement, so non-blocking."

@squne121

Copy link
Copy Markdown
Owner Author

impl-review-loop PR Review 結果(update_branch後の再レビュー)

  • Mergeability: mergeable: MERGEABLE, merge_state_status: CLEAN(Draft PR、conflictなし)
  • Evidence Check: git diff 9cb9a561..cd29b323 をPR対象ファイルに限定すると差分なし(main merge はこのPRの内容に対して no-op)。Allowed Paths gate status: ok。全required CI checks(typecheck/lint/test/build/python-test/python-test-core/validate-generated-artifact)SUCCESS。AC1-AC11 の独立検証(rg / pytest 38+68件)全PASS。dependency_materializer.py の実装を直接確認し、add/remove delta が常に明示差分からのみ決定されること、直接GitHub呼び出しがなく edit_issue_txn.py にのみ委譲していることを確認。
  • Blockers: なし
  • Non-blockers: Safety Claim Matrix の「Not controlled」行(lane配線未接続)は Issue 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 の Allowed Paths/Stop Conditions に基づく妥当な理由があるが、follow-up issue番号が未採番。merge前後でのtraceability確保のため起票推奨(blockingではない)。
verdict: APPROVE
reviewed_head_sha: "cd29b323e2cd9eba0ac77d876ff124a4358b6c39"
blockers: []
warnings:
  - "Safety Claim Matrix 'Not controlled' row references an unnumbered follow-up issue; rationale is contract-grounded but tracking issue should be filed for traceability."

@squne121

Copy link
Copy Markdown
Owner Author

総合判定

REQUEST_CHANGES です。PR #2447 は native dependency の delta 計算・既存 edit_issue_txn.py 再利用・readback 検証という部品単体の設計はかなり妥当です。しかし、Issue #2435 が解決対象にした「production workflow でその部品が実際に呼ばれない」という根本原因をまだ直していません。

最新 head cd29b323... は Draft・mergeable で、CI も green、既存 impl-review-loop は APPROVE しています。ですが、そのレビューは「lane 配線未接続」を non-blocker と扱っており、Issue #2435 の契約そのものとの不一致を見落としています。

  1. P0 — AC2 / Outcome 未達: choke point が production path に接続されていません。 Issue 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 は、trusted-anchor / human-context / controlled reframe / 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 confirmed-hard-predecessor など、hard dependency を確定できる全 production laneが単一の dependency-materialization choke point を通ることを In Scope / AC2 としています。ところが PR 自身が「各 lane からの実際の呼び出し配線は未接続のまま」「別 Issue で対応予定」と明記しています。つまり今 merge しても、従来の workflow が新しい dependency_materializer.py を呼ばなければ 実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 型の body-only false green はそのまま発生できます。Closes #2435 は現状では不適切です。
    しかも 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 の Allowed Paths には .claude/skills/issue-refinement-loop/scripts/ と SKILL.md が含まれています。「.claude/agents/issue-editor.md が Allowed Paths 外だから実配線できない」という説明だけでは不足です。共通 handoff / final gate を既存の refinement-loop 側に置けない理由を示すか、置くべきです。

  2. P0 — Runtime Verification が、検証すべき欠陥をバイパスしています。 PR の live canary は dependency_materializer.py --target-issue ... --desired-predecessors ... を直接起動しています。これは materializer 自体が GitHub を更新できることは示しますが、actual issue-refinement-loop → confirmed dependency producer → materializer → handoff gate の配線を一切通っていません。Issue 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 の事前敵対レビューでも、必要な runtime verification は「actual issue-refinement-loop entrypoint から disposable Issue を add→readback→remove→readback」と明記されていました。既存 native primitive は PR 実装: edit-issue transaction に GitHub native 親子・依存関係の同期と readback を追加する #1897 ですでに live canary 済みなので、今回再検証すべきなのは primitive ではなく wiring です。
    現在も incident 元の 実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 の native blocked_by は実際に [] です。これは 実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 自体を本 PR で修復しろという意味ではありませんが、「部品を追加しただけでは状態が変わらない」ことをよく示しています。

  3. P1 — routine runtime failure が semantic-human-judgment-required に化けます。 新コードは classify_materialization_failure() で input_or_runtime_error を semantic-human-judgment-required に分類しています。さらに _run_readiness_check() は subprocess の非 JSON 出力を input_or_runtime_error にし、既存 edit_issue_txn.py も forwarded input_or_runtime_error を human_judgment として返します。結果として、readiness checker の一時的な実行失敗まで人間判断ルートに入る構造です。
    これは 実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する #2435 の「routine/retryable な environment failure を不必要な human approval に変換しない」という契約、そして今回の「趣味開発なのでハーネスに作業を邪魔させない」という優先順位と逆です。materializer 内で readiness を再実行しないのが最も単純です。既存 workflow が生成済みの canonical readiness result を引き継ぎ、dependency materialization は dependency の成否だけを担当させる方が責務も明確です。

  4. P1 — 36 tests / 510 LOC が causal coverage ではなく helper coverage に偏っています。 dependency_materializer.py が 645 LOC、専用テストが 510 LOCありますが、AC9 の「他 lane から再利用可能」テストは同じ関数を2回呼ぶだけです。また detect_body_only_false_green() は存在して単体テストされていますが、production completion gate に接続されていないため、実際には false green を止めません。
    このプロジェクトの前提なら、テスト数を増やすより human-context / trusted-anchor / controlled-reframe / 実装: issue-refinement-loop で scope_collision_check/v1 を消費する #2406 route が共通 gate に到達する integration test、実装: 実CI raw attemptsからReliability V1 close evidenceをproduction生成する #2424 fixture、explicit remove、unrelated blocker preservation、body-only false-green の7〜8系統程度に寄せる方が有用です。Issue の事前レビューもほぼ同じ最小構成を推奨しています。

  5. P2 — transport は今の PR では増やさず、将来はむしろ簡素化できます。 現行 GitHub CLI は v2.94.0 以降、gh issue edit --add-blocked-by/--remove-blocked-by/--add-blocking/--remove-blocking を正式サポートし、依存関係の JSON read も提供しています。REST にも blocked-by の list/add/remove endpoint が正式にあります。 ([GitHub CLI]1)
    したがって 新しい GraphQL wrapper / broker / ledger / authorization layer は不要です。一方、この PR で既存 issue_relationship.update を CLI へ置き換える必要もありません。今回は writer を一本のまま保ち、まず production wiring を完成させるべきです。将来メンテナンス負荷を下げたくなった時に、既存 executor の内部 transport を現行 gh に寄せるのは検討価値があります。

merge 前に直す最小範囲

大きな再設計は不要です。dependency_materializer.py の delta semantics、無関係 blocker を保存する方針、既存 edit_issue_txn.py の再利用は維持してよいです。

必要なのは、final deterministic review / implementation handoff の直前に production 共通 gate を1個だけ実配線することです。そこで confirmed ISSUE_EXECUTION_DECISION_V1 → desired/stale predecessor → materialize_dependencies() を流し、native_relationship_materialized != true なら implementation handoff だけ止めます。auth/network/runtime failure は human approval ではなく retryable failure として返します。body rewrite 自体まで巻き戻す必要はありません。

その production gate に body-only false-green 判定を統合してください。独立 helper の存在ではなく、native capability があるのに materialization receipt/result がない状態で proceed できないことをテストすべきです。

Runtime Verification は現在の直接 CLI canary ではなく、disposable Issue を使って actual issue-refinement-loop entrypoint から1本通せば十分です。#1897 が primitive を既に検証しているため、新しい安全ハーネスを増築する必要はありません。

この修正が入れば、私は APPROVE 寄りです。現在の blocker は native dependency 実装の安全性ではなく、「再発防止コードを作ったが、再発する場所にはまだ接続していない」ことです。

…配線する

OWNER REQUEST_CHANGES (PR #2447 comment 5468370232) 反映。producer/materializer
choke point 自体は追加済みだったが、issue-refinement-loop の実際の Step 5 終了処理
(approved / LOOP_HANDOFF_RESULT_V1 投稿)のどこからも呼ばれておらず、#2424 型の
body-only false-green が merge 後も再発可能だった。

- dependency_materializer.py に evaluate_termination_dependency_gate() を追加し、
  Step 5 が approved 終了を投稿する前に必ず呼ぶ単一の choke point とする
  (proceed / block_retryable / block_persistent の3値、body-only false-green 検出を
  end-to-end で decision に統合)。
- materialize_dependencies() は自身では contract_readiness_check.py を再実行しない
  よう変更(呼び出し側が既に計算済みの readiness_result を forward するのみ)。
  従来は本 module 自身の subprocess crash が human_judgment escalation に誤変換
  されていた。
- SKILL.md Step 5 / references/termination-policy.md / references/dependency-
  materialization.md に必須ゲートの手順・schema・routing を明記。
- 新規 11 tests(termination gate の proceed/block_retryable/block_persistent、
  #2424 regression・explicit-remove+unrelated-preservation・body-only
  false-green のいずれも gate 経由の end-to-end 検証、readiness 再実行禁止の回帰)。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
squne121 and others added 2 commits August 30, 2026 20:59
CI の PR Body Japanese Check(実体は変更 Markdown ファイル全体の日本語比率検査)が、
コードスパンのみで構成された exit code 説明段落を日本語比率不足として fail させていた。
文を日本語プロースへ書き換えて解消する。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@squne121

Copy link
Copy Markdown
Owner Author

impl-review-loop PR Review 結果(オーナーREQUEST_CHANGES対応後の再レビュー、iteration 4)

対象コメント: #2447 (comment)

  • Mergeability: mergeable: MERGEABLE, merge_state_status: CLEAN(Draft PR)
  • P0(choke pointが本番経路に未接続): dependency_materializer.py に evaluate_termination_dependency_gate() を追加し、SKILL.md Step 5 および references/termination-policy.md に「approved 終了・LOOP_HANDOFF_RESULT_V1 投稿前に本ゲートを実行し decision: proceed の場合のみ継続する」という必須(MUST)文言が明記されていることを直接読解で確認。
  • P1(readiness再実行の誤分類): _run_readiness_check() のmaterializer内自己起動を削除し、caller供給のreadiness_resultを使う設計に変更されたことをコード直接確認。
  • P1(Runtime Verification): 新ゲート経由でのdisposable Issue([RVA disposable] gate wiring TARGET (#2435 fix_delta iter4) #2449-[RVA disposable] gate wiring UNRELATED-PREEXISTING (#2435 fix_delta iter4) #2452)による実GitHub live canaryへ再構成。
  • P1(テスト構成): test_termination_gate_* 系6件を含む統合寄りのテストが追加され、全47件PASS確認(独立実行含む)。
  • AC1/AC2/AC10 rgコマンド・pytestスイートを独立実行し全PASSを確認(先行するtest-runnerの誤検知report は棄却・再検証済み)。
  • Blockers: なし
verdict: APPROVE
reviewed_head_sha: "3b8a87660370f190e34595084b29ac5a3b890607"
blockers: []
warnings:
  - "Full .claude/skills/issue-refinement-loop/tests/ suite (1934 tests) was not independently re-executed end-to-end by the reviewer due to local execution time; covered by CI required-check evidence (python-test: passed) at this exact head SHA instead."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: issue-refinement-loop の hard dependency を GitHub native blockedBy に materialize / readback する

1 participant