index_coverage reports "Indexed and current" for a file whose facts were refused by the validator #136
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#136
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?
Found while building #72's refusal-stage registry, and written into the
fact_validatorrow's reason there so it cannot be forgotten. Deliberately not fixed in that change — see below.The over-promise
A fact-validator refusal (
abi::validate→Parse::Err) writes afilesrow withparse_errorset and zero symbols.index_coveragethen reports:The file has no symbols, its facts were rejected, and the tool says it is indexed and current.
Why the barrier is fine and the tool is not
This is worth separating, because the two behaviours are graded by different things and only one is wrong.
The freshness barrier is correct. A row exists, so the path is settled rather than pending — which is exactly #72's own bullet ("a file that parses to an error gets a row with
parse_errorset, so it is not this class; confirm the barrier treats it as settled rather than pending"). It does. Nothing hangs.The tool over-promises.
index_coverageexists to answer "will this file ever carry symbols, and does it now" — and here it answers "yes, and it is current" about a file whose facts were refused. An agent that trusts that reads an empty outline as the file has no symbols rather than this file's facts were rejected.That is the same shape as #101 (a truncated extraction served silently) and #124 (a refused package invisible on the MCP surface), on a third surface.
The mechanical cause
FileOverlapcarries noparse_errorfield — onlySymbolNamesdoes. So the coverage path structurally cannot see the refusal even though the row records it.Why it was not fixed in #72
It needs a new wire field on
FileOverlap(daemon side) plus both skew directions tested with non-empty payloads — a mission, not a hunk. Andcrates/daemon/src/local_index.rswas being actively edited by a concurrent lane at the time. Doing it badly would have been worse than recording it precisely.What closing it needs
parse_error(or a derived refusal discriminator) onFileOverlap.index_coveragedistinguishes indexed-with-facts from indexed-but-facts-refused, with the refusal's own reason code — the vocabulary already exists incoverage.rs."Indexed and current."— red on a payload produced by a real refusal, not a hand-built struct.Related
#72 (found there; the
fact_validatorregistry row records it), #101 and #124 (same asymmetry on other surfaces), #82 (the barrier's own history — note that this one is not a barrier defect).