Skip to content

fix: skip Obsidian vault metadata directories - #2572

Open
rohit-jsfreaky wants to merge 1 commit into
Graphify-Labs:v8from
rohit-jsfreaky:fix/skip-obsidian-vault-metadata
Open

fix: skip Obsidian vault metadata directories#2572
rohit-jsfreaky wants to merge 1 commit into
Graphify-Labs:v8from
rohit-jsfreaky:fix/skip-obsidian-vault-metadata

Conversation

@rohit-jsfreaky

@rohit-jsfreaky rohit-jsfreaky commented Aug 9, 2026

Copy link
Copy Markdown

Summary

This fixes vault scans where Obsidian workspace state was treated as source code.

  • Add .obsidian and .smart-env to the existing unconditional generated/noise-directory set.
  • Add a regression test that verifies those two Obsidian-specific directories are skipped.
  • Keep generic .trash directories discoverable: the test asserts that both .trash/state.json and root project.json remain code inputs.

Why this belongs in _SKIP_DIRS

.obsidian and .smart-env contain Obsidian application metadata and plugin-generated cache data, not user-authored corpus files. A scan previously classified files such as .obsidian/graph.json and .obsidian/workspace.json as code, producing misleading graph input.

.trash is 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 real project.json, then call detect(root).

Before: the .obsidian JSON files appeared in files["code"].

After: .obsidian and .smart-env are excluded, while .trash/state.json and project.json remain in files["code"].

Scope

This deliberately changes only the directory-pruning list and detector coverage. It does not modify .graphifyignore behavior or user-defined exclusions.

Validation

  • uv run --no-sync pytest tests/test_detect.py -q -k obsidian
  • uv run --no-sync pytest tests/test_detect.py -q: 232 passed; 4 unrelated Windows baseline failures
  • uv run --no-sync ruff check graphify/detect.py tests/test_detect.py
  • uv run graphify update .

Fixes #2493

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 directorygraphify/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).

Comment thread graphify/detect.py Outdated
@rohit-jsfreaky
rohit-jsfreaky force-pushed the fix/skip-obsidian-vault-metadata branch from dd22f35 to 44b6702 Compare August 9, 2026 13:45

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

detect: add .obsidian/ (and .trash/, .smart-env/) to _SKIP_DIRS — Obsidian vault config is ingested as source code

1 participant