Skip to content

Make a fresh vault read clean in the MCP health check - #346

Merged
eugeniughelbur merged 2 commits into
eugeniughelbur:mainfrom
drakeo338:claude/344-fix
Oct 20, 2026
Merged

eugeniughelbur merged 2 commits into
eugeniughelbur:mainfrom
drakeo338:claude/344-fix

Conversation

@drakeo338

Copy link
Copy Markdown
Contributor

What this PR does

Fixes #344. On a vault fresh from bootstrap_vault.py, obsidian_vault_health reported 10 wanted notes and 2 orphans while scripts/vault_health.py reported 0. Home.md wrote the table-cell escape \| on plain lines and folder links like [[Daily/|...]] that never resolve in Obsidian; bootstrap now writes valid links. The MCP vault_ops now strips the escaping backslash from link targets, reports targets that normalise to nothing, and exempts Home.md and _CLAUDE.md from the orphan check, as the CLI does.

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 📜 New slash command
  • 📚 Documentation update
  • 🧹 Refactor / cleanup
  • ⚠️ Breaking change (fix or feature that changes existing behavior)

Related issues

Closes #344

How I tested it

New tests/test_mcp_fresh_vault_health.py: 4 failed before the change, 4 pass after.

AI-first rule compliance (required for any vault-writing command)

Not applicable, no vault-writing command changed, so these stay unticked.

  • My changes follow references/ai-first-rules.md
  • If I added or changed a command that writes to the vault, the produced note has a ## For future Claude preamble
  • Frontmatter includes ai-first: true, type:, date:, tags:
  • Wikilinks ([[...]]) used for every person, project, idea, decision referenced
  • External claims have recency markers ((as of YYYY-MM, source.com))
  • Sources preserved verbatim (URLs inline, not paraphrased)

Checklist

  • I searched existing issues and PRs before opening this one
  • My commit messages are descriptive (focus on WHY, not just WHAT)
  • I updated the README or docs if user-facing behavior changed
  • I updated CHANGELOG.md (under "Unreleased") if applicable
  • If I added a new command, I added an entry in SKILL.md and the README's command table

Screenshots / output (if visual or producing notes)

n/a

…#344)

obsidian_vault_health reported 10 wanted notes and 2 orphans on a vault
straight from bootstrap_vault.py, while scripts/vault_health.py reported 0.

- bootstrap: Home.md wrote the table-cell escape `\|` on plain lines, where
  the backslash stays in the link target and the link fails in Obsidian too.
  Plain lines now use `|`. The folder links (`[[Daily/|...]]`) never resolve
  in Obsidian, so they are plain text.
- vault_ops: drop a trailing backslash from a wikilink target, as the CLI
  does, so a correctly escaped link inside a table resolves. Report a target
  that normalises to nothing instead of skipping it, so a folder link no
  longer passes unseen. Exempt Home.md and _CLAUDE.md from the orphan check,
  as the CLI does.
@eugeniughelbur eugeniughelbur added bug Something isn't working area: python Scripts, lint gate, tooling labels Oct 20, 2026 — with Cursor
@eugeniughelbur
eugeniughelbur merged commit 490655a into eugeniughelbur:main Oct 20, 2026
2 checks passed
@eugeniughelbur

Copy link
Copy Markdown
Owner

Merged, thanks @drakeo338. I checked the 4 new tests against the main versions of vault_ops.py and bootstrap_vault.py, and all 4 fail there. #343 landed first and both added a CHANGELOG line, so I merged main into your branch and kept both entries.

@fbacchin your report named both defects and the exact lines in bootstrap_vault.py and vault_ops.py, which made this quick. Thanks.

@eugeniughelbur eugeniughelbur mentioned this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: python Scripts, lint gate, tooling bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] MCP obsidian_vault_health reports 10 wanted notes on a fresh bootstrap: Home.md links use \| outside a table, and folder links pass unseen

2 participants