検証 hook(`agents/hooks/lib/check_selection.py` の `rust_plan`)は,変更された `tests/` 以下の `.rs` のファイル名をそのままテスト名として `cargo test --test <名前>` を実行する.`tests/<dir>/<file>.rs` のようにテストの一部であるファイルでは,そのファイル名のテストは存在せず,`no test target named ...` で失敗する(furedea/agent-harness#175 で発生). | | 変更前 | 変更後 | |---|---|---| | `tests/foo.rs` を変更 | `--test foo` | `--test foo`(変わらない) | | `tests/<dir>/<file>.rs` を変更 | `--test <file>`(存在せず失敗) | `<dir>` を含むテストを実行する.Cargo.toml の `[[test]]` に `path` があればその `name`,なければ Cargo の自動検出の規則(`tests/<dir>/main.rs` → `<dir>`) | | どのテストか決められない | — | crate 全体のテストを実行する | ## 受け入れ条件 - [ ] `tests/<dir>/<file>.rs` の変更で,そのファイルを含むテストが実行される - [ ] Cargo.toml の `[[test]]` の `name` と `path` が考慮される - [ ] 決められないときは crate 全体のテストになる - [ ] テストがある
Activity