feat(skills): validate Obsidian vault path on load#29616
Closed
wesleysimplicio wants to merge 1 commit into
Closed
feat(skills): validate Obsidian vault path on load#29616wesleysimplicio wants to merge 1 commit into
wesleysimplicio wants to merge 1 commit into
Conversation
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:
|
Contributor
Author
|
Closing non-fix PR as requested — mantendo apenas PRs de fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
metadata.hermes.path_validationssupport to skill metadata loading.skill_view().path_validations,missing_required_paths,setup_needed, andsetup_note.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.pypython -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
OBSIDIAN_VAULT_PATHis not validated or confirmed on load #29469.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
metadata.hermes.path_validationssupport to skill metadata loading.skill_view().path_validations,missing_required_paths,setup_needed, andsetup_note.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.pypython -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
testjob failure is outside this diff and matches baseline drift already covered by #29224.Closes #29469
Generated by Hermes Turbo