Skip to content

実装: test-runner に #3006 AC6/AC7 の限定 runtime VC 実行を許可する #3047

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "Issue #3006 の AC6/AC7 に限り独立 test-runner が逐語 runtime VC を安全に実行・事実報告できる"
change_kind: workflow
dedupe_key: "follow-up:3006:test-runner:bounded-runtime-vc-authorization:v1"

Parent Issue

なし(#3006 / PR #3025 を起票元とする独立 shared-platform 修正。#3006 の child ではない)

Parent Goal Ref

Background

#3006 の live Issue body は AC6/AC7 にそれぞれ # preflight-scope: runtime_only の uv run --locked python3 scripts/agent-ops/run_worktree_agent_runtime_smoke.py ... を逐語指定する。一方、現在の test-runner 定義は任意の uv run python3 を禁止する。Step 2 は独立 test-runner による実行と TEST_VERDICT_MACHINE/v2 の truthful な per-command 報告を要求するため、root の代行実行・手組み PASS では解消しない。#2892(CLOSED)は一般 Python 禁止を維持し、本ケースを所有しない。#2824(OPEN)は repository PreToolUse の事前互換性であって test-runner の認可ではなく、#2839(CLOSED)は別件の approval carrier である。

決定論的修正として agent 定義に Issue 番号 + AC + live Issue 由来の literal argv/command SHA256 + clean committed PR #3025 head に束縛した2コマンド限定の実行例外を設け、既存の focused test に正例・敵対的負例を加える。#3047 merge 前の AC4 native 検証は #3047 自身の clean committed worktree で新定義の実ロードと許可・拒否挙動を確かめ、#3025 上での positive smoke を要求しない。運用上の root 代行、prompt 追記だけの許可、fake PASS は独立性・再現性を欠くため採用しない。コマンド一般許可や新しい executor / approval carrier は設けない。

重複・並行変更: #2915 は smoke VC の output-dir と入力パスの衝突検出、#3033 は root の report 再構成防止、#2942 は同一2ファイルの YAML quoting 修正、#2917 は agent body と permission surface の profile 分離を所有する。いずれもこの限定 command 認可は所有しない。Scope Collision (C1) preflight は #2942、#2908、#2905 等に .claude/agents/test-runner.md、既存 focused test の literal path 重複を検出したが、#2905/#2908 は CI mergeable=BLOCKED 誤判定、#2942 は YAML quoting であり、編集意図は別。#2942 等と同じファイルを並列実装せず、先に merge された HEAD に rebase してから着手する。#3006 の hook false-positive は別 Issue(#2824 の preflight とは別の実 hook 修正先)であり、この例外で bypass しない。

Current Validated Scope

  • .claude/agents/test-runner.md の bounded runtime-only command 認可記述と、既存 .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py の focused tests のみ。

Remaining Parent Gaps

Outcome

.claude/agents/test-runner.md と既存 focused pytest の更新により、独立 test-runner は clean committed PR #3025 worktree で live #3006 本文から canonical extract-vc-metadata が導いた AC6/AC7 の2つの exact command/sha256 のみを実行許可し、実 exit・証跡・semantic outcome を偽らず TEST_VERDICT_MACHINE/v2 に報告し、その他を拒否する。#3047 の unit negative cases と #3047 自身の clean committed worktree における native delegation evidence は認可境界を検証するが、#3006 AC6/AC7 の positive 実行・semantic outcome の証拠ではない。positive 実行は #3047 merge 後、#3025 を新定義を含む HEAD に rebase した #3006 Step 2 に委ねる。

Runtime Verification Applicability

In Scope

Out of Scope

Acceptance Criteria

Verification Commands

# AC1
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py::test_issue3006_bounded_live_binding -q

# AC2
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py::test_issue3006_bounded_rejection_matrix -q

# AC3
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py::test_issue3006_truthful_runtime_verdict -q

# AC4
# preflight-scope: runtime_only
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py::test_issue3006_native_authorization_runtime -q -m claude_live

AC1–AC3 は既存ファイルへの新規 node 追加のため baseline で未収集でも PASS としない。AC4 node には claude_live marker を付ける。repo の既定 -m not claude_live で CI はこの native test のみ deselect し、認可済み native 環境で実 test-runner が上記の逐語 -m claude_live VC を起動する。既存 focused pytest file の target 内から認証済み native CLI を起動する bootstrap 方式で、test-runner に一般 uv run python3 許可を先行要求しない。pytest 自身の skip exit 0 は runtime success でないため CLI 不在等の環境不備ではテストが SKIP: / exit 77 を明示し、native causal evidence を出せない限り AC4 を PASS にしない。runner/hook 実装の変更はこのテストから行わない。#3006 の実 VC を #3025 の新定義を含む clean committed checkout 以外で実行しない。固定 output-dir/evidence path が既存なら停止し、別 path に差し替えた command/hash による代行をしない。

Allowed Paths

  • .claude/agents/test-runner.md
  • .claude/skills/impl-review-loop/tests/test_test_runner_report_contract.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • runtime VC が exit 77 / native causal evidence 不足 / fallback / 不明な classifier を返した場合、または一般 Python・GitHub mutation・settings override が必要となった場合

Required Skills

なし

Required Design References

  • docs/dev/runtime-verification-policy.md
  • docs/dev/extension-surface-runtime-policy.yaml
  • docs/dev/agent-skill-boundaries.md

Scope Delta(任意)

N/A(#3006 の既存 PR にスコープを足さない独立の policy 修正)

Delivery Rule

1 Issue = 1 PR。専用 worktree の clean committed HEAD で検証し Draft PR を既定とする。#2942 と同一ファイルを並列実装せず、先行 merge の HEAD に rebase。policy PR が merge され #3025 checkout に反映された後の AC6/AC7 実行は #3006 側の別工程であり、本 Issue の CI/unit PASS から #3006 AC6/AC7 の semantic PASS を推測しない。

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    on Oct 12, 2026
  2. squne121 commented on Oct 12, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  3. squne121 commented on Oct 12, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  4. squne121 commented on Oct 12, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

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