Skip to content

feat(skills): validate Obsidian vault path on load#29616

Closed
wesleysimplicio wants to merge 1 commit into
NousResearch:mainfrom
wesleysimplicio:codex/docs-obsidian-vault-validation
Closed

feat(skills): validate Obsidian vault path on load#29616
wesleysimplicio wants to merge 1 commit into
NousResearch:mainfrom
wesleysimplicio:codex/docs-obsidian-vault-validation

Conversation

@wesleysimplicio

@wesleysimplicio wesleysimplicio commented May 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds declarative skill path validation and uses it for the bundled Obsidian skill so Hermes can report whether the configured vault path is ready before note-taking commands run.

Root cause

The Obsidian skill documents OBSIDIAN_VAULT_PATH, but loading the skill did not validate the concrete path that note operations would use. A missing or unreadable vault could remain hidden until a later tool call failed.

Fix

  • Adds metadata.hermes.path_validations support to skill metadata loading.
  • Resolves configured environment paths and fallback directories during skill_view().
  • Surfaces readiness through path_validations, missing_required_paths, setup_needed, and setup_note.
  • Declares Obsidian vault validation in the bundled skill metadata and refreshes the matching docs.
  • Adds focused regression coverage for env paths, fallback paths, missing paths, and setup-note injection.

Why this shape

This keeps the validation generic enough for other skills while only enabling it for Obsidian in this PR. The note-taking behavior stays unchanged; the new path check only improves setup feedback before the skill is used.

Tests

  • python -m pytest tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py -q -k "path_validation or build_skill_message_includes_available_setup_note" -o addopts= -p no:xdist — 4 passed, 127 deselected.
  • python -m py_compile tools/skills_tool.py agent/skill_commands.py
  • python -m ruff check tools/skills_tool.py agent/skill_commands.py tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py — passed.

Related PRs / issues

Original body

## What does this PR do?

Adds declarative skill path validation and uses it for the bundled Obsidian skill so Hermes can report whether the configured vault path is ready before note-taking commands run.

Problem

The Obsidian skill documents OBSIDIAN_VAULT_PATH, but loading the skill did not validate the concrete path that note operations would use. A missing or unreadable vault could remain hidden until a later tool call failed.

What this changes

  • Adds metadata.hermes.path_validations support to skill metadata loading.
  • Resolves configured environment paths and fallback directories during skill_view().
  • Surfaces readiness through path_validations, missing_required_paths, setup_needed, and setup_note.
  • Declares Obsidian vault validation in the bundled skill metadata and refreshes the matching docs.
  • Adds focused regression coverage for env paths, fallback paths, missing paths, and setup-note injection.

Why this shape

This keeps the validation generic enough for other skills while only enabling it for Obsidian in this PR. The note-taking behavior stays unchanged; the new path check only improves setup feedback before the skill is used.

Tests

  • python -m pytest tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py -q -k "path_validation or build_skill_message_includes_available_setup_note" -o addopts= -p no:xdist — 4 passed, 127 deselected.
  • python -m py_compile tools/skills_tool.py agent/skill_commands.py
  • python -m ruff check tools/skills_tool.py agent/skill_commands.py tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py — passed.

CI note

The current full test job failure is outside this diff and matches baseline drift already covered by #29224.

Closes #29469


Generated by Hermes Turbo

@wesleysimplicio

Copy link
Copy Markdown
Contributor Author

The remaining CI failure is outside this PR's Obsidian skill-path diff. The failed test job matches the current baseline drift already covered by #29224: xai is present in the bundled web-search provider registry, and the update hangup protection assertion needs to tolerate hermes_cli.main reloads in the broader suite. I am not adding those fixes here to avoid duplicating #29224.

Focused validation for this PR remains:

  • python -m pytest tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py -q -k "path_validation or build_skill_message_includes_available_setup_note" -o addopts= -p no:xdist
  • python -m py_compile tools/skills_tool.py agent/skill_commands.py
  • python -m ruff check tools/skills_tool.py agent/skill_commands.py tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) labels May 21, 2026
@wesleysimplicio

Copy link
Copy Markdown
Contributor Author

Closing non-fix PR as requested — mantendo apenas PRs de fix.

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

Labels

P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Obsidian skill: Vault path from OBSIDIAN_VAULT_PATH is not validated or confirmed on load

2 participants