Repository navigation
fix(cli): use managed binary path for agent configs when externally managed (#2722) - #2822
Conversation
…anaged (DeusData#2722) Signed-off-by: Divakant Pandey <divakant01@gmail.com>
|
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. |
…ta#2722) Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you so much, @divakantpandey - and thanks again for the Pi adapter fix in #2807. This one is a really good catch: We pushed one small commit (113f24f) on top of your branch:
There is no change to your logic. If you push to this branch again, please pull first so the extra commit is not lost. Thanks again for taking this on - it fixes a real day-one problem for everyone who installs through a package manager. |
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you for your patience, @divakantpandey. A pull request that merged into main a few minutes ago (#2290) changes src/cli/cli.c, which this pull request also changes, so the CI run in progress here could no longer vouch for today's main. We merged current main into your branch once more (one merge commit, 4a85a26; it merged cleanly and your own change is untouched) and started a fresh run. We will merge once the required checks are green. Please pull before pushing again. |
|
Pulled the branch locally to stay in sync. Thanks for handling the merge and the review! |
|
Thank you for the detailed review and kind feedback, Martin! Really glad this helps make package-managed installs seamless. Also appreciate you taking care of the clang-format adjustment and keeping the branch in sync with main. |
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you for your patience, @divakantpandey. Main has moved since the last CI run on this branch, and some of the new commits change src/cli/cli.c and tests/test_cli.c, which this pull request also changes, so that run can no longer vouch for today's main. We merged current main into your branch (one merge commit, cf77fb8; it merged cleanly and your own change is untouched) and started a fresh run. We will merge once the required checks are green. Please pull before pushing again. |
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you for your patience, @divakantpandey. The macOS legs of the last CI run here were cancelled by GitHub itself: it is retiring its macOS 14 runners on November 2 and ran scheduled brownouts beforehand, so those jobs never got a runner. Nothing in your change caused it. Main now runs CI on macOS 15 (#2849), so we merged current main into your branch (one merge commit, 4787012; it merged cleanly and your own change is untouched) to get a run on the new runners. Please pull before pushing again. |
|
Merged as 70f6de8 - thank you, @divakantpandey! When the binary is managed by mise, Homebrew, nix, asdf or cargo, |
Fixes #2722
Problem
When the binary is managed externally (e.g. mise, Homebrew, nix, asdf, cargo),
codebase-memory-mcp installrecognizes that the binary is managed elsewhere and skips copying the binary to$HOME/.local/bin/codebase-memory-mcp. However, it still passedbin_targetintocbm_build_install_plan_json_options()andcbm_install_agent_configs_with_previous(), causing agent configurations (Claude Code, OpenCode, VS Code, Zed, Copilot CLI, Junie, etc.) and--planreceipts to reference the non-existent default binary path instead of the detected managed path.Solution
self_pathand external management detection prior to--planand agent configuration.self_pathasconfig_binarywhen the binary is externally managed (or when--skip-binaryis passed andbin_targetdoes not exist).cli_install_activate(), passconfig_binarytocbm_install_agent_configs_with_previous(). Ifconfig_binarydiffers frombin_target, passbin_targetas the previous binary to ensure pre-existing configs pointing to~/.local/binare recognized and migrated.cbm_cli_set_self_path_override_for_testunderCBM_CLI_ENABLE_TEST_APIto deterministically verify managed binary installation behavior in test suites.Verification
cli_install_managed_binary_config_path_issue2722intests/test_cli.c../scripts/test.sh --suites cli: 371 passed, 0 failed../scripts/test.sh --contracts-only: All static contracts passed../scripts/check-dco.sh upstream/main..HEAD: Valid DCO sign-off verified../scripts/build.sh: Clean build.