Heuristic test selection with known false positives and misses #219

Open
opened 2026-11-21 12:36:56 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-lens/src/testrun.rs:select (scoped selection)
What is hacky: Heuristic (v1): Rust/Go run whole crates/packages; dynamic imports, fixtures/conftest changes and runtime-loaded files are missed; non-code files select nothing.
Proper fix: Use per-test granularity (coverage maps or test-impact analysis) and treat conftest/fixtures/data files as dependencies.
Original comment: "Scoped selection for changed files. Heuristic (v1): ... Known false positives: Rust/Go run whole crates/packages, not just affected tests. Known misses: dynamic imports, fixtures/conftest changes, tests that load files at runtime (non-code files never select tests)."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-lens/src/testrun.rs:select (scoped selection) What is hacky: Heuristic (v1): Rust/Go run whole crates/packages; dynamic imports, fixtures/conftest changes and runtime-loaded files are missed; non-code files select nothing. Proper fix: Use per-test granularity (coverage maps or test-impact analysis) and treat conftest/fixtures/data files as dependencies. Original comment: "Scoped selection for changed files. Heuristic (v1): ... Known false positives: Rust/Go run whole crates/packages, not just affected tests. Known misses: dynamic imports, fixtures/conftest changes, tests that load files at runtime (non-code files never select tests)." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the lens label 2026-11-21 12:36:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#219