Repository navigation
fix(cli-updates): an update that cannot start says so and stays dismissable - #1447
Merged
Juliusolsson05 merged 5 commits intoSep 27, 2026
Merged
Juliusolsson05 merged 5 commits into
Juliusolsson05 merged 5 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t, and Update now says a rejected request (#1425) runUpdate caught nothing after publishing the undismissable 'updating': openLog's mkdir (EACCES/ENOSPC) stranded it forever. It now publishes failed { reason: 'could-not-start', logPath: null } without running the command. The banner says so in fixed words with Update now as the retry (keyed per attempt), open-log opens nothing for it, and every Update now action awaits its IPC and shows 'Couldn't start the update. Try again.' on rejection instead of dropping it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation strand updating (#1447 review a) openLog now creates the attempt's log file (flag wx): a folder that exists but will not take a file (EACCES, ENOSPC) used to let the update run with no log and a View Log pointing nowhere; it is could-not-start now. updateSnapshot contains a throwing publication (a window torn down mid-send), which used to abort runUpdate right after 'updating' and strand it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…too (#1447 review b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…art hint copy (#1447 review c) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Round-1 disposition. a and b were FIX-BEFORE-MERGE, with the same major finding, and c was MERGE-READY on the fixed head. Everything is fixed fail-first.
Head: 50761ac. 🤖 Generated with Claude Code |
Juliusolsson05
changed the base branch from
main
to
integration/batch-2026-09-27-p
September 27, 2026 20:36
Juliusolsson05
merged commit Sep 27, 2026
64f0565
into
integration/batch-2026-09-27-p
2 checks passed
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.
Fixes #1425 (found by #1423's review b). Refs #1250.
What was wrong
CliUpdateOrchestrator.runUpdatepublishesupdating, which the banner marks undismissable. It then awaitedopenLog'smkdiroutside any catch. A data folder the app can't write (EACCES) or a full disk (ENOSPC) rejected there, and the row said "Updating…" forever.void window.api.cliUpdatesUpdateNow(cli), so the IPC rejection was dropped and nothing was said.Fix
failed.logPathis nowstring | null, andCliUpdateFailureReasonadds'could-not-start'.runUpdatecatchesopenLog, warns the cause in main's log only (q22), and publishesfailed { reason: 'could-not-start', logPath: null }without running the command.openLogwas the one throw that could strand the state:appendLogandappendDiagnosticscatch, andreadInstalledVersionreturns a result.openLogCREATES the attempt's log file (wx) before anything runs (round 1, a+b). A folder that exists but will not take a new file (EACCES, ENOSPC) is could-not-start too; it used to run the update with no log and a View Log pointing at nothing.updateSnapshotcommits the state and then contains a throwing publication (round 1, a). A window torn down mid-send used to abortrunUpdateright afterupdatingand strand it.cli-updates:open-logopens nothing for a failure with no log.could-not-startreads "Couldn't start the update: Agent Code couldn't create its update log. Still at .", with a hint about disk space and permissions on the data folder. It is dismissable, and its action is Update now instead of View Log.updateNowAction, which awaits the IPC call and, on rejection, shows "Couldn't start the update. Try again." using fix(cli-updates): View Log says when the log did not open (#1250 row 10) #1423's result contract.Tests (fail-first)
cliUpdateOrchestrator.couldNotStart.test.ts: the real orchestrator withmkdirrejecting EACCES at the fs boundary. The states goupdating→failed {could-not-start, logPath: null}, the command is never run, and the OS text is not in the state. On main,updateOncerejects with the EACCES and the state staysupdating.CliUpdateBanner.renderer.test.tsx:cliUpdates.test.ts:open-logfor a nulllogPathanswersfalsewithoutshell.openPath.updating;voidaction (3 cases red); per-version keys for could-not-start (1 red); a success reported as failure (1 red).npx tsc -bclean. The CLI update suites pass 28/28 across 6 files at 50761ac (count corrected per verification a).Boundary
The app is not launched. The read-only data folder is simulated at the
fsboundary.🤖 Generated with Claude Code