feat: affected_tests / suggest_tests — symbol→test map and change-set test selection #23

Closed
opened 2026-07-20 22:37:54 +02:00 by buildagent · 1 comment
Member

Rank 2 of the 2026-07-20 index-data brainstorm (_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md).

What: given a symbol or change-set, return the exact test functions/files that (transitively) exercise it — ready-to-run cargo test filters — and warn when NOTHING covers the symbol being edited.

Why: directly automates this repo's own #1 recurring review requirement ("every feature needs e2e tests"). Measured: seeding with apply_resolution selects 16 of 47 rust test files — a 66% suite cut. Inverse query: 378 of 831 referenced symbols (45%) have zero test-role refs, including node_text (68 prod refs), err_json (64), ToolError::new/with_hint (39 each) — the untested-hotspot list falls out of the same GROUP BY.

How: same reverse-closure CTE as the impact tool plus a roles-split GROUP BY; span containment already maps 432 symbols to named test functions. 17,272 of 27,716 refs (62%) carry the test-role bit.

Cost: small — no new data. Pairs with the impact tool (rank 1).

Rank 2 of the 2026-07-20 index-data brainstorm (`_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md`). **What**: given a symbol or change-set, return the exact test functions/files that (transitively) exercise it — ready-to-run `cargo test` filters — and warn when NOTHING covers the symbol being edited. **Why**: directly automates this repo's own #1 recurring review requirement ("every feature needs e2e tests"). Measured: seeding with `apply_resolution` selects 16 of 47 rust test files — a 66% suite cut. Inverse query: **378 of 831 referenced symbols (45%) have zero test-role refs**, including `node_text` (68 prod refs), `err_json` (64), `ToolError::new`/`with_hint` (39 each) — the untested-hotspot list falls out of the same GROUP BY. **How**: same reverse-closure CTE as the impact tool plus a roles-split GROUP BY; span containment already maps 432 symbols to named test functions. 17,272 of 27,716 refs (62%) carry the test-role bit. **Cost**: small — no new data. Pairs with the impact tool (rank 1).
Author
Member

Consolidated into #22. Affected-test selection is the test-role projection of the same reverse-reachability traversal, and keeping separate tools would duplicate semantics, confidence reporting, traversal limits, and diff seeding.

Consolidated into #22. Affected-test selection is the test-role projection of the same reverse-reachability traversal, and keeping separate tools would duplicate semantics, confidence reporting, traversal limits, and diff seeding.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
h-dv/code-index#23
No description provided.