feat(plugins): hot-reload classifier — skip restart on SKILL-content-only updates #121
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/plugin-hot-reload-classifier"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes core#112. Composes with #114 (atomic install) — before triggering
restartFunc, classify the diff between staged and live; skip the restart if only**/SKILL.mdcontent changed.Why
Claude Code re-reads
SKILL.mdon each Skill invocation (filesystem read, no in-memory cache). Hooks, settings.json, and plugin.yaml load at session start. So:Before this PR, every install issued
restartFuncregardless. For Reno-Stars iterating fast onmolecule-skill-five-axis-reviewcontent, that's seconds of agent-offline per docstring tweak.Detection algorithm
docker exec sha256sum).completemarker from comparison (mtime-only churn)**/SKILL.md→ coldTests (4 new, all green)
Full handler suite green, no regressions.
Phase 4 self-review (five-axis)
Correctness: No finding — every error path defaults to
cold; we never falsely classify as skill-content-only. The.completedrop is deliberate (bookkeeping, not content).Readability: No finding — small single-purpose helpers (
hashLocalTree,hashContainerTree,isSkillMarkdown,shQuote).Architecture: No finding — composes existing
execAsRoot; new helpers self-contained; old install path unchanged when classifier returns cold.Security: No finding —
shQuotesingle-quotes any non-trivial path;pluginNamealready validated; docker exec usesxargs -0for binary-safe path delimiting. Symlinks skipped during hash walk.Performance: No finding — adds two tree walks per install (host + one docker exec for container side). For ~10-50 file plugins, ~100ms. Versus saved ~5-10s container restart on hot-reloadable updates → clear win.
Refs
.completemarker source)Phase-4 in PR body; conservative-on-error; tests green.