| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ed build summary (#2391) The native orchestrator's file collector set .hidden(true) on its ignore::WalkBuilder, blanket-skipping both hidden directories AND hidden files. Dotfile-named source files are common and legitimate (.terraform.lock.hcl, .pa11yci.authed.cjs), so every build in a repo containing one silently dropped it, logged a misleading "likely a Rust extractor bug" warning, and paid a second WASM parse pass to backfill it — even though the real bug was file discovery, not extraction. The JS/TS collector (shouldIgnore in shared/constants.ts) only ever skips hidden directories, never files; collect_files.rs now matches that, with the existing filter_entry closure continuing to skip hidden directories. Also fixes the secondary defect from the same report: the build-completion log line's file count reflected only the files the native orchestrator itself collected, captured before any WASM backfill inserted additional file nodes, so it under-reported relative to `codegraph stats` whenever a backfill happened. Re-derives it the same way `codegraph stats` counts files (kind = 'file') whenever a post-pass wrote data, mirroring the existing node/edge re-count fix for the identical under-report shape (#1452). docs check acknowledged Impact: 1 functions changed, 4 affected
Greptile SummaryThe PR aligns native file discovery with the JS/WASM collector by retaining dotfile-named source files while continuing to exclude hidden directories. It also reconciles the native completion summary’s file count with persisted file nodes after post-pass writes.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The updated walker preserves hidden-directory exclusion while collecting supported dotfiles, and the reconciled file count remains accurate because no later native pass mutates file nodes. Important Files Changed
Reviews (1): Last reviewed commit: "fix(native): stop dropping dotfile-named..." | Re-trigger Greptile |
Sorry, something went wrong.
Codegraph Impact Analysis1 functions changed → 4 callers affected across 4 files
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #2391
Root cause
collect_files.rs's ignore::WalkBuilder set .hidden(true), which blanket-skips both hidden directories AND hidden files. Dotfile-named source files are common and legitimate:
Both were silently dropped by the native collector, which then logged "likely a Rust extractor bug" and paid a second WASM parse pass to backfill them — but the real bug was file discovery, not extraction (the extraction logic itself is correct, as proven by WASM producing identical symbols once it got the chance to see the file).
The JS/TS collector (shouldIgnore in shared/constants.ts) only ever skips hidden directories, never files. collect_files.rs now matches that asymmetry exactly — the existing filter_entry closure right below .hidden(false) already re-implements hidden-directory skipping independently, so directory-level behavior (.git, .next, arbitrary dotdirs) is unchanged.
Secondary defect (same issue report)
The build-completion log line (Native build orchestrator completed: N nodes, M edges, K files) reflected only the files the native orchestrator itself collected, captured before any WASM backfill inserted additional file nodes — so K under-reported relative to codegraph stats whenever a backfill happened for any reason. This is the same shape as #1452's node/edge under-report, fixed the same way: re-derive the count (SELECT COUNT(*) FROM nodes WHERE kind='file', matching how codegraph stats counts files) whenever a post-pass wrote data.
Verification
Not in scope
No Rust changes needed beyond collect_files.rs — the HCL/JS extractors' own logic was already correct; native and WASM already agree on symbol shape once native can see the file. No other WalkBuilder instances exist in the Rust codebase (grepped to confirm).