Skip to content

fix(updates): reconcile concurrent cli installs - #1035

Merged
nixuuu merged 6 commits into
devfrom
fix/claude-update-install-state
Nov 19, 2026
Merged

nixuuu merged 6 commits into
devfrom
fix/claude-update-install-state

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Problem

Canopy could refuse a Claude Code update based on a saved running report, even if the worker had reconnected and had no such installation. During an actual overlap, a second click could also surface a start refusal as a failed update. The reported Nightly installer output confirms Claude Code 2.1.328 was ready on Windows. The screenshot and output do not share an attempt ID. The Windows detection change in #994 enabled the action for native installs.

Change

  • Use the current worker connection for live installer status, and keep installer output with its attempt ID.
  • Let the worker arbitrate installs. Repeated individual requests for the same active target use the existing result. Update all reconciles an explicit busy refusal with later reports and follows the active attempt ID. An install gets its full completion window once the contention clears.
  • Wait for any active installer for that CLI to finish validation before treating its reported version as proof of success. The worker checks the installed version again before installing an Update all target, including when a linked snapshot is stale. The coordinator sends guarded installs only on a live link to a gateway that supports the guard.
  • Record the accepted attempt ID in the audit entry.

Verification

  • Revision 06bb2f70 on Linux (nix-pc). All 86 tests passed across provider-cli, update-cli-attempts, mise-cli, update-center, update-all-computers, and cli-discovery. The test temp directory was clean.
  • Regression coverage includes an outdated running report, repeated requests, same-version correlation, different-version contention, a rollback-capable competing attempt a guarded stale target sent to the worker, and an older linked gateway that must receive only the ordinary unguarded request.
  • Generated contracts with bun run gen. Gateway, worker, and integration test typechecks passed. Targeted Oxlint, Oxfmt and git diff --check passed.
  • Tests exercise a real Linux worker and simulated installers. Windows execution of this revision remains unverified.

Copy audit

  • Update all now tells the user to update an older worker before retrying a guarded install. If the worker cannot identify the installed CLI version, the message explains the missing version and gives the next action. An older linked gateway gets a short Canopy update instruction in the same place.
  • Checked both messages in the existing Updates popover against a local fixture in a desktop-width light view and a 390 px dark view with short and long worker names. The existing error control provides the full text when the compact row truncates it.

Fixes: #26
Fixes: #947
Related: #994

@nixuuu
nixuuu enabled auto-merge (squash) November 19, 2026 16:24
@nixuuu
nixuuu disabled auto-merge November 19, 2026 16:25
@nixuuu
nixuuu enabled auto-merge (squash) November 19, 2026 16:30
@nixuuu
nixuuu disabled auto-merge November 19, 2026 16:34
@nixuuu
nixuuu enabled auto-merge (squash) November 19, 2026 16:41
@nixuuu
nixuuu disabled auto-merge November 19, 2026 16:46
@nixuuu
nixuuu enabled auto-merge (squash) November 19, 2026 16:50
@nixuuu
nixuuu merged commit bd1ea7b into dev Nov 19, 2026
17 checks passed
@nixuuu
nixuuu deleted the fix/claude-update-install-state branch November 19, 2026 16:56
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.

1 participant