Repository navigation
update: a released codeaf installs the newest stable and restarts before the chat opens - #1826
Merged
Merged
Conversation
…ore the chat opens - A stable build in a file named codeaf, with automatic updates on, now looks before the chat opens (cached a day, otherwise at most 1.5s, and a look that got no answer is not waited on again for an hour), installs within 20s with a progress line, and hands the terminal to the new build with the same arguments. ctrl+c, a slow download or a failure opens the build on disk. - Only that build is updated unasked (update.AutomaticFor): dev, staging, rc and source builds, devaf, stageaf and other file names are told on one terminal line and the chat's quiet line, and never replaced. Nothing runs without a terminal, under CI, or for --once. - `codeaf update --version <tag>` and `/update <tag>` pin the file at that release; a plain install unpins. The pin lives in the install record, so a file replaced by curl drops it. - The chat's countdown is kept as the fallback when the launch could not finish, and is now gated by the same rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`codeaf <tag> installed · restart to use the new version`, in the transcript and the keys line alike, instead of the sentence about windows and engines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A launch that runs out of its 20s clock records the release as slow (AutoSlow); for a day the next launches leave it to the chat's background road instead of starting the same download again. - The name rule reads the file that would be overwritten, links resolved, on every platform; the check decides it off the frame and carries it as Available.Automatic for both launch roads. - A file already holding the release says "is already on disk · opening it" instead of claiming an install. - Windows Relaunch ignores console ctrl+c while it waits on the child. - Both spellings of the restart marker are cleared; the download meter draws only when stderr is a terminal; a --debug record opens after the launch's own update; Linuxbrew is a package manager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ZeroPoint95
marked this pull request as ready for review
October 14, 2026 20:30
4 tasks done
…e-on-launch # Conflicts: # internal/config/settings.go
…e-on-launch # Conflicts: # internal/update/install.go
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.
A released codeaf now updates itself and restarts before the chat opens. Every other build is only told.
What changed
codeaf, withautomatic updateson, now updates before the chat opens:codeaf updated from <old> to <new> as it opened · automatic updates in /settings turns this off.automatic updatesoffdevaf,stageaf, any other file namecodeaf" rule reads the file that would be overwritten, with symlinks resolved, so it answers the same on macOS and Linux.make build,go run) make no requestCIset, or--once: nothing runscodeaf update --version <tag>and/update <tag>pin the file. A plain update unpins.codeaf <tag> installed · restart to use the new version./home/linuxbrew/.linuxbrew/) is treated as a package manager and is never replaced in place.--helpare updated.keys.md: one heading reworded. The new update sections shifted search ranking, so "how do I make this one chat think harder" no longer reached that heading.How it was checked
go test -race ./internal/update/ ./internal/config/ ./cmd/codeaf/:ok internal/update 15.6sok internal/config 34.3scmd/codeaf(238.8s): one failure,TestAShellRunWaitsForItsLastCallsPriceAndKeepsItsClock(carried_money_test.go:64: stderr = "", want the wait said). It fails the same way under-raceonorigin/dev1acf751, so it's pre-existing. No other failure and no data race reported.go test -run 'Update|Offer|Skip|Pinned|Launch|Install|Grace|Countdown|Refus|FinishedInstall|Automatic|Deferred' ./internal/tui3/:ok … 15.0sgo run ./cmd/codeaf-changes check:docs/changes/unreleased: 2 entries, all well formed.make test-laws:laws: 139 files in 30 packages, all 30okmake test-packed-manual:ok internal/manualGOOS=windowsandGOOS=linuxbuilds of./cmd/codeaf: compilemake test-touchedat f53fa93 (the previous head): every touched package passed on its first run:cmd/codeaf,internal/config,internal/manual,internal/update, and all 8 shards ofinternal/tui3. Not re-run for this round.bin/codeafis never left stamped as a release:make build BUILD_REV=v0.0.1 && mkdir -p /tmp/au && rm -f /tmp/au/codeaf /tmp/au/devaf && cp bin/codeaf /tmp/au/codeaf && cp bin/codeaf /tmp/au/devaf && make buildcd $(mktemp -d),CODEAF_HOME=/tmp/au/home /tmp/au/codeaf:updating codeaf v0.0.1 to v0.8.0, thencodeaf v0.8.0 installed · opening it.CODEAF_HOME=/tmp/au/home /tmp/au/devaf:codeaf v0.8.0 is out · you have v0.0.1 · /update installs it for the next launch.… · devaf update installs it.v0.0.2built from this branch, in a real terminal: restart with the "updated from" line; auto-update off; source build making zero requests; pin and unpin; silent network (1.8s, then 0.14s); slow download into the chat's countdown; ctrl+c.Checklist
docs/changes/unreleased/1826-auto-update-on-launch.mdrunning-from-the-terminal.mdandcommands.md, with new probes ininternal/manual/chat_test.go.github/known-red.txtgit add -A🤖 Generated with Claude Code