Repository navigation
fork: the server and CLI update from the desktop app's repository - #1
Conversation
…OSITORY) A build made with T3CODE_RELEASE_REPOSITORY=<owner>/<repo> lists, downloads and links releases only from that repository: the server's `t3 update`, the Update button's pinned-runtime download, the desktop app's SSH installs, and the desktop app's own electron-updater feed. Without the setting nothing changes (upstream pingdotgg/t3code). A malformed value fails the build instead of quietly falling back to upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without T3CODE_RELEASE_REPOSITORY, an Actions build takes GITHUB_REPOSITORY, as the desktop updater feed already does. Reusable workflows (release-desktop.yml re-bundles the server for the CLI executable) do not pass the caller's env on, so the explicit variable alone would let a fork's CLI archive name upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: correctness+design+tests · reviewer: opus high (t3lens-cdt) · read at: 7c9513c
|
Review round 1: a second setting (T3CODE_RELEASE_REPOSITORY) with the opposite precedence let a build set only T3CODE_DESKTOP_UPDATE_REPOSITORY and ship a desktop app on the fork's feed with a server that updates from upstream. The server, CLI and desktop SSH installs now read upstream's own setting in upstream's order (T3CODE_DESKTOP_UPDATE_REPOSITORY, then GITHUB_REPOSITORY), so all three readers agree by construction, and the patch no longer touches build-desktop-artifact.ts or the web config's repository line. The former name is still accepted when it names the same repository and fails the build otherwise. A test checks the server's value against the desktop updater feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
fix round 1: one repository setting, one order, for desktop and server (head
New tests: 6 pass; 5 fail on the round-0 code. Scripts 57, shared 🤖 Generated with Claude Code |
|
lens: correctness r2 · reviewer: opus high (t3lens-1-2-r) · read at: c798cf3
|
main now carries #1, #2 and a newer upstream. fork-tests.yml keeps this branch's version (it replaces #2's copy) and ports what the drift check listed: test-delta.test.cjs in the release checks, Vitest's module cache on the server shards (saved only by pushes), and no test-cache report upload. Web was already split in two; the built-client boot stays in the Build job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fork patch 1 of the series: the server and CLI update from the same repository as the desktop app.
What changes
T3CODE_DESKTOP_UPDATE_REPOSITORY, elseGITHUB_REPOSITORYin a GitHub Actions build, else upstreampingdotgg/t3code.@t3tools/shared/cliRelease(server, desktop main process, web) read the same setting in the same order, baked in as__T3CODE_RELEASE_REPOSITORY__(scripts/lib/release-repository.ts).cliRelease.tsuses it for the release index (t3 update), archive andSHA256SUMSdownloads (the Update button's pinned-runtime install, the desktop app's SSH installs) and the releases page link.vite.config.tsfiles (one import and onedefineentry each),apps/web/tsconfig.json(one include),cliRelease.ts, one line indocs/operations/release.md.build-desktop-artifact.tsis not touched.Why
A fork build must only ever be replaced by another fork build. With this, Update and
t3 updatelist and download only the fork's releases; an upstream version that has no fork release fails safely ("no such release") and the fork stays installed.T3CODE_RELEASE_BASE_URLand the managed-policy mirror still override it at run time, as before.Review round 1
Round 0 added a second setting,
T3CODE_RELEASE_REPOSITORY, which the desktop feed read only as a fallback while the server read it first. A build that set onlyT3CODE_DESKTOP_UPDATE_REPOSITORYshipped a desktop app on the fork's feed with a server that updated from upstream. Now there is one setting and one order, and a test checks the server's value against the desktop updater's own resolver (resolveGitHubPublishConfig) for every combination. The former name is still accepted when it names the same repository, and fails the build otherwise (#2's release workflow still sets it).Tested
scripts/lib/release-repository.test.ts: 6 pass; 5 of them fail against the round-0 code. Scriptsrelease-repository,build-desktop-artifact,public-config: 57 pass.packages/sharedcliReleasetests: 6 pass (index, download and checksum URLs use the build's repository; upstream stays the default).apps/servercli/update,cloud/pinnedRuntime,cloud/selfUpdate: 52 pass.vp fmt, lint, knip (pre-commit).vp packof the server with onlyT3CODE_DESKTOP_UPDATE_REPOSITORYset: the bundle containsresolveCliReleaseRepository("<owner>/<repo>"). With only a disagreeingT3CODE_RELEASE_REPOSITORY, the build fails with the "disagrees" message.Not covered
defineentry.🤖 Generated with Claude Code