Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "隔離 git fixture に production と同じ uv exact-version pin を供給し、実 subprocess dispatch の false failure を除去する"
change_kind: code
dedupe_key: "follow-up:squne121/loop-protocol:2860-ac7-uv-fixture:v1"Parent Issue
なし(単独改善)
Parent Goal Ref
- Goal: isolated repo のテスト環境不足に起因する三つの false failure を解消し、実 dispatch を検証する。
- Desired Destination: N/A(単独改善)。実装: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped temporary workspace で解消する #2860 の Goal / Desired Destination は同 Issue 本文を参照し、本 Issue の write scope へ継承しない。
Current Validated Scope
.claude/skills/issue-refinement-loop/tests/test_command_registry.py内の_crpd_make_repo()が作成する隔離 git repo とTestAuthorityTransportPrivilegedExecutorRealSubprocessDispatchの三つのテストのみ。scripts/agent-guards/skill_runtime_exec.pyの_required_uv_version()/_validate_trusted_executable_version()は読み取り参照であり編集しない。
Remaining Parent Gaps
なし(単独改善)。#2860 の scratch workspace・実機 runtime AC5/AC6 等はその Issue に残り、本 Issue は解決を主張しない。
Background
Source: #2860 (comment) (note 1)。現在の fixture は README と .gitignore は作るが pyproject.toml を作らない。executor の _required_uv_version() は pin 不在を None とし、_validate_trusted_executable_version() は fail-closed の uv_version_mismatch へ進む。root pyproject.toml の [tool.uv] required-version は ==0.11.29、報告された installed uv は 0.11.29。canary は exit 77、独立した三つの subprocess test は各 exit 1。fixture に限り同じ pin を与える positive control で mismatch → success が観測された。これは実 installed uv の不一致ではなく、fixture に SSOT が欠ける問題である。
方針比較: root の [tool.uv] を read-only SSOT として fixture に production-compatible exact pin を供給し、実 subprocess と executor の version/trust gate は維持する決定論的修正を採用する。uv_version_mismatch を握りつぶす・期待値を失敗へ変更する・テストを skip/xfail する・operator に pin を手作業で都度書かせる workaround は採用しない。fixture に無条件で installed version を埋め込むと mismatch 検出不能になるため避ける。
Outcome
更新された .claude/skills/issue-refinement-loop/tests/test_command_registry.py の隔離 fixture が production と同じ uv exact-version pin を提供し、三つの real subprocess dispatch test と pin 不在・不正・不一致の fail-closed 回帰が PASS する状態を納品する。
Runtime Verification Applicability
- decision: not_applicable
- reason: 本件は fixture-only の hermetic pytest 回帰で閉じる。production launcher の live runtime / 外部サービスを検証する AC は設けず、subprocess はユニットテスト内の隔離 git repo 上で完結する。実機 canary の exit 77 を pytest PASS と混同しない。
In Scope
_crpd_make_repo()の隔離 repo に root の[tool.uv] required-versionと整合する最小pyproject.tomlを供給する。pin を勝手に最新化せず、production pin との一致を維持する。TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatchの既存三経路(decide.run、authority_transport.produce、authority_transport.consume)を実 subprocess のまま成功/契約上の fail-closed まで検証する。- 同じテストファイル内で positive production-compatible pin と negative の missing / malformed / mismatched pin を区別し、negative は正常 dispatch と見なさず executor の version/trust 拒否を確認する。
Out of Scope
- root
pyproject.toml、lockfile、executor / policy / registry の本番ロジックの変更または trust/version gate の緩和 - 実装: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped temporary workspace で解消する #2860 の scratch 手順・runtime AC5/AC6 実装、Web routing、権限設定、既存 Issue の変更
- 実装: skill_runtime_exec の trusted uv resolver 失敗時の診断可能性とローカル dev 前提条件明示を改善する #2275 の uv_not_found diagnostics、調査: python-test-core の3ファイルがCI並列実行下で非決定的にfailするroot causeを特定する #2792 のローカル uv mismatch、実装: root review outer timeout と invocation-local budget の parity を固定する #2610 の timeout / opt-in canary、実装: operator-only VC timeout の occurrence・budget identity を root review artifact に保持する #2897 の timeout identity、実装: canonical executor の Vitest results cache write を writer attribution に基づき狭域で判定する #2887 の cache writer attribution
Acceptance Criteria
- AC1: fixture git repo が root
[tool.uv] required-versionに一致する exact pin を含むpyproject.tomlを持ち、version/trust validator の緩和・root pin 更新なしで三つの既存 real subprocess dispatch test が期待契約どおり PASS する。 - AC2: 同じ fixture の positive pin と missing / malformed / mismatched pin の negative controls を追加し、三つの negative は
uv_version_mismatch相当で fail-closed、成功へ偽装されない。実 installed uv 不一致は fixture SSOT 欠落と区別する。 - AC3: 当該テストファイル全体と repository の品質 gate が PASS し、実機 canary の SKIP (77) や無関係な test failure を本修正の成功と呼ばない。
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_command_registry.py::TestAuthorityTransportPrivilegedExecutorRealSubprocessDispatch -q
# AC2
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_command_registry.py::test_crpd_fixture_uv_pin_fail_closed_controls -q
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_command_registry.py -q
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.pyAC2 の新規 test node は追加前 baseline では存在しない(# baseline-expect: fail)。実装時はこの node 名で positive と三つの negative control を一つのパラメータ化テスト等として追加する。root uv 環境自体が exact-version mismatch の場合は fixture 改善を成功と判定せず環境問題として報告する。
Allowed Paths
.claude/skills/issue-refinement-loop/tests/test_command_registry.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- root の pin と installed uv の実不一致、または fixture-only 修正で三件が再現性をもって解消しない場合は環境・別原因を切り分けて停止する
Required Skills
なし
Required Design References
docs/dev/workflow.mddocs/dev/runtime-verification-policy.md
Scope Delta
N/A(起票時の Allowed Paths からの乖離なし)
Delivery Rule
1 Issue = 1 PR。linked worktree で作業し Draft PR を既定とする。#1555 / #1829 / #1601 の同一テストファイル編集と並行実装せず、実着手時に open PR と branch の編集範囲を再確認して衝突時は直列化する。
Notes for Reviewer
- Overlap preflight:
issue_overlap_preflight/v1decision=overlap_requires_comment, reason=allowed_paths_overlap, source_status は search/readback とも ok。実装: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped temporary workspace で解消する #2860 等のディレクトリ包含および 実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555/実装: docs/dev/schema-governance.md に REVIEW_COMPACT_INTERMEDIATE_VALIDATION_RESULT_V1 を登録し command_registry.py に phase_state.build.review を追加する #1829/実装:scope_rollup.runをskill_runtime_execのsiblingexactprofileへ統合する #1601 の literal file overlap を検出。non_conflict_reason: 実装: Auto mode の固定 /tmp scratch 上書き false-deny を run-scoped temporary workspace で解消する #2860 は scratch / canary、他は command registry / consumer wiring が目的で、本 Issue は fixture pin と focused regression のみ。edit_intent:_crpd_make_repo()と当該クラスの fixture 回帰のみ。dependency ordering: hard API predecessor はないが、同一ファイルを触る作業は PR ごとに直列化し最新 main へ追従する。既存 Issue を統合・変更しない。 - Prior CLOSED 実装: skill_runtime_exec の trusted uv resolver 失敗時の診断可能性とローカル dev 前提条件明示を改善する #2275 は uv_not_found diagnostics、調査: python-test-core の3ファイルがCI並列実行下で非決定的にfailするroot causeを特定する #2792 はローカル uv mismatch を明示的に除外し、実装: root review outer timeout と invocation-local budget の parity を固定する #2610 は timeout / opt-in canary。別 failure class。
- Dedupe key:
follow-up:squne121/loop-protocol:2860-ac7-uv-fixture:v1。
Activity