Skip to content

fix(reconcile): map cargo binary to owning crate and probe post-reconcile binary - #42

Merged
CybotTM merged 2 commits into
mainfrom
fix/reconcile-cargo-crate-mapping
Jul 30, 2026
Merged

fix(reconcile): map cargo binary to owning crate and probe post-reconcile binary#42
CybotTM merged 2 commits into
mainfrom
fix/reconcile-cargo-crate-mapping

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 30, 2026

Copy link
Copy Markdown
Member

Problem

Field failures from coding_agent_cli_toolset reconcile runs (see netresearch/coding_agent_cli_toolset#134 / #135) exist identically in this skill's scripts/lib/reconcile.sh:

  1. cargo uninstall "$tool" uses the binary name, but cargo needs the crate name — git-delta installs delta, watchexec-cli installs watchexec — and the || true swallowed the failure silently, leaving the old install behind.
  2. The post-reconcile verify only checks 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 by apt remove byobu).

Fix

  • Map binary → owning crate via cargo install --list (awk two-state parse; fallback to tool name), and warn on uninstall failure instead of hiding it.
  • After reconciliation, probe --version/version; warn when the binary is on PATH but no longer runs.

Note: the other removal branches share the || true silent-swallow pattern — candidate for a follow-up sweep.

Test plan

  • bash -n + shellcheck clean (only pre-existing SC1091 info).
  • awk mapping verified against real cargo install --list format: delta → git-delta, watchexec → watchexec-cli, absent packages fall back to the tool name.

Quality gate note

The Smoke Test check fails with ✗ github_release_binary.sh fd install failed: (empty error). This failure is pre-existing on main — identical signature in run 30123292238 (2026-07-24, before this branch existed) — and the check is non-required (mergeStateStatus: UNSTABLE). This PR touches only scripts/lib/reconcile.sh; the failing path is the github_release_binary.sh installer. Tracked separately.

…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>
Copilot AI review requested due to automatic review settings July 30, 2026 11:08
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit 99b7af8 into main Jul 30, 2026
18 checks passed
@CybotTM
CybotTM deleted the fix/reconcile-cargo-crate-mapping branch July 30, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants