Follow-up from CodeRabbit's review of #135 (thread). The refactor preserved this behavior byte-for-byte, so the decision was deliberately kept out of that PR.
Current behavior
collect_vault_files (crates/b2-core/src/ingest.rs) applies the hidden-name rule unevenly, and documents the unevenness as deliberate:
- dot-prefixed directories are skipped everywhere (
.b2/, .git/, .obsidian/) — both the ingest walk and the folder walk;
- dot-prefixed resources are skipped from the inventory (
.DS_Store, .gitignore are not vault material);
- a dot-prefixed
.md file (.scratch.md, .templates.md) still routes to notes — "the note route keeps its historical behavior" — so it gets a b2id stamped, chunks, embeddings, and graph presence.
pathspec::is_hidden (one predicate since #135, doc sharpened in abcc394) defines what hidden means; each walk chooses where to apply it. The asymmetry is visible but has never been ruled on.
The decision
Is a dot-prefixed .md vault material? This is a data-model question (data-model.md §1's definition of a note), not a code question. Two coherent answers:
- No — hidden means hidden. Apply
is_hidden before the note/resource dispatch. Consistent with the resource route, the folder walk, and normalize_rel_dir refusing dot-segments in user input.
- Yes — keep the historical behavior and document it in data-model.md rather than only in a walk comment. An editor that writes
.name.md drafts would keep them searchable.
If the answer is (1), the migration cost is real
Existing vaults with indexed dot-.md notes would, on the next reindex, have those rows ghost-pruned (#31) and every inbound link at them re-dangled (G5 surfaces them, but the churn is user-visible). The stamped b2id: lines stay in the files — B2 doesn't unwrite them (W4) — so flipping back re-adopts the same identities. Worth a line in the release notes if shipped.
Implementation then is the review's suggestion: hoist the is_hidden check above the match in collect_vault_files, plus a regression test that a dot-prefixed Markdown file is absent from the collected note paths (and one that plan_reindex agrees, since it shares the walk).
Follow-up from CodeRabbit's review of #135 (thread). The refactor preserved this behavior byte-for-byte, so the decision was deliberately kept out of that PR.
Current behavior
collect_vault_files(crates/b2-core/src/ingest.rs) applies the hidden-name rule unevenly, and documents the unevenness as deliberate:.b2/,.git/,.obsidian/) — both the ingest walk and the folder walk;.DS_Store,.gitignoreare not vault material);.mdfile (.scratch.md,.templates.md) still routes tonotes— "the note route keeps its historical behavior" — so it gets ab2idstamped, chunks, embeddings, and graph presence.pathspec::is_hidden(one predicate since #135, doc sharpened inabcc394) defines what hidden means; each walk chooses where to apply it. The asymmetry is visible but has never been ruled on.The decision
Is a dot-prefixed
.mdvault material? This is a data-model question (data-model.md §1's definition of a note), not a code question. Two coherent answers:is_hiddenbefore the note/resource dispatch. Consistent with the resource route, the folder walk, andnormalize_rel_dirrefusing dot-segments in user input..name.mddrafts would keep them searchable.If the answer is (1), the migration cost is real
Existing vaults with indexed dot-
.mdnotes would, on the next reindex, have those rows ghost-pruned (#31) and every inbound link at them re-dangled (G5 surfaces them, but the churn is user-visible). The stampedb2id:lines stay in the files — B2 doesn't unwrite them (W4) — so flipping back re-adopts the same identities. Worth a line in the release notes if shipped.Implementation then is the review's suggestion: hoist the
is_hiddencheck above thematchincollect_vault_files, plus a regression test that a dot-prefixed Markdown file is absent from the collected note paths (and one thatplan_reindexagrees, since it shares the walk).