Repository navigation
fix(install): manifest + resolved-path uninstall; pi project path .pi/skills - #224
Merged
Merged
Conversation
unlink_if_managed removed an entry only when its symlink target began with $REPO_ROOT/. That made --uninstall a no-op whenever the install came from the npm package (links into node_modules/bigpowers) but the uninstall was run from a checkout, and it could never see chained hops or copy-mode entries. It also exited 0 with no report, so a user believed the machine was clean. Add scripts/lib/install-manifest.sh: - bp_manifest_add records every link() destination; uninstall replays it. - bp_target_managed resolves symlink chains and accepts an entry under $REPO_ROOT or any node_modules/bigpowers root. - bp_manifest_replay_cleanup removes recorded copy-mode entries (a directory that contains SKILL.md) after the per-channel sweep, and always prints a removed count. install.sh now reports 'bigpowers uninstalled (N entries removed)'. Refs #219
bin/setup.js declared localPath '.pi/agent/skills' and installLocal() wrote pi skills into <cwd>/.pi/agent/skills. pi resolves project resources from <cwd>/.pi/skills (package-manager.ts projectDirs.skills); ~/.pi/agent/skills is the user-global directory and is scanned by no pi version as a project path, so a project-local pi install silently did nothing. Correct the local target to <cwd>/.pi/skills in bin/setup.js, installLocal() and uninstallTool(), and update the install-helpers test that had codified the wrong path. The global target (~/.pi/agent/skills) is unchanged. Refs #220
tests/test-install-manifest.sh drives install-manifest.sh directly: a link into $REPO_ROOT and one into node_modules/bigpowers both resolve as managed, a chained hop resolves through the middle link, a foreign link is left alone, and manifest replay removes a copy-mode skill dir but keeps a foreign dir. Wired into the golden gate suite. Refs #219
|
🎉 This PR is included in version 2.93.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What this fixes — #219 and #220
#219 —
install.sh --uninstallwas a no-op from a checkout.unlink_if_managedremoved an entry only when its symlink target literally began with$REPO_ROOT/. An install from the npm package links intonode_modules/bigpowers, so an uninstall run from a checkout matched nothing — 0 of N removed, exit 0, no report. Chained hops (.agents/skills/x → .claude/skills/x → node_modules/…) and copy-mode directories were never considered either.scripts/lib/install-manifest.sh:link()records every destination; uninstall replays the manifest after the per-channel sweep.bp_target_managedresolves symlink chains (bp_realpath_follow) and accepts an entry under$REPO_ROOTor anynode_modules/bigpowersroot.bp_manifest_replay_cleanupremoves recorded copy-mode directories (a dir that containsSKILL.md) and always prints a count:bigpowers uninstalled (N entries removed).tests/test-install-manifest.sh(6 checks) wired into the golden suite.#220 — project-local pi install wrote to a path pi never scans.
bin/setup.jsdeclaredlocalPath: '.pi/agent/skills'andinstallLocal()/uninstallTool()wrote into<cwd>/.pi/agent/skills. pi resolves project resources from<cwd>/.pi/skills;~/.pi/agent/skillsis the user-global dir and no pi version scans it as a project path — so a local install silently did nothing.<cwd>/.pi/skillsinbin/setup.js,install-helpers.jsinstallLocal()anduninstallTool().scripts/test-install-helpers.js, whose local-pi assertion had codified the wrong path.~/.pi/agent/skills) unchanged.Evidence
Gates
npm run compliance0 ·bash scripts/run-verification-gates.sh59/59 ·trace-stories --strict0.Note: local gate runs in the worktree needed a
node_modulessymlink (worktrees don't inherit the main checkout's install); CI does a cleannpm ci.Closes #219
Closes #220