Dashboard console skills commands no longer act on the wrong profile (#65828) - #89387
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewrunning on 68da7bb — fix: dashboard console skills commands no longer act on the Still running 1 job:
|
Collaborator
…file (#65828) tools/skills_sync.py bound HERMES_HOME / SKILLS_DIR / MANIFEST_FILE at import time — the third module in the same lineage as skills_tool (f8723c4) and skill_manager_tool (c6a3d41). In a long-lived dashboard/TUI process, console skills commands (reset, diff, list-modified, opt-in/out, repair-official) dispatched in-process under _profile_scope's set_hermes_home_override(), but skills_sync's frozen constants kept resolving against whichever profile was live at import. Sharpest edge: reset_bundled_skill()'s #48200 rmtree strict-child guard was computed against the WRONG skills root. Fix: same call-time accessor pattern as the two prior fixes — _hermes_home()/_skills_dir()/_manifest_file() honor an explicitly patched module global (tests, retargeting) and otherwise re-resolve from the live profile-scoped get_hermes_home() on every call. All 37 call sites migrated; module constants kept for compat. Also documents in _profile_scope() that skills_sync needs no module retargeting since the contextvar override now reaches it. Regression tests (sabotage-verified: all 3 fail on the old binding): - accessors follow set_hermes_home_override at call time - explicit module patch still wins over the override - rmtree guard anchors on the overridden profile's skills root Fixes #65828
teknium1
force-pushed
the
fix/skills-sync-calltime-dir
branch
from
August 18, 2026 21:10
45dac59 to
68da7bb
Compare
teknium1
enabled auto-merge (rebase)
August 18, 2026 21:10
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.
Summary
Dashboard console skills commands (
skills reset/diff/list-modified/opt-in/opt-out/repair-official) now act on the requested profile —tools/skills_sync.pyresolved its skills root from an import-time snapshot, so a long-lived dashboard/TUI process ran every later console skills op (includingreset_bundled_skill's delete) against whichever profile was live at import (#65828).Root cause: third module in the same lineage as
skills_tool(f8723c4) andskill_manager_tool(c6a3d41) —HERMES_HOME/SKILLS_DIR/MANIFEST_FILEfrozen at import;_profile_scope()'sset_hermes_home_override()could not reach them. The #48200 rmtree strict-child guard was anchored on the wrong root.Changes
tools/skills_sync.py: call-time accessors_hermes_home()/_skills_dir()/_manifest_file()— honor an explicitly patched module global (tests, retargeting), otherwise re-resolve from the live profile-scopedget_hermes_home(). All 37 call sites migrated; module constants kept for compat.hermes_cli/web_server.py:_profile_scope()docstring notes skills_sync needs no module retargeting now.tests/tools/test_skills_sync.py: 3 regression tests (override followed at call time, explicit patch still wins, rmtree guard anchors on the overridden profile's root).Validation
_profile_scope(other)reset_bundled_skillrmtree guard roottests/tools/test_skills_sync*+test_skills_hubruff clean; existing tests that patch
tools.skills_sync.SKILLS_DIR/MANIFEST_FILEunchanged and green.Fixes #65828
Infographic