honesty: disclose symbol-blind and plugin-unavailable coverage by extension #81
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.
Blocks
Reference
h-dv/code-index#81
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?
Relates to #75, but independently filable and fixable today. Customer-driven, and it is the I063 shape again: a hardcoded enumeration standing in for a measurement.
Part 1 — the enumerated list has already drifted, and the shipped copy is the wrong one
There is no named constant. The "a
ref_countof 0 can be vacuous" claim is duplicated as prose in three places, and they disagree:getmeasurementcrates/mcp-server/src/server.rs:5287docs/ref-kindscrates/mcp-server/src/server.rs:11514-11543crates/daemon/src/local_index.rs:73-122Verified by grep. Same claims, different numbers — and the copy an agent actually pays tokens to read (the shipped resource) is the one disagreeing with the internal doc.
This is exactly what
producer_coverage_matrix.rs:295-302refuses to commit: three copies of one closed set, free to rot. And it fails the customer case concretely — a C#/WPF user checks a two-item list, matches neither, and reasonably concludes their0is tight.Part 2 — the thing that would have warned them is not measured
Verified:
.xaml,.axaml,.xsdare inEXTRA_TEXT_EXTENSIONS(crates/indexer/src/text_only.rs:30-52) →kind='text', searchable, zero symbols.*.Designer.cs— where typed-DataSet members are generated — is refused by the C# plugin itself (crates/plugins/src/csharp.rs:48).So for that codebase a large share of the real reference graph is structurally invisible, and nothing in any payload says so.
The fix, and the design constraint that makes it work
Do not report a bare percentage. This repo is 254 code / 113 text files — 31% text-kind — and that number is noise here because it's
mdandtoml. The same number is a klaxon there. What makes it readable is not aggregating away the extensions:No framework knowledge anywhere; the reader judges, we decline to hide the evidence.
Cost is nil and it comes free with correctness.
languagesis alreadySELECT lang, COUNT(*) FROM files GROUP BY lang(crates/daemon/src/local_index.rs:816) andGROUP BY kindmeasures at 2 ms. Addkindto that grouping and both lists fall out of one pass — which also guarantees they cannot contradict each other, the propertyWholeWordWindow.semanticsexists to enforce (server.rs:3876-3918).Scope
project_overview.symbol_blind_extensions— extension + count for everykind='text'file. A new field, not a change tolanguages: that isVec<(String, u64)>and widening the tuple is an arity break on shipped wire.count_basis/count_basis_semantics. This doesn't merely stop the list rotting — it deletes two copies and makes the third computable. One definition, per theineligible_codepattern (server.rs:3470-3484).safe_delete's FTS channel already covers text-kind files — all 113 here are infiles_fts, no kind filter in the query — so "is this DataSet member actually used?" already has an honest answer today and nothing points at it.Test shape
Registry gate: a fixture with code files, reference-bearing text files (
.xaml,.erb,.vue), inert text (.md), and a refused.Designer.cs. Assert each text extension is named with the right count; that anmd-only project reads as unremarkable while axaml-heavy one is visibly dominated; and — anti-vacuity — that a project with no text files omits the block rather than reporting an empty one.Mutation it must catch: aggregating the extensions into a single total. That version is useless, and a test that still passes on it is grading the wrong axis.
What to tell the customer
Their 36% is better than this repo's own Rust (24.5%) and is not the thing to worry about — unresolved LINQ/BCL extension methods are correctly unresolved because the targets aren't in the project; the figure largely measures stdlib surface. The XAML/DataSet half is the real issue, and it is more consequential than "carries no symbols" sounds, because XAML holds genuine edges (
Click=,x:Name,{Binding}) that no count in any payload currently reflects.Runtime-plugin architecture extension
With #75, kind='text' is no longer the whole symbol-blind population. Coverage must be derived against the project’s active generation and requested package state.
project_overview must distinguish, by extension/count:
Do not subtract an extension from symbol_blind merely because a package manifest claims it. Only active contributions with a successful generation count as structural coverage.
The block carries active generation identity and unavailable semantics for older daemons. Counts must come from the same project-scoped query/snapshot as the language/plugin coverage block in #80 so the disclosures cannot contradict each other.
#81 remains independently shippable now: its initial implementation can report current text/excluded extensions. The schema should be additive so #80 can refine each extension into the states above without changing the meaning of the original count.
honesty: the vacuous-zero story — three drifted copies of one list, and no measure of the symbol-blind surfaceto honesty: disclose symbol-blind and plugin-unavailable coverage by extensionDelivered — closing, with one requirement deliberately inverted
symbol_blind_extensionsships inproject_overviewand is live in the installed v0.25.0 binary. Verified today against this repo:The block also carries
states(a closed vocabulary) andstates_not_derived, which names each state no row can carry and why — so an absent state is never read as "none of those exist".The gate this issue asked for
crates/mcp-server/tests/symbol_blind_coverage_e2e.rs:every_symbol_blind_extension_is_named_separatelythe_dominant_blind_extension_distinguishes_two_projects— the md-only vs xaml-heavy contrastthe_count_basis_is_measured_on_this_indexOne requirement was inverted ON PURPOSE, and the test records why
This issue asked for the block to be omitted when there is nothing to report. The implementation reports a measured empty list instead, and says so in
an_all_code_project_reports_a_measured_empty_list:An EMPTY list is a measurement — "we looked, there is nothing symbol-blind here". ABSENT means "this build did not report", which is a different fact with a different repair. Omitting on empty would collapse the two and is the exact defect the rest of this issue exists to prevent. Closing as delivered with that deviation standing.
Why it mattered, from the field
A customer session on a large WPF/C# solution independently reported "XAML and typed DataSets are symbol-blind, and C# reference resolution is 36%, so
ref_countis a floor, not a measurement" — reaching that conclusion from this block pluscount_basis. That is this issue working as intended on a repo none of us wrote.