mirror of
https://github.com/EveryInc/compound-engineering-plugin.git
synced 2026-10-07 23:49:12 +02:00
CLAUDE_PLUGIN_ROOT points at the currently-loaded plugin version directory
(~/.claude/plugins/cache/<marketplace>/compound-engineering/<version>), not
the plugins cache root. Appending /cache/<marketplace>/compound-engineering/
onto it produced a path that never exists, so the cache probe always failed
and emitted __CE_UPDATE_CACHE_FAILED__ on healthy installs.
Derive the cache dir via dirname "${CLAUDE_PLUGIN_ROOT}" instead. Guard with
a case shape-check that only emits the path when it matches
*/cache/*/compound-engineering, so malformed env values collapse to the
sentinel rather than producing a dangerous rm -rf target. Works for any
marketplace name, which removes the earlier hardcoded-segment footgun.
Add tests/skills/ce-update.test.ts as a regression guard so the
${CLAUDE_PLUGIN_ROOT}/cache/... antipattern cannot reappear.
Fixes #556.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>