Repository navigation
Open
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "Issue #393 snapshot fixture の baseline VC preflight が複数の実コマンドを90秒の単一テスト予算内で実行して timeout する問題を、構造検証と hermetic な実行検証へ分離して解消する"
change_kind: code|test|workflowParent Issue
なし(単独改善。#1764 の Ruff 設定変更には混入させない)
Parent Goal Ref
- Goal:
test_issue_393_snapshot_fixture_processedが current CI の python-test pipeline で決定論的に完了し、fixture の VC 形状と scope 分類を検証できること。 - Desired Destination: baseline VC preflight の snapshot fixture 回帰テストを、全体 serial 隔離ではなく static parsing と最小 hermetic execution に分離する実装 Issue。
Current Validated Scope
.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py::test_issue_393_snapshot_fixture_processedは19個の VC(pnpm/pytestを含む)をsubprocess.run(..., timeout=90)で実行している。- このテストのアサーションは
resultsの存在、件数、scope_classの列挙値だけであり、19個の実コマンド実行を必要としない。 .github/ci/python-test-plan.jsonは同テストディレクトリを python-test の対象に含めるため、テスト単体の予算超過はCIのparallel laneでも再現し得る。
Remaining Parent Gaps
なし
Outcome
Issue #393 snapshot fixture の構造検証を static-only preflight で10秒以内に完了し、別の最小 hermetic fixture で実行経路を決定論的に検証するテスト実装と実行予算の根拠が成果物として追加され、uv run --locked pytest の current python-test pipeline で timeout せず PASS する状態。
In Scope
test_issue_393_snapshot_fixture_processedを--static-only(または同等の parser-only API)で実行し、fixture 内のVC抽出・scope_class分類・結果件数を実コマンドなしで検証する。- 実行経路を検証する別テストを、
tmp_path配下の最小fixture(test -f等の安全な単一観測コマンドのみ)と明示的な短い per-command/total test budget で追加する。 - helper の timeout/argv をテストごとに明示し、snapshot fixture に90秒固定の実行予算を適用しない。timeout 発生時は fixture 名と budget を含む診断を保持する。
- xdist parallel lane での再現性を確認し、python-test plan の lane 分割を変更せずに既存 pipeline と互換にする。
Out of Scope
baseline_vc_preflight.pyの分類契約、dedup、bounded parallel executor、既定の本番 per-command timeout の変更。.github/ci/python-test-plan.jsonや.github/workflows/ci.ymlから対象テストを全体 serial lane へ移す変更。- Issue 実装: Ruff設定をpyproject.tomlへ集約し対象path集合を維持する #1764 の Ruff 設定、CI topology、または他の timeout(実装: run_contract_review_once.py の readiness_check ステップに timeout 引数を追加し30秒固定 timeout を解消する #1631 の readiness_check 等)の変更。
- Issue 実装: issue-refinement-loop SKILL.md を thin entrypoint + references 構成へ分割する #393 fixture に含まれる全ての pnpm/pytest を回帰テスト中に実行すること。
Acceptance Criteria
- AC1:
test_issue_393_snapshot_fixture_processedは static-only/parser-only 経路を使い、pnpm、pytest、gh等の外部実コマンドを起動せずにresults非空、全結果のscope_classが許可列挙値であることを検証する。 - AC2: AC1 のテストは clean CI runner で10秒以内に完了する予算を持ち、timeout 失敗時に fixture 名と使用 budget を診断出力する。
- AC3: 最小 hermetic fixture の実行テストは
tmp_pathのみを cwd とし、許可された単一観測コマンドの exit/classification/result schema を検証する。リポジトリ本体のファイルやネットワークへ依存しない。 - AC4: helper の argv と timeout 設定に対する回帰テストが、snapshot fixture に本番相当の複数VC実行を再導入しないことを固定する。
- AC5: current python-test pipeline の parallel lane で対象テストが PASS し、python-test plan の parallel/serial union と lane 分類を変更しない。
Verification Commands
# AC1
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py::test_issue_393_snapshot_fixture_processed -q# AC2
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py::test_issue_393_snapshot_fixture_processed -q --durations=1# AC3
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k hermetic -q# AC4
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k 'issue_393 or hermetic' -q# AC5
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k 'issue_393 or hermetic' -n 2 -qAllowed Paths
.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py::test_issue_393_snapshot_fixture_processed.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py::test_hermetic*.claude/skills/issue-contract-review/scripts/tests/fixtures/issue_393_body.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- static-only/parser-only API の変更が baseline_vc_preflight.py 本体に必要と判明した場合。
- python-test plan の parallel/serial lane 分類を変更しないと AC5 を満たせない場合。
Required Skills
- Python pytest
Required Design References
docs/dev/test-lane-policy.mddocs/dev/workflow.md.github/ci/python-test-plan.json
Scope Delta(任意)
N/A
Delivery Rule
- 1 Issue = 1 PR で完結する。
- worktree:
.claude/worktrees/issue-<番号>-baseline-vc-fixture-timeout - Draft PR を既定とする。
Notes for Reviewer
- Scope Collision (C1) preflight は 実装: issue-reviewer SubAgent の最終応答から prose 要約を排除し canonical compact stdout 形式を強制する #1754 / 実装: guard-issue-body.py の AC/VC alignment を共有パーサーへ統合し VC grammar parity/LP010/authoring reference を同期する #1719 / 実装: issue-contract-review を fresh structural gate に縮小し、OPEN PR の実編集競合のときだけ停止させる #1680 / 実装: Issue MRC 追加 key の検証ロスを塞ぐ #1396 / 実装: issue-refinement-loop の rewrite routing が既存 blocker contract を consume して non-body-author-fixable blocker を早期停止できるようにする #944 / 実装: check_blockers.sh の条件付き依存記述による false positive を改善する #265 と Allowed Path の親ディレクトリまたは共通テストファイルが重なると報告したが、いずれも Issue 実装: issue-refinement-loop SKILL.md を thin entrypoint + references 構成へ分割する #393 fixture の90秒 timeout、static-only分離、hermetic execution budgetをOutcomeに含まない。
- non_conflict_reason: 上記Issueはcompact output、contract parser、広域issue-contract-reviewテスト整備であり、本Issueは単一テストの実行経路とCI予算だけを変更する。edit_intent:
test_issue_393_snapshot_fixture_processedと最小fixtureテストの限定修正。dependency ordering: 既存Issueのmergeを待つ依存はなく、同一ファイルを触る場合は先行PRのcurrent headを確認する。 - Issue 実装: issue-contract-review の VC preflight タイムアウト定数を実測実行時間に合わせて引き上げる #1333(CLOSED)は本番のper-command timeout定数、実装: run_contract_review_once.py の readiness_check ステップに timeout 引数を追加し30秒固定 timeout を解消する #1631(OPEN)はreadiness_check全体のtimeout、実装: Ruff設定をpyproject.tomlへ集約し対象path集合を維持する #1764(OPEN)はRuff設定であり、本Issueのscope外である。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity