fix(reconcile): map cargo binary to owning crate and probe post-reconcile binary - #42
Merged
Merged
Conversation
…cile binary `cargo uninstall "$tool"` fails when the crate name differs from the binary (git-delta installs `delta`, watchexec-cli installs `watchexec`) and the `|| true` swallowed the failure silently. Map binary -> owning crate via `cargo install --list` (fallback: tool name) and warn on failure instead of hiding it. Also probe that the binary actually runs after reconciliation: presence on PATH is not function — a surviving wrapper script can depend on files the removed package owned (byobu's launcher sources /usr/lib/byobu). Both defects were hit in the field by the coding_agent_cli_toolset reconcile runs (netresearch/coding_agent_cli_toolset#134, #135). Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
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.



Problem
Field failures from
coding_agent_cli_toolsetreconcile runs (see netresearch/coding_agent_cli_toolset#134 / #135) exist identically in this skill'sscripts/lib/reconcile.sh:cargo uninstall "$tool"uses the binary name, but cargo needs the crate name —git-deltainstallsdelta,watchexec-cliinstallswatchexec— and the|| trueswallowed the failure silently, leaving the old install behind.command -v. Presence is not function: a surviving wrapper script can depend on files the removed package owned (real incident: byobu's launcher script sourcing/usr/lib/byobu, broken byapt remove byobu).Fix
cargo install --list(awk two-state parse; fallback to tool name), and warn on uninstall failure instead of hiding it.--version/version; warn when the binary is on PATH but no longer runs.Note: the other removal branches share the
|| truesilent-swallow pattern — candidate for a follow-up sweep.Test plan
bash -n+ shellcheck clean (only pre-existing SC1091 info).cargo install --listformat:delta → git-delta,watchexec → watchexec-cli, absent packages fall back to the tool name.Quality gate note
The
Smoke Testcheck fails with✗ github_release_binary.sh fd install failed:(empty error). This failure is pre-existing onmain— identical signature in run 30123292238 (2026-07-24, before this branch existed) — and the check is non-required (mergeStateStatus: UNSTABLE). This PR touches onlyscripts/lib/reconcile.sh; the failing path is thegithub_release_binary.shinstaller. Tracked separately.