Repository navigation
test: hooks tests の CI 取りこぼしを防ぐ (#682) - #763
Conversation
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-763/ The preview will be removed when this PR is closed. |
結論: REQUEST_CHANGESPR #763 は方向性としては悪くありません。 ただし 現PRのままはマージ不可です。主因は、Issue #682 の契約に対して PR が設計変更を無断で混ぜていること、さらに Blocker 1: Issue #682 の契約違反Issue #682 は Current Validated Scope で「6件の未登録 hook test file を CI に追加」「ci_test_selection artifact 側にも同ファイルを追記」としています。さらに Out of Scope に 一方、PR #763 は本文で「個別列挙から directory discovery へ切り替え」と説明し、差分でも これは改善方向としては理解できますが、#682 の契約を満たす実装ではなく、#682 の設計を上書きする実装です。あなたの運用では「Issue = 作業契約」なので、ここを黙って通すと以後の reviewer / subagent / pr-review-judge が Issue 契約を信頼できなくなります。 修正要求: どちらかに寄せる。
私は後者を推奨します。ただし、その場合は #682 をそのまま Blocker 2:
|
|
レビュー指摘ぶんを反映しました。
Issue #682 の live body は directory discovery と ignore 前提の契約を維持しており、今回の PR 側もその表現に合わせて更新しました。PR はまだ draft のままで、check 完了後も merge-ready ではなくレビュー待ちとして扱います。 |
|
CodexCLI OpenAI Codex (v0.137.0) の作業ログ |
Summary
CI の hooks tests 実行を個別列挙から directory discovery へ切り替え、
python-testjob とci_test_selection/v1artifact の collection args を同一集合に揃えました。加えて、pytest --collect-onlyの結果をci_test_selection_artifacts/hook_tests_collect_only.txtに保存し、workflow 内では recursive discovery(test_*.py/*_test.py)に対する除外検証としてVerify hook test discovery exclusionsを実行します。今回の除外は
test_secret_boundary_contract.pyのみで、Issue #412 で別途追跡している pre-existing failure のため一時的に ignore しています。新しく拾われる hook tests がajv/ajv-formatsを参照できるよう、python-testjob では Node とpnpm install --frozen-lockfileも先に実行します。受け入れ条件の達成状況
.github/workflows/ci.ymlのpython-testjob にRun Claude hook testsがあり、.claude/hooks/tests/を--ignore=.claude/hooks/tests/test_secret_boundary_contract.py付きで実行するVerify hook test discovery exclusionsがあり、recursive discovery(test_*.py/*_test.py)に対して pytest collect-only から漏れる hook test を検出できるallowed_unregistered = {".claude/hooks/tests/test_secret_boundary_contract.py"}の 1 箇所に明示され、Issue 実装: Claude Code / GitHub Actions の Secret 到達面を上流で制限する secure-secret-boundary を導入する #412 の追跡理由をコメントで残しているGenerate ci_test_selection/v1 artifactの--pytest-argsに.claude/hooks/tests/を渡している--pytest-argsにも--ignore=.claude/hooks/tests/test_secret_boundary_contract.pyを渡し、AC1 と同一の collection args に揃えている検証
uv run --locked pytest --collect-only -q .claude/hooks/tests/ --ignore=.claude/hooks/tests/test_secret_boundary_contract.pymissing=0を確認Allowed Paths 遵守
.github/workflows/ci.ymlのみ変更完了対象: Closes #682
統合対象: Closes #602
親Issue参照: Refs #646