fix: classify_walked reports "too large" for ineligible extensions (order-dependent skip reason) #62
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#62
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?
Source: a1x dogfood — two fonts in one directory reported different skip reasons purely by size.
Symptom
In a font/
.otfdirectory, one file logsreason="too large"and anotherreason="ineligible extension"for the same extension. The reported reason depends on file size rather than on the size-independent fact that the extension is never indexed.Root cause
classify_walked(crates/indexer/src/index.rs) applied the size cap BEFORE the eligibility check, so a large file whose extension no plugin claims and that isn't text-eligible was attributed"too large"instead of"ineligible extension".Fix (implemented, pending commit)
Reordered: decide eligibility (plugin-claimed OR text-eligible) first, then apply the size cap only to files we would otherwise index. Large source/text files still report
"too large"; ineligible extensions always report"ineligible extension"regardless of size.Test:
index::tests::large_ineligible_extension_reports_extension_not_size.