fix: skip Obsidian vault metadata directories - #2572
Conversation
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Graphify review — findings
This PR adds three Obsidian-related directory names (.obsidian, .trash, .smart-env) to the _SKIP_DIRS set in graphify/detect.py, so directory traversal will exclude those paths. It also adds a new test verifying that files inside these directories are skipped while a top-level file is still detected. The large list of changed test symbols appears to reflect line-shift/reindexing from inserting the new test rather than substantive edits to those individual tests.
Worth a look
- detect() now silently omits user files under any .trash directory —
graphify/detect.py:810· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1335 functions depend on the 439 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
detect()— 83 callers, 13 callees
Verification — 1335 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 708 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 1 more finding(s) on lines outside this diff (see the check run).
dd22f35 to
44b6702
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
This PR adds .obsidian and .smart-env to the _SKIP_DIRS set in graphify/detect.py, so Obsidian vault metadata and plugin cache directories are pruned during detection. It also adds a new test asserting these directories are skipped while an unlisted .trash directory and regular files are still included. The change targets directory-skipping behavior only.
No blocking issues surfaced. 1 lower-confidence candidate did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1335 functions depend on the 439 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
detect()— 83 callers, 13 callees
Verification — 1335 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 708 function(s) in the blast radius were not formally verified this run
· 1 more finding(s) on lines outside this diff (see the check run).
Summary
This fixes vault scans where Obsidian workspace state was treated as source code.
.obsidianand.smart-envto the existing unconditional generated/noise-directory set..trashdirectories discoverable: the test asserts that both.trash/state.jsonand rootproject.jsonremain code inputs.Why this belongs in
_SKIP_DIRS.obsidianand.smart-envcontain Obsidian application metadata and plugin-generated cache data, not user-authored corpus files. A scan previously classified files such as.obsidian/graph.jsonand.obsidian/workspace.jsonas code, producing misleading graph input..trashis intentionally not excluded because it is a generic directory name and may contain real user files outside an Obsidian vault.Reproduction
Create a vault root containing
.obsidian/graph.json,.obsidian/workspace.json,.smart-env/state.json,.trash/state.json, and a realproject.json, then calldetect(root).Before: the
.obsidianJSON files appeared infiles["code"].After:
.obsidianand.smart-envare excluded, while.trash/state.jsonandproject.jsonremain infiles["code"].Scope
This deliberately changes only the directory-pruning list and detector coverage. It does not modify
.graphifyignorebehavior or user-defined exclusions.Validation
uv run --no-sync pytest tests/test_detect.py -q -k obsidianuv run --no-sync pytest tests/test_detect.py -q: 232 passed; 4 unrelated Windows baseline failuresuv run --no-sync ruff check graphify/detect.py tests/test_detect.pyuv run graphify update .Fixes #2493