Skip to content

実装: test-runner の canonical Step 2 evidence report を certifiable にする #2479

Closed as not planned

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "test-runner が live Issue の literal Verification Commands を current PR head と Issue body に束縛して実行し、Step 4 gate に受理される genuine TEST_VERDICT_MACHINE/v2 を返せるようにする"
change_kind: code

Parent Issue

none

Parent Goal Ref

Current Validated Scope

  • .claude/agents/test-runner.md に、live Issue body から literal Verification Commands を取得して逐語実行し、current PR head・live Issue body SHA-256・実 command SHA-256・current CI CheckRun/artifact readback を report へ束縛する手順を追加する。
  • 既存 canonical producer materialize_test_verdict_artifact.py と consumer validator adjudicate_vc_result.py を最小変更し、generated_at と source-integrity boolean fields を含む genuine TEST_VERDICT_MACHINE/v2 だけが adapter/Step 4 current-head gate に到達できるようにする。
  • 上記 producer/validator の既存 focused tests と、test-runner persona の fail-closed runtime smoke 用 fixture のみを更新する。

Remaining Parent Gaps

Outcome

更新された test-runner contract、canonical producer/validator、および focused regression/runtime-smoke tests が、live Issue の literal VC・current head/body・current CI artifact に束縛された実 SHA-256 と source-integrity fields を持つ genuine TEST_VERDICT_MACHINE/v2 のみを Step 4 gate に受理させ、全 Verification Commands が PASS する状態。

Runtime Verification Applicability

  • decision: immediate
  • reason: .claude/agents/test-runner.md の実行指示を変更するため、unit tests に加えて isolated Claude runtime で test-runner persona が fail-closed に起動・報告する証跡が必要である。
  • runtime_evidence: worktree-agent-runtime-smoke の structured evidence と clean-postcondition readback を PR に保存する。

In Scope

  • live GitHub readback を先に行い、Issue body の exact VC text と command SHA-256、current PR head SHA、Issue body SHA-256、workflow/check-run/artifact identity/digest を同一 report に記録する test-runner 手順。
  • canonical JSON/UTF-8/SHA-256 による generated_at、artifact payload、command hashes、および source-integrity boolean fields の生成・検証。
  • stale head/body、command text/hash drift、missing/invalid CI check/artifact、fallback、synthetic hash/flag、self-attested record を fail-closed にする producer/validator coverage。
  • materialized verdict を canonical adapter 経由で Step 4 current-head gate が受理する positive regression と、上記不整合を拒否する negative regressions。

Out of Scope

Acceptance Criteria

  • AC1: test-runner は live Issue body の literal Verification Commands を唯一の実行入力として取得・逐語実行し、各実行文字列の実 SHA-256 と live Issue body SHA-256 を report する。
  • AC2: report は current PR head/reviewed/diff head、generated_at、Issue/PR identity、全 VC coverage、current workflow/check-run/artifact identity/digest、および source-integrity boolean fields を同一 binding として含む。
  • AC3: canonical producer/validator は command/body/head drift、invalid or synthetic SHA-256、missing/stale CI artifact/check、fallback、self-attestation、または source-integrity false を fail-closed にし、workaround と adapter bypass を PASS にしない。
  • AC4: genuine materialized TEST_VERDICT_MACHINE/v2 は canonical adapter を経て current-head Step 4 gate に受理され、generated_at/source-integrity 欠落または不整合 verdict は受理されない。
  • AC5: isolated runtime smoke は更新後 test-runner persona を実際に起動し、必須 live context がない入力を INSUFFICIENT_CONTEXT として fail-closed に報告し、worktree を clean に保つ。
  • AC6: 変更は Allowed Paths 内に限定され、実装: issue-refinement-loop の ANCHOR_SCOPE_REFRAME_V1 に close/not_planned decision を追加し heavy_mutation_gate を到達可能にする #2472/PR fix: normalize close-not-planned anchor decisions #2478 paths、workflow/publisher/schema family、実装: impl-review-loop の runtime_only VC adjudication を current-head evidence に安全に接続する #2467 の runtime_only semantics を変更しない。

Verification Commands

# AC1
$ rg -n generated_at .claude/agents/test-runner.md

# AC2
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_materialize_test_verdict_artifact.py -q

# AC3
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result.py -q -k test_verdict

# AC4
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result.py -q -k step4

