Repository navigation
feat: add edit-issue tests directory coverage to python-test-plan (#1303) - #1307
Conversation
) Replace the two individual edit-issue/tests file targets with the directory target so newly added tests in that directory (e.g. test_edit_issue_txn.py from PR #1301 / Issue #1287) are covered by the python-test lane and the ci_test_selection/v1 artifact without requiring a plan edit per new file. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URLPreview removed (PR #1307 closed). |
squne121
left a comment
There was a problem hiding this comment.
判定
APPROVE。 Issue #1303 の Allowed Paths(.github/ci/python-test-plan.json のみ)を厳守した最小の CI plan 修正であり、5 件の Acceptance Criteria をすべて満たしている。
Evidence Check
- AC coverage: Issue #1303 の全 5 AC に対応する Verification Commands を worktree 内で実行し、全件 PASS(AC1: 53 passed / AC2: rg match found / AC3: 15 passed / AC4: 5 passed / AC5: 342 passed)。
- Allowed Paths:
gh pr diff --name-onlyは.github/ci/python-test-plan.jsonのみを返し、Issue #1303 の Allowed Paths と完全一致している。 - CI Verification: 現在 head
b05c15bfed4d87d0bd02cd8a32a75a3569ae8f7bでpython-test/node-backed-hook-testsを含む required checks は全て SUCCESS、mergeStateStatus: CLEAN。 - Contract Snapshot: Issue #1303 の contract snapshot は
status: ok/source: materialized_go(https://github.com/squne121/loop-protocol/issues/1303#issuecomment-4877970193)で、body_sha256 は実装対象本文と一致している。
Blockers
なし。
Non-blockers
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "b05c15bfed4d87d0bd02cd8a32a75a3569ae8f7b"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "DRAFT"
blockers: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
結論BLOCKERなし。APPROVE相当。ただし、PR #1307 は Draft のままなので、merge-ready ではなく「人間が Ready 化して merge → PR #1301 を update/rebase → CI 再実行」が正しい順序です。 PR #1307 の実変更は 敵対的レビュー結果1. PR #1301 unblock の機構は妥当PR #1301 は 外部仕様上も、pytest はコマンドライン引数としてディレクトリ・ファイル・node id の組み合わせを受け取り、ディレクトリ内の 2. python-test と ci_test_selection の drift は増えていないこのリポジトリでは、 CI workflow 側も、parallel pytest 実行前に loader を独立コマンドで実行し、空 argv や loader failure を即 fail にしています。これは今回の directory target 化によって壊れていません。 3. node-backed-hook-tests 側の uncovered 判定にも効く重要なのは、PR #1301 の blocker が generator 側では、changed test が現在 job の collected files に存在しない場合でも、plan target の path prefix に含まれていれば 4. fail-closed policy は緩和されていない
また、 残るリスク・改善要求Non-blocker 1: regression が恒久テストに落ちていないPR本文では ただし Issue #1303 の Allowed Paths は 追加するなら以下の2テストです。 def test_real_plan_includes_edit_issue_tests_directory_once():
plan = mod.load_plan(_PLAN_PATH)
assert plan["targets"].count(".claude/skills/edit-issue/tests/") == 1
assert mod.scope_argv(plan).count(".claude/skills/edit-issue/tests/") == 1
def test_real_plan_does_not_duplicate_edit_issue_individual_targets():
plan = mod.load_plan(_PLAN_PATH)
assert ".claude/skills/edit-issue/tests/test_guard_issue_body.py" not in plan["targets"]
assert ".claude/skills/edit-issue/tests/test_issue_contract_hygiene_autofix.py" not in plan["targets"]Non-blocker 2: directory target は将来の blast radius を広げる今回の修正は「今後 edit-issue/tests に追加されるテストを自動で python-test lane に入れる」ため、目的には合っています。一方で、将来このディレクトリに非 hermetic、Node 依存、実 GitHub API 依存、時間依存のテストを置くと、python-test lane に自動混入します。 pytest-xdist の 対策は、 Non-blocker 3: PR #1301 はまだ unblock 済みではないPR #1307 の head では 順序は固定すべきです。
Non-blocker 4: Preview URL コメントはCI専用PRではノイズPR #1307 に Pages preview コメントが付いていますが、今回の変更は CI plan JSON のみで、runtime / hosted asset の検証対象ではありません。コメント自体も asset-level live check 未検証と明記しています。 blocker ではありませんが、CI-only / docs-only / agent-only PR では preview publish comment を抑止するか、 関連PR/Issueとの整合PR #1307 は、#1287 / PR #1301 の実装内容には触れていません。これは Issue #1303 の Out of Scope と一致しています。 また、#1287 の前提だった controlled metadata executor は PR #1295 で merge 済み、raw issue metadata mutation の local main guard 側の一本化も PR #1298 で merge 済みです。したがって、#1307 の役割は「実装PRの中身を評価する」ことではなく、「その実装PRで追加された test file が CI selection に漏れないよう plan SSOT を更新する」ことに限定されます。 推奨判定verdict: APPROVE
merge_ready: false
reason: "Draft PR のため。技術的 blocker はなし"
blockers: []
non_blockers:
- "edit-issue directory coverage の恒久回帰テストを後続Issue化"
- "将来の非hermetic test混入を防ぐため edit-issue/tests のlane policyを明文化"
- "PR #1307 merge後に PR #1301 を update/rebase して ci_test_selection artifact を再確認"
- "CI-only PR では Pages preview comment を抑止または N/A 化"
required_next_action:
- "PR #1307 を Ready 化して merge"
- "PR #1301 を update branch / rebase"
- "PR #1301 の python-test と node-backed-hook-tests を再実行"ローカルでの pytest 再実行はしていません。確認したのは GitHub 上のPR/Issue/差分/コメント/レビュー/関連PR/Workflow conclusion と、pytest・pytest-xdist の公式仕様です。 |
Summary
.github/ci/python-test-plan.jsonのtargetsに.claude/skills/edit-issue/tests/ディレクトリを追加し、既存の個別 target 2 件(test_guard_issue_body.py/test_issue_contract_hygiene_autofix.py)を置換test_edit_issue_txn.pyがci_test_selection/v1で uncovered changed test にならないようにする、PR feat: add edit-issue transaction helper (#1287) #1301 の先行 unblock 用 PR背景
PR #1301 は required CI の
python-test/node-backed-hook-testsがci_test_selection/v1artifact generation でChanged tests: 1,Uncovered tests: 1(.claude/skills/edit-issue/tests/test_edit_issue_txn.py)を検出し fail していた。python-test-plan の target をディレクトリ単位に寄せることで、同ディレクトリ配下の新規テストが自動的に coverage に入るようにする。Allowed Paths 遵守
.github/ci/python-test-plan.jsonのみ(Issue 実装: python-test-plan に edit-issue tests directory coverage を追加する #1303 の Allowed Paths と一致している)検証コマンド結果
Issue #1303 の Verification Commands を worktree 内で実行し、全 5 件とも成功したことを確認した。
uv run --locked pytest scripts/ci/tests -k python_test_planを実行し、53 件成功、91 件は対象外として除外された。rg -n '"\.claude/skills/edit-issue/tests/",' .github/ci/python-test-plan.jsonを実行し、10 行目で一致を確認した。uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests -k ci_test_selectionを実行し、15 件成功した。uv run --locked pytest .claude/skills/pr-review-judge/tests/test_generate_ci_test_selection_artifact.pyを実行し、5 件成功した。uv run --locked pytest .claude/skills/pr-review-judge/scripts/tests .claude/skills/pr-review-judge/testsを実行し、342 件すべて成功した。補足として、Issue 本文に記載された追加確認コマンドも実行し、以下を確認した。
python3 scripts/ci/python_test_plan.py --emit run-argv --mode parallel --format linesの出力に.claude/skills/edit-issue/tests/が含まれていることを確認した。python3 scripts/ci/python_test_plan.py --emit scope-argv --check-paths --format jsonを実行し、全パスの存在確認が成功した。受け入れ条件の達成状況
.claude/skills/edit-issue/tests/を追加した。Notes