change_impact affirmatively reports "no test-role dependents" for all 1,750 symbols of the one crate whose 70 test files structurally cannot produce an edge #286
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#286
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What the tool says
Seeding
change_impactwithplan_queriesandbatch_entry— the batchingplanner shipped in v0.30.0, which has six dedicated tests — returns:
test_role_filesis described as "the file-level test run-set, which is thepoint of the tool". Here it is empty, and
no_test_role_dependentsnames bothseeds affirmatively. The honest reading a caller takes from that is "nothing to
run". The correct answer is
crates/mcp-server/tests/batch_queries_e2e.rs,six tests written specifically for those two functions.
The mechanism is structural, not a resolver gap
crates/mcp-serveris the workspace's only bin-only crate:There is no
src/lib.rs. A Rust integration test intests/cannot link abin-only crate, so it cannot reference its items. Measured:
crates/mcp-server/testscode_index_mcp::crates/mcp-server/srcEvery one of those 1,750 symbols —
argcheck(82),eligibility(40),errors(38),gitdiff(68),main(55),provenance(37),server(1,368),
stdio(46),tokens(16) — is a seed for whichchange_impactreturns an empty test set, for a reason that has nothing to do with whether
the symbol is tested.
crates/mcp-server/src/server.rsalone holds theimplementation of all 23 tools.
Positive control, so this is not a claim about a broken traversal:
seeding
plan_agent_rules(crates/cli/src/rules.rs, a lib crate) returnstest_count: 3,test_role_files: ["crates/cli/src/rules.rs"], andomits
no_test_role_dependentsentirely. The mechanism works; it is theedge that does not exist.
The wider class
Bin-only is where it is provably total, but the general case is any test that
drives the code under test across a process boundary — which is this
product's dominant e2e style.
batch_queries_e2e.rsimports exactlyserde_json::{json, Value}andmcp::{Mcp, build_bin, call_tool, initialize, pre_index, tool_body}: a harness that spawns the binary and speaks stdio.121 of the workspace's 337 integration-test files mention a process-spawn
construct. Those edges are invisible by construction, in lib crates too.
Why the existing disclosure does not cover it
The payload does carry
graph_semantics: "... static proxies, not runtime coverage", and the tool description says these fields are "STATIC DEPENDENCYPROXIES, not runnable-test or runtime-coverage claims". That warns a reader
that the set may be incomplete. It does not let them tell the two states
apart:
test_role_files: []because the symbol genuinely has no tests, andtest_role_files: []because no test in this crate can have an edge.Those are the same payload today, and they warrant opposite actions.
no_test_role_dependentsis the sharper half of the problem: unlike an emptylist, it is an affirmative, per-seed assertion, and it is emitted exactly
when the count is zero — i.e. precisely in the case that is unreliable.
Shape of a fix (structural, not per-case)
Report the denominator alongside the set, so an empty set describes
itself.
test_role_files: []beside "the seed's package contains 70test-role files, 0 of which the closure reached" is self-explaining;
[] of 0and[] of 70are the two states above, distinguished by onecount that the index already holds.
That rests on a structural fact (test-role files under the seed's package
root, a population the indexer already labels) rather than on detecting
spawn harnesses, and it stays language-neutral — no Cargo-target special
case, and it degrades correctly for a repo with no test-role files at all.
Found by dogfooding v0.30.0 (
1a9079d) — the tool was asked which tests torun for code this session had just shipped, and answered "none".