Repository navigation
fix(skills): hot-remove deleted skills by id, not directory name (#417) - #419
ALDL (victor-commit) wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No actionable deletion-path issue remains; the change is ready to merge after normal checks. Pre-merge checks |
|
The WatchEvent::Deleted handler removed skills using the lowercased directory name, but skills are stored under an id derived from the SKILL.toml `name` (lowercased, spaces->hyphens, non-alphanumeric stripped). When they differ the removal missed and the stale skill stayed in the DashMap. Match on the stored `source_path` instead. Fixes CortexLM#417
56db971 to
a145e3d
Compare
Deleting a skill's
SKILL.tomldoesn't reliably unload the skill.The
WatchEvent::Deletedhandler removes by the lowercased directory name, but skills are stored under an id derived from thenamefield inSKILL.toml(lowercased, spaces → hyphens, non-alphanumerics stripped — seeparser.rs). So a skill incode_review/withname = "Code Review"is stored ascode-review, while delete tries to removecode_reviewand misses — the stale skill stays in the map.Each
Skillalready keeps itssource_path(the skill directory), so this switches the delete to match on that viaretain, removing the entry by its real id regardless of the folder name.I checked this against the data model (the insert sites,
source_path, and the id generation inparser.rs); haven't compiled it locally.Fixes #417