Repository navigation
fix(cli): honour --dir when uninstall checks agent entry ownership - #3019
ravenpride wants to merge 1 commit into
Conversation
Signed-off-by: Sascha Falk <sascha@falk-online.eu>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the custom-directory uninstall changes.
No open issues 🎉
What changed in this PR
Makes uninstall --dir=<dir> use the selected binary path when checking agent-entry ownership, addressing the custom-directory portion of issue #2856’s uninstall symmetry problem.
Changes:
- Removes the helper that assumed binaries were installed under
~/.local/bin. - Passes the activation binary path through agent configuration, hook, and profile cleanup.
- Adds a cross-platform regression test for custom-directory uninstall, checking binary and owned-entry removal while preserving unrelated configuration.
| File | Description |
|---|---|
tests/test_cli.c |
Adds and registers the custom-directory uninstall regression test. |
src/cli/cli.c |
Uses the selected binary path throughout agent uninstall ownership checks. |
Review effort: Balanced
What does this PR do?
Problem:
uninstall --dir=<dir>only removes the Claude Code entry. Every other agent path reconstructs the binary path as~/.local/bin/codebase-memory-mcp, so the ownership check fails for entries that install--dir=<dir>wrote (e.g. viainstall.ps1, whose default is%LOCALAPPDATA%\Programs\codebase-memory-mcp). Entries are left behind; for some clients "removed" is printed although nothing was removed. Related: #2856 (point 2).Fix: Drop the guessing helper
cbm_agent_installed_binary_path()and passactivation->bin_paththrough all uninstall paths, asuninstall_claude_code()already does.Tests: New
cli_uninstall_dir_removes_agent_entries_written_for_that_dir(installs into a custom dir, uninstalls with--dir, asserts owned entries are removed and foreign ones kept). Fails without the fix, passes with it.scripts/test.sh --suites clion Windows (MSYS2 CLANG64, clang 23): 372 passed, 11 skipped.AI disclosure: Written with the help of GitHub Copilot (Opus 5.5); reviewed and tested by me.
Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)Local verification (Windows 11, MSYS2 CLANG64, clang 23):