You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Skill hot-reload delete keys off directory name instead of skill id, leaving stale skills loaded #417
The skill hot-reload delete handler derives the removal key from the directory name, but skills are stored under an id generated from the SKILL.tomlname. When those differ, deletion silently misses and the stale skill stays loaded.
Location
src/cortex-skills/src/manager.rs:371-382 (WatchEvent::Deleted handler), at commit 7954d021 (current main).
On delete it computes skill_id = skill_dir.file_name().to_str().to_lowercase() and calls skills.remove(&skill_id). But skills are inserted by skill.id (manager.rs:159,219,356), where id is generated from the SKILL.tomlname (parser.rs:139-145: lowercase, spaces→hyphens, non-alphanumeric stripped). The directory name need not equal that id.
Reproduction
A skill in directory code_review/ with SKILL.tomlname = "Code Review" is stored under id code-review. Deleting its SKILL.toml triggers remove("code_review"), which does not match "code-review".
Expected: the skill is removed from the in-memory registry. Actual: the stale skill remains in the DashMap (hot-removal silently fails).
Suggested fix
Track a dir → id mapping at load time and remove by the stored id, or on delete scan skill values for the one whose source directory matches path.parent() and remove by its actual id.
Activity
fix(skills): hot-remove deleted skills by id, not directory name