Skip to content

ci(release): jobs after publish download prebuilt tools instead of installing the workspace - #5

Draft
jahands wants to merge 2 commits into
mainfrom
ci/release-publish-setup
Draft

jahands wants to merge 2 commits into
mainfrom
ci/release-publish-setup

Conversation

@jahands

@jahands jahands commented Oct 21, 2026 •

Copy link
Copy Markdown

Result: about 80–160s off each release (−13% to −23%)

Since Windows arm64 stopped being the last desktop job, about a third of a release is the jobs after the desktop builds, which run one after another: Publish GitHub Release, then npm → hosted web → Discord, with AUR alongside. On the last two cached nightlies these took 204–273s. Most of that was checkout and Setup Vite+ installing the workspace to run a 1–6s step: npm publish spent 49–62s on setup plus 9–20s in post-step cleanup.

Old and new jobs, side by side in three runs on a fork (same runners, publish steps dry-run or pointed at a local webhook):

Job Before After
Publish GitHub Release, setup + manifest merge 22–39s 8–16s
Publish CLI to npm 37–38s 9–12s
Deploy hosted web app 23–27s 16–22s
Announce on Discord 35–41s 13–14s
AUR, checkout step 12–15s 2s

Estimate per release, applying those savings to the last two cached nightlies: 639s → ~556s and 713s → ~552s. After this, AUR (59–86s, mostly building the package) is about as long as the npm → web → Discord chain, so trimming either one further gains little.

Pipeline, before and after

Before: every job after the desktop builds checks out the repo and installs the workspace before doing a few seconds of work (times from upstream nightlies 39543980476 and 39505921112):

flowchart LR
  D["Desktop builds"] --> R
  R["Publish GitHub Release · 68–97s<br/>checkout + install 24–46s<br/>merge manifests, upload"] --> N
  N["Publish CLI to npm · 67–91s<br/>checkout + install 49–62s<br/>build t3.tgz, npm publish"] --> W
  W["Deploy hosted web · 25–31s<br/>checkout + setup 14–16s<br/>vercel alias"] --> X
  X["Announce on Discord · 30–37s<br/>checkout + install 26–33s<br/>post webhook"]
  R --> A["AUR · 59–86s<br/>full checkout 15–22s<br/>makepkg, push"]
Loading

After: a new job builds those inputs while the desktop builds run, and the jobs after them only download them (times from the fork bench):

flowchart LR
  P["Prepare publish tools · ~41s<br/>build t3.tgz, bundle<br/>merge + Discord scripts"] -. "publish-tools artifact" .-> R
  P -.-> N
  P -.-> X
  D["Desktop builds · ~250s"] --> R
  R["Publish GitHub Release<br/>download 2s<br/>merge manifests, upload"] --> N
  N["Publish CLI to npm · 9–12s<br/>package.json + setup-node<br/>npm publish"] --> W
  W["Deploy hosted web · 16–22s<br/>package.json + setup<br/>vercel alias"] --> X
  X["Announce on Discord · 13–14s<br/>download 2s<br/>post webhook"]
  R --> A["AUR<br/>packaging/ checkout 2s<br/>makepkg, push"]
Loading

Prepare publish tools starts right after preflight and runs alongside the ~250s desktop builds, so nothing waits on it.

Change

  • New prepare_publish job, alongside the desktop builds and off the critical path: builds t3.tgz and esbuild-bundles merge-update-manifests and notify-discord-release (same approach as the Windows verify scripts), plus a copy of mirror-play-apk.cjs, into one artifact. release now needs it.
  • release and announce_discord download that artifact instead of checking out and installing. The scripts run on the runner's own Node (v22 on Blacksmith images); import.meta.main is defined at bundle time so they run on Node versions that lack it.
  • publish_cli runs npm publish --provenance ./t3.tgz after a package.json-only checkout and actions/setup-node, so npm still comes from the repo's Node 24 (npm 11.19; trusted publishing needs 11.5.1+). It stays on the GitHub-hosted runner. cli.ts publish had no other callers and is removed.
  • deploy_web checks out only package.json for Setup Vite+. It keeps vp dlx vercel; npx vercel took 23s against 3s.
  • publish-aur.yml checks out only packaging/, which is all packaging/aur/scripts/release.sh reads.
  • Job ordering is unchanged: npm after the release, web after npm, Discord after web.

Parity, from the fork runs: merged updater manifests are byte-identical, the npm tarball has identical file contents (npm publish --dry-run output matches), and the Discord webhook payload is identical apart from its timestamp.

Not tested on the fork

The fork has no npm trusted publisher, Vercel or Discord secrets, and the AUR job only runs on pingdotgg/t3code. The real npm publish --provenance, the Vercel alias, the Discord post and makepkg from the sparse checkout are first exercised on the next upstream nightly.

Built with Claude Opus 5.5 via Claude Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB −7 B (−0.1%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB −7 B (−0.6%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: 21da306 · PR result: 0d892b5 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant