Repository navigation
fix(cli): t3 update no longer calls a failed download a missing release - #29454
MarcoDotIO wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The CLI now uses an actual HTTP 404 response to identify a missing release rather than matching error text. This narrowly changes failure diagnostics without changing update defaults or installation safeguards. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentVerified unchanged head Used the real CLI entry point and Fetch HTTP client, without mocks, fixtures, or demo data. An unavailable release mirror at T3CODE_RELEASE_BASE_URL=http://127.0.0.1:4040 node apps/server/src/bin.ts update 1.2.3-nightly.20260404.1 --base-dir <isolated-home> --allow-downgrade --yes
Also drove the actual dev web client with repo Playwright and Inspected the captures and checked uploaded video playback and seeking in T3's player. Blacksmith passed all 18 update tests and Not verifiedA real HTTP 503 or connection reset was not induced; the real transport case was ECONNREFUSED. The existing tests cover 503 and reset. Successful archive installation, background-service restart, and launcher replacement were not exercised. Native desktop/mobile and macOS/Windows behavior were not exercised on this Linux VM. This PR changes CLI failure classification, with no UI changes. |
pingdotgg#29911 landed the same status check through isUnpublishedRelease, so main's update.ts is taken whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing: #29911 landed the same fix on Claude Opus 5.5 (Claude Code desktop app) |


Problem
t3 updatetells you a release doesn't exist when the download of that release merely failed, if the version number happens to contain404.The missing-release check in
runUpdate(apps/server/src/cli/update.ts) testsString(error.cause).includes("404"). That string carries the request URL as well as the status, and the URL carries the version:So for any version containing
404, such as a nightly dated20260404or a run number like.2404, a connection reset or a 503 comes back asNo release archive was published for t3@…. The same happens for every failed download whenT3CODE_RELEASE_BASE_URLcontains404, such as a mirror on port 4040. The release exists, so the message sends you looking for the wrong problem. A proxy failure like theECONNRESETin #21922 would be misreported this way too.Call path:
t3 update [version]→runUpdate→ensurePinnedRuntimeInstalled→installFromArchive→fetchReleaseAsset(SHA256SUMS) fails → theEffect.catchIfinrunUpdate.Change
Check the response status on the HTTP client error instead of searching its text. Other failures now keep the install error they already had:
Pinned runtime install failed while downloading the t3 release checksums.Scope and approval
A two-line fix to an obvious bug, so no prior issue. One condition changes; a real 404 still gives the same message as before.
Verification
Added two tests in
apps/server/src/cli/update.test.tsthat run the realrunUpdateandensurePinnedRuntimeInstalledagainst a stubbed HTTP client, using the version1.2.3-nightly.20260404.1:reports a missing release when the checksums return 404: guards the real case, which had no test. Passes before and after.does not call a failed download a missing release: a transport reset and a 503. Fails before, passes after.Before, with the fix removed:
After:
vp lintandvp fmt --checkonapps/server/src/cli, andtsc --noEmitinapps/server, are clean.Not checked: a real
t3 updateagainst GitHub. The failures are stubbed at the HTTP client.Claude Opus 5.5 (Claude Code desktop app)
🤖 Generated with Claude Code