# AC5
$ uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py --runtime claude --mode structured --worktree "$PWD" --prompt-file .claude/skills/impl-review-loop/tests/fixtures/test_runner_certifiable_smoke_prompt.md --output-dir artifacts/test-runner-certifiable-smoke --timeout-seconds 180 --max-turns 3 --claude-agent-name test-runner --hermetic-agent-definition --expect-marker INSUFFICIENT_CONTEXT --require-clean-postcondition

# AC6
$ pnpm typecheck

# AC6
$ pnpm lint

# AC6
$ pnpm test

# AC6
$ pnpm build

# AC6
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py

Allowed Paths

  • .claude/agents/test-runner.md
  • .claude/skills/impl-review-loop/scripts/materialize_test_verdict_artifact.py
  • .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
  • .claude/skills/impl-review-loop/tests/test_materialize_test_verdict_artifact.py
  • .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result.py
  • .claude/skills/impl-review-loop/tests/fixtures/test_runner_certifiable_smoke_prompt.md

Stop Conditions

Required Skills

なし

Required Design References

  • docs/dev/workflow.md#implementation-issue-canonical-contract
  • docs/dev/runtime-verification-policy.md#runtime-verification-applicability
  • docs/dev/extension-surface-runtime-policy.yaml
  • .claude/skills/impl-review-loop/steps/step-2-verification.md
  • .claude/skills/impl-review-loop/steps/step-4-pr-review.md
  • .claude/agents/test-runner.md

Scope Delta(任意)

N/A

Background

採用方針は既存 canonical producer/validator を live-readback binding が完結する最小範囲で強化する決定論的修正である。運用上の手入力、synthetic hash/flag、self-attested evidence、または adapter bypass は current-head/body/CI provenance を証明できないため採用しない。

Scope Collision (C1): related_issue=#2467, #2141, #1944, #1909, #1908, #1116, #966, #962, #961; overlapping_paths=.claude/agents/test-runner.md, .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py, .claude/skills/impl-review-loop/scripts/materialize_test_verdict_artifact.py, .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result.py, .claude/skills/impl-review-loop/tests/test_materialize_test_verdict_artifact.py. edit_intent は certifiable producer evidence の生成・検証のみであり、#2467 の runtime_only authorization と #2141 の production caller 配線は変更しない。共有パスは #2141、#2467 merge 後に直列で編集する。

Delivery Rule

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Sep 2, 2026
  2. squne121 commented on Sep 3, 2026

    @squne121
    OwnerAuthor

    総合判定

    REQUEST_CHANGES。さらに、#2479 を #2472 の hard predecessor にしている関係は解除するのを推奨します。

    問題意識そのもの――「stale/self-attested な検証結果を current-head evidence と誤認しない」――は正しいです。実際、現在の PR #2478 は PR body では 80e71cda... を「current head で再検証済み」と記載したままですが、live head はすでに a82ed9e4... へ進んでいます。人間向けの自己申告を authority にしない設計は必要です。

    ただし、その問題は #2479 が提案する materialized TEST_VERDICT_MACHINE/v2 の強化で解くべきではありません。完了済み #1856 は通常レビューの authority を「current-head CI + exact head/literal command に束縛された独立 Issue VC」へ移し、TEST_VERDICT producer/publisher/materializer を advisory に降格し、Phase 3 では物理削除する方針を明記しています。#1860 も「artifact freshness/digest/自己申告を authority にしない」「live Issue/PR・実test・current-head CI・独立review」を minimal harness の正本としています。

    つまり、現在の #2479 は 廃止予定の compatibility/evidence lane を再び強化し、それを downstream の blocker にしている点で、現行アーキテクチャと逆向きです。

    優先度 | Finding | 評価・推奨 -- | -- | -- P0 | #2472 の hard predecessor にする根拠が消えている | #1856 後の Step 2 は materializer/publisher/TEST_VERDICT comment に依存せず、test-runner の実行結果を current head + literal command SHA に独立照合します。#2467 も PR #2483 で merge 済みです。#2472 を #2479 待ちにするべきではありません。 P0 | #2479 が要求する「全 literal VC」を現行 materializer が表現できない | #2479 自身が AC6 に5コマンドを持つ一方、materializer は command_hash_map.get(ac) で ACごとに1 hash、同一 AC の複数 per_ac は duplicate として拒否します。generic な「全 VC coverage」は現構造では成立しません。 P0 | その構造修正を Issue 自身の Stop Condition が禁止している | 解決には {AC -> hash} から ordered command manifest 等への binding 型変更が必要ですが、#2479 は TEST_VERDICT_MACHINE/v2 のキー集合・hash form・binding 型変更を Stop Condition にしています。実装開始後に deterministic stop します。 P0 | Issue の literal VC が test-runner 自身の command policy と衝突する | AC5 は uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py ... を要求しますが、現行 test-runner は narrow な uv run [--locked] pytest のみ許し、arbitrary uv run を明示禁止しています。逐語実行を正本にするなら、自分自身の VC を拒否します。 P1 | 「新しい v2 fields を追加する」と「v2 key set を変更しない」が自己矛盾 | Scope/AC2/AC4 は generated_at と source-integrity boolean fields を genuine v2 に要求しますが、Stop Conditions は既存キー集合変更を禁止しています。特に現行 source_integrity は adjudicator が独立入力から導出する側に存在し、test-runner の自己申告 field を authority にする必要はありません。 P1 | AC1 の Verification Command が false-green | AC1 は live Issue readback・逐語実行・command/body hash を要求するのに、VC は rg -n generated_at .claude/agents/test-runner.md だけです。コメント1行でも PASS できます。 P1 | source-integrity を test-runner boolean にすると自己証明になる | 現行 materializer は既に workflow run/job/check/artifact を GitHub から独立 readbackし、archive digest まで再検証しています。boolean は test-runner が主張するのでなく、この独立 readback の結果から materializer/adjudicator が導出すべきです。 P2 | body SHA の canonicalization が曖昧 | 現行 Step 4 文書には gh issue view --json body --jq .body \| sha256sum という具体的 convention があります。#2479 の「canonical JSON/UTF-8/SHA-256」が別解釈になると、Step 4 が Allowed Paths 外なので producer/consumer が食い違います。既存 digest convention を再利用すると明記すべきです。 P2 | AC6 最終 VC の非 locked uv run pytest | uv は通常 lockfile を自動更新し得ます。read-only verifier としては --locked に統一した方が、検証による dirty worktree を避けられます。 (Astral Docs)

    外部実装と照合した推奨設計

    GitHub 側には追加の attestation infrastructure は要りません。Artifact REST response は既に digest: sha256:... と workflow_run.head_sha を持ち、Check Run は head_sha・status・conclusion を返します。特定 head の workflow run も head_sha で絞れます。既存 materializer が exact run/job/check/artifact を live readbackする設計で十分です。 (GitHub Docs)

    Claude Code 側では dontAsk は prompt が必要な tool call を auto-deny します。したがって permission machinery を大量に追加するのではなく、candidate head の実 test-runner で必要なコマンドを1回だけ bounded smoke するのが実用的です。実際、PR #2483 の過去 adversarial reviewでも同じ問題が P1 として発見され、その後 bounded runtime smoke を含めて収束しています。 (Claude)

    推奨アクション

    私なら #2479 を現状の contract のまま実装しません。まず #2472 への hard dependency を外し、PR #2478 は current head a82ed9e4... に対して既存 canonical test-runner → adapt → VC_ADJUDICATION_RESULT_V1 → Step 4 を再実行して進めます。#2141 は not_planned close なので、「#2141 と #2467 の両方 merge 後」という #2479 の Delivery Rule も成立不能です。

    #2479 自体は、残すなら 「test-runner current-head report の実用性改善」へ縮小 reframe が適切です。live Issue を test-runner 自身が読むことは defense-in-depth として残してもよいですが、routing authority は引き続き orchestrator の independent live readback と VC_ADJUDICATION_RESULT_V1 に置きます。source_integrity の自己申告化、artifact authority の復活、新 schema/ledger/signature/publisher は追加しません。runtime verification も既存 worktree-agent-runtime-smoke を1回使えば十分です。

    逆に「materialized TEST_VERDICT を本当に certifiable な汎用成果物として残したい」なら、#2479 の scope を明示的に広げて、ordered command manifest・同一AC複数VC・generated_at/source-integrity の正式 contract change を許可する必要があります。ただしこれは #1856/#1860 の minimal-harness 方針に対して費用対効果が低く、個人趣味開発では推奨しません。

    結論として、最も有用なのは「#2479 を #2472 の blocker から外す → #2472 を current-head evidence で進める → #2479 は縮小 reframe、不要なら not_planned」です。 現状の「diagnostics-only lane を certifiable にするため downstream を止める」設計は、品質を上げるよりワークフローを重くする側に寄っています。

    ## 総合判定

    REQUEST_CHANGES。さらに、#2479 を #2472 の hard predecessor にしている関係は解除するのを推奨します。

    問題意識そのもの――「stale/self-attested な検証結果を current-head evidence と誤認しない」――は正しいです。実際、現在の PR #2478 は PR body では 80e71cda... を「current head で再検証済み」と記載したままですが、live head はすでに a82ed9e4... へ進んでいます。人間向けの自己申告を authority にしない設計は必要です。

    ただし、その問題は #2479 が提案する materialized TEST_VERDICT_MACHINE/v2 の強化で解くべきではありません。完了済み #1856 は通常レビューの authority を「current-head CI + exact head/literal command に束縛された独立 Issue VC」へ移し、TEST_VERDICT producer/publisher/materializer を advisory に降格し、Phase 3 では物理削除する方針を明記しています。#1860 も「artifact freshness/digest/自己申告を authority にしない」「live Issue/PR・実test・current-head CI・独立review」を minimal harness の正本としています。

    つまり、現在の #2479 は 廃止予定の compatibility/evidence lane を再び強化し、それを downstream の blocker にしている点で、現行アーキテクチャと逆向きです。

    優先度 Finding 評価・推奨
    P0 #2472 の hard predecessor にする根拠が消えている #1856 後の Step 2 は materializer/publisher/TEST_VERDICT comment に依存せず、test-runner の実行結果を current head + literal command SHA に独立照合します。#2467 も PR #2483 で merge 済みです。#2472 を #2479 待ちにするべきではありません。
    P0 #2479 が要求する「全 literal VC」を現行 materializer が表現できない #2479 自身が AC6 に5コマンドを持つ一方、materializer は command_hash_map.get(ac) で ACごとに1 hash、同一 AC の複数 per_ac は duplicate として拒否します。generic な「全 VC coverage」は現構造では成立しません。
    P0 その構造修正を Issue 自身の Stop Condition が禁止している 解決には {AC -> hash} から ordered command manifest 等への binding 型変更が必要ですが、#2479 は TEST_VERDICT_MACHINE/v2 のキー集合・hash form・binding 型変更を Stop Condition にしています。実装開始後に deterministic stop します。
    P0 Issue の literal VC が test-runner 自身の command policy と衝突する AC5 は uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py ... を要求しますが、現行 test-runner は narrow な uv run [--locked] pytest のみ許し、arbitrary uv run を明示禁止しています。逐語実行を正本にするなら、自分自身の VC を拒否します。
    P1 「新しい v2 fields を追加する」と「v2 key set を変更しない」が自己矛盾 Scope/AC2/AC4 は generated_at と source-integrity boolean fields を genuine v2 に要求しますが、Stop Conditions は既存キー集合変更を禁止しています。特に現行 source_integrity は adjudicator が独立入力から導出する側に存在し、test-runner の自己申告 field を authority にする必要はありません。
    P1 AC1 の Verification Command が false-green AC1 は live Issue readback・逐語実行・command/body hash を要求するのに、VC は rg -n generated_at .claude/agents/test-runner.md だけです。コメント1行でも PASS できます。
    P1 source-integrity を test-runner boolean にすると自己証明になる 現行 materializer は既に workflow run/job/check/artifact を GitHub から独立 readbackし、archive digest まで再検証しています。boolean は test-runner が主張するのでなく、この独立 readback の結果から materializer/adjudicator が導出すべきです。
    P2 body SHA の canonicalization が曖昧 現行 Step 4 文書には gh issue view --json body --jq .body | sha256sum という具体的 convention があります。#2479 の「canonical JSON/UTF-8/SHA-256」が別解釈になると、Step 4 が Allowed Paths 外なので producer/consumer が食い違います。既存 digest convention を再利用すると明記すべきです。
    P2 AC6 最終 VC の非 locked uv run pytest uv は通常 lockfile を自動更新し得ます。read-only verifier としては --locked に統一した方が、検証による dirty worktree を避けられます。 ([Astral Docs]1)

    外部実装と照合した推奨設計

    GitHub 側には追加の attestation infrastructure は要りません。Artifact REST response は既に digest: sha256:... と workflow_run.head_sha を持ち、Check Run は head_sha・status・conclusion を返します。特定 head の workflow run も head_sha で絞れます。既存 materializer が exact run/job/check/artifact を live readbackする設計で十分です。 ([GitHub Docs]2)

    Claude Code 側では dontAsk は prompt が必要な tool call を auto-deny します。したがって permission machinery を大量に追加するのではなく、candidate head の実 test-runner で必要なコマンドを1回だけ bounded smoke するのが実用的です。実際、PR #2483 の過去 adversarial reviewでも同じ問題が P1 として発見され、その後 bounded runtime smoke を含めて収束しています。 ([Claude]3)

    推奨アクション

    私なら #2479 を現状の contract のまま実装しません。まず #2472 への hard dependency を外し、PR #2478 は current head a82ed9e4... に対して既存 canonical test-runner → adapt → VC_ADJUDICATION_RESULT_V1 → Step 4 を再実行して進めます。#2141 は not_planned close なので、「#2141 と #2467 の両方 merge 後」という #2479 の Delivery Rule も成立不能です。

    #2479 自体は、残すなら 「test-runner current-head report の実用性改善」へ縮小 reframe が適切です。live Issue を test-runner 自身が読むことは defense-in-depth として残してもよいですが、routing authority は引き続き orchestrator の independent live readback と VC_ADJUDICATION_RESULT_V1 に置きます。source_integrity の自己申告化、artifact authority の復活、新 schema/ledger/signature/publisher は追加しません。runtime verification も既存 worktree-agent-runtime-smoke を1回使えば十分です。

    逆に「materialized TEST_VERDICT を本当に certifiable な汎用成果物として残したい」なら、#2479 の scope を明示的に広げて、ordered command manifest・同一AC複数VC・generated_at/source-integrity の正式 contract change を許可する必要があります。ただしこれは #1856/#1860 の minimal-harness 方針に対して費用対効果が低く、個人趣味開発では推奨しません。

    結論として、最も有用なのは「#2479 を #2472 の blocker から外す → #2472 を current-head evidence で進める → #2479 は縮小 reframe、不要なら not_planned」です。 現状の「diagnostics-only lane を certifiable にするため downstream を止める」設計は、品質を上げるよりワークフローを重くする側に寄っています。

  3. squne121 commented on Sep 3, 2026

    @squne121
    OwnerAuthor

    推奨は 「いきなり #2479 を実装しない。OWNER コメントを direct human context として issue-refinement-loop を先行し、その結果 implementation が残った場合だけ impl-review-loop に連続移行」 です。

    現行 Step 2 はすでに TEST_VERDICT comment/artifact を authority にせず、current head と literal command を独立照合する設計です。 そのため、現状では #2479 を not_planned にする可能性が最も高いと見ます。ただし Claude Code には結論をハードコードせず、live repository を再検証させたうえで「縮小 reframe が本当に有用なら実装」まで自律的に進めるのがよいです。

    また impl-review-loop 自体が、implementation / verification / PR review の各 SubAgent について final result の取得と list_agents 上の terminal completed の両方を確認してから次工程へ進むことを要求しています。

    以下を新規 Claude Code セッションへそのまま渡すのを推奨します。

    対象:

    目的は、Issue #2479 について 現行 repository authority model に整合する disposition を確定し、implementation が本当に残る場合だけ impl-review-loop で実装→検証→レビュー修正を自律反復し、merge 直前の canonical 終了状態まで到達することです。

    通常の repo-local 作業について私への逐次承認・確認は不要です。
    Issue/PR の live readback、Issue contract の deterministic update、worktree/branch 作成、Allowed Paths 内の編集、test、commit、push、Draft PR 作成・更新、SubAgent 起動、review finding 修正、CI/review 再実行は、canonical Skill / repository policy が許す範囲で自律的に実行してください。

    ただし merge / auto-merge は実行しないでください。
    impl-review-loop の canonical termination が draft_pr_ready ならそこで停止してください。

    最重要: #2479 を現 contract のまま実装開始しない

    最初に以下をロードし、canonical procedure / planner / command registry / routing を正本として従ってください。

    1. issue-refinement-loop
    2. impl-review-loop
    3. 必要になった場合だけ、それらが MUST_READ / Required Skill として指定する reference / skill

    OWNER comment

    https://github.com/squne121/loop-protocol/issues/2479#issuecomment-5525817450

    は direct human context として扱ってください。
    URL の投稿者等から origin を推測するのではなく、issue-refinement-loop の canonical human-context lane / anchor_comment_url として明示的に渡してください。

    まず live GitHub / current main を readback して、少なくとも以下を再確認してください。

    OWNER comment の findings を古い snapshot として盲信せず、現在の main と live GitHub に対して再検証してください。

    Phase A: issue-refinement-loop

    #2479 に対して issue-refinement-loop を実行してください。

    loop iteration ごとの人間承認は不要です。
    needs-fix / request_changes が返った場合は、canonical loop policy の範囲内で自動的に rewrite → review を反復してください。

    この refinement では特に次を disposition の判断材料にしてください。

    推奨 disposition の優先順位

    repository evidence が OWNER comment の分析を支持する場合、第一候補は:

    #2479 を CLOSE / NOT_PLANNED とする。

    理由は、廃止・diagnostics-only 方向の TEST_VERDICT compatibility lane を強化すること自体が現在の minimal harness に対して費用対効果が低く、#2472 も既に進行済み/完了済みなら blocker としての目的も消失しているためです。

    canonical refinement の結果、残存する明確な実用上の defect が確認できた場合のみ、第二候補として #2479 を次の方向へ narrow reframe してください。

    test-runner current-head report の実用性・観測性改善

    その場合も以下は禁止します。

    可能なら current orchestrator の independent live readback と VC_ADJUDICATION_RESULT_V1 をそのまま SSOT にしてください。

    runtime verification が必要なら、既存 harness を使う bounded smoke 1回程度を優先し、新しい harness/control-plane を追加しないでください。

    reframe する場合は、Issue body の Machine-Readable Contract / Outcome / In Scope / Out of Scope / AC / Verification Commands / Allowed Paths / Stop Conditions / Delivery Rule を互いに矛盾しない implementation-ready contract へ更新してください。

    Phase B: implementation が残った場合のみ impl-review-loop

    Phase A の canonical result が not_planned / terminal close disposition なら:

    • canonical mutation route で Issue を closed / not_planned にする
    • implementation branch / PR は作らない
    • impl-review-loop は起動しない
    • 最終報告して終了する

    これを失敗扱いにしないでください。
    「不要な実装を作らない」が正常終了です。

    一方、refinement 後も genuine implementation delta が残り、fresh contract review が implementation-ready と判定した場合だけ、同じ root session から impl-review-loop に進んでください。

    impl-review-loop 起動時には OWNER comment URL を human_context_comment_urls として明示的に渡してください。

    Step 1 起動前には impl-review-loop の Root-Owned Synchronous Entry Transition を厳守してください。

    すなわち root/main thread 自身が同一 continuous invocation の中で:

    capability preflight
    → live Issue fetch
    → current-run issue-contract-review
    → live Issue 再取得
    → routing
    → GO の場合だけ Step 1 dispatch

    までを連続して行ってください。

    古い contract snapshot、過去 comment、過去 review、artifact、digest 等だけで Step 1 を authorize しないでください。

    impl-review-loop の自律実行

    implementation が開始された場合、canonical impl-review-loop に従って:

    Step 1 Implementation
    → Step 2 Verification
    → Step 4 PR Review
    → Step 5 routing

    を反復してください。

    通常の loop iteration について私への承認要求は不要です。

    REQUEST_CHANGES が返ったら blocker を fix_delta として implementation-worker に戻し、

    実装修正
    → current-head Verification
    → current-head PR review

    を自動的に繰り返してください。

    stale head / BEHIND / CI failure 等も canonical routing / recovery が存在する限り人間へ戻さず処理してください。

    SubAgent の必須条件

    Implementation / Verification / PR Review は root が代行せず、canonical SubAgent を実際に使用してください。

    少なくとも:

    • implementation-worker
    • test-runner
    • pr-reviewer

    を該当 Step で起動してください。

    各 SubAgent について 起動しただけで次工程へ進んではいけません。

    Common Completion Protocol を厳守し、各 dispatch ごとに:

    1. canonical task name を保存する
    2. 必要なら wait_agent で mailbox activity を待つ
    3. SubAgent の final result を実際に取得・消費する
    4. list_agents で同じ canonical task が terminal completed であることを確認する
    5. final result と terminal completed の両方が揃ってから次 Step / routing に進む

    こと。

    wait_agent timeout、途中 update、steer acknowledgement は completion とみなさないでください。

    errored / interrupted / shutdown / lifecycle not_found は成功に変換しないでください。

    write-capable SubAgent から別の write-capable SubAgent への nested delegation は行わず、root が routing を所有してください。
    bounded read-only delegation が canonical procedure 上必要なら利用して構いません。

    Verification / Review authority

    Step 2 / Step 4 では current repository contract をそのまま正本にしてください。

    特に:

    • TEST_VERDICT comment/artifact/materializer は diagnostics-only
    • test-runner report は read-only
    • orchestrator が live PR current head を独立取得
    • orchestrator が live Issue body / literal Verification Commands を独立取得
    • head/body/command binding が stale なら再 Verification
    • VC_ADJUDICATION_RESULT_V1.blocking == false を確認する前に pr-reviewer を起動しない
    • Step 4 起動直前にも current-head gate を fresh に再照合
    • PR head が review 後に変わったら stale review として fresh review
    • required CI は current head に対して判定

    としてください。

    許可する作業

    canonical Skill と最終 refined Issue contract が許可する範囲で、以下は追加確認なしで実行して構いません。

    • repository / Issue / PR / comment / CI の readback
    • worktree / branch 作成
    • Allowed Paths 内の編集
    • test / lint / typecheck / build / runtime smoke
    • implementation commits
    • branch push
    • Draft PR 作成・更新
    • PR body 更新
    • review comment / loop verdict の canonical 投稿
    • reviewer blocker の修正
    • branch update
    • CI failure の調査と Allowed Paths 内修正
    • stale-head の再検証・再レビュー

    「実行してよいですか?」という routine confirmation は不要です。

    ただし repository の明示的 Stop Condition、actual Git conflict、credential/auth failure、canonical human escalation など、skill 上 genuinely 自動解決不能な hard stop は捏造して回避しないでください。

    permission / harness を増築して workflow を通すことも禁止します。
    既存 canonical recovery があるならそちらを使ってください。

    終了条件

    implementation path に入った場合は、以下を満たすまで自律 loop を継続してください。

    • Issue contract の AC / Verification Commands が current head で成立
    • current-head VC adjudication が nonblocking
    • required CI が current head で pass
    • pr-reviewer が current head に対して APPROVE
    • blockers が空
    • live mergeability が canonical approved route の条件を満たす
    • Allowed Paths violation がない
    • stale review/evidence が残っていない

    到達したら canonical IMPL_REVIEW_LOOP_RESULT_V1 / draft_pr_ready 相当で停止してください。

    PR を merge しない。
    auto-merge を enable しない。

    最終出力では以下だけを簡潔に報告してください。

    このプロンプトなら、不要な #2479 を無理に実装する方向へバイアスせず、それでも genuine な残存実装が見つかった場合はそのまま impl-review-loop へ入り、SubAgent の完了を厳密に待ちながら merge-ready まで進める構成になります。

  4. squne121 commented on Sep 3, 2026

    @squne121
    OwnerAuthor

    Live repository re-verification(issue-refinement-loop, 2026-09-03)

    OWNER コメント(#2479 (comment))の分析を、current main / live GitHub に対して独立に再検証しました。すべての claim が現行状態と一致しています。

    結論として、#2479 は既に役目を終えた compatibility/evidence lane を再強化しようとしており、その強化自体が自己矛盾した構造変更を要求している。#1856/#1860 の minimal-harness 方針に対して費用対効果が低く、実装を進める理由がない。

    Decision: CLOSE / NOT_PLANNED

  5. squne121 commented on Sep 3, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop の trusted-anchor close/not_planned 判定(OWNER, comment https://github.com/squne121/loop-protocol/issues/2479#issuecomment-5526033747)に基づき close します。#2472 は既に CLOSED/COMPLETED・PR #2478 MERGED のため hard predecessor としての目的は消滅済み。#2141/#2467 の merge を前提とする Delivery Rule も #2141 が NOT_PLANNED である以上成立不能です。本 Issue が要求する TEST_VERDICT_MACHINE/v2 の強化は #1856/#1860 の minimal-harness/evidence-authority-cutover 方針と逆行し、かつ Issue 自身の Stop Conditions(キー集合・hash form・binding 型定義変更禁止)と自己矛盾します。実装は行いません。

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions