perf(ci): cut duplicate release and dependency work #9121
main fromt3code/speed-up-ci-releases·opened View on GitHubCI repeated expensive work across jobs. Releases rebuilt the CLI after the desktop matrix, and full installs could restore pnpm caches populated by filtered jobs but still download 749 packages.
This reuses the Linux desktop server and web bundle for npm publishing, avoids recompressing release artifacts, filters installs that need only part of the workspace, and gives full installs a separate cache namespace. Desktop bundling skips declaration output that no runtime consumer uses. Release checks still gate publishing. Publication still runs in order: npm, then GitHub Release, then hosted web.
Measured results:
- the removed CLI rebuild took 31 to 41 seconds in recent releases
- the server test install dropped from 1,747 packages to 1,180 while keeping the mobile code used by server projection tests
- desktop pack time dropped from 3.69 seconds to 0.42 seconds with identical runtime output
The new artifact transfer adds some overhead, so the total release timing still needs a real CI run. The new full-install cache starts cold on its first run.
Verified with 86 release tests, 15 ACP tests in an isolated filtered install, 18 activity projection tests in an isolated 1,180-package server install, desktop build, pack, typecheck, and preload checks, targeted lint and format checks, and stable and nightly publish dry runs after archive restoration with native monitors. No new workflow lint issues.
Made with GPT-5.6 Sol in Codex through T3 Code.
Note
Medium Risk Release CLI publish now depends on a Linux desktop artifact instead of a fresh build; a missing or wrong tarball fails publish rather than rebuilding locally.
Overview
CI and release workflows stop relying on setup-vp for install/cache on full-workspace jobs: they disable built-in cache/install, restore a dedicated pnpm-full-v1 pnpm store via actions/cache@v6, then run vp install. Filtered jobs (server tests, release preflight/smoke, etc.) keep setup-vp caching but pass install args so partial installs do not poison the full-workspace cache.
Release publishing no longer runs vp run --filter t3 build in publish_cli. The Linux desktop matrix job tarballs apps/server/dist and uploads it; npm publish downloads and extracts that artifact instead. Desktop release uploads use compression-level: 0 to avoid recompressing large binaries.
Desktop Electron pack sets dts: false on all pack targets in vite.config.ts, skipping declaration emit for main/preload bundles. Release docs note that the CLI npm bundle is reused from the Linux desktop build.
Note
Cut duplicate dependency and release work in CI workflows#
- Reworks dependency setup in ci.yml and release.yml to use explicit pnpm store caching and filtered installs instead of
setup-vp's automatic full-workspace install - Server test shards now install only the
t3andmobiledependency graphs; release preflight installs onlyscripts - The Linux release build now archives the server
distdirectory as a CLI artifact, andpublish_clidownloads it instead of rebuildingt3 - Sets
declarationtofalsefor the main and preload bundles in vite.config.ts so generated.d.tsfiles are omitted from desktop output - Risk:
publish_clinow depends on the Linux build artifact being present and correctly archived; a missing or staledisttarball will fail the publish job
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — The PR changes the production release path so npm publication reuses a Linux desktop build artifact instead of rebuilding the CLI, and it adds new cross-job artifact dependencies. It also disables declaration generation for all desktop pack targets, making the release and static-analysis configuration changes unsuitable for automatic approval.
Notes:
- Diff unchanged. Approvability was decided on eligibility alone.
Note
🤖 GPT-5.6 Sol responding on behalf of Theo
This is a valid human approval request. I verified the artifact handoff at
93d148b8a8a607f0a29c493d55b52150c3c70606in an isolated checkout with fixed, non-production public config and tracing values.The latest head,
828e522fb8b8a4c50574074e049d0fe9a357c6ad, changes only the CI test install. The release code verified here is unchanged.- For stable
0.0.38and nightly0.0.39-nightly.20260901.9999, the server bundle fromvp run build:desktopfollowed by the exact production or nightly brand helper matched the formervp run --filter t3 buildpath after the same branding. Each comparison covered 807 files with no path or byte differences. - The workflow tar round trip had no content or mode differences. Both CLI entrypoints retained mode
0755. - The restored stable and nightly artifacts both passed
cli.ts publish --dry-runwith unique versions. No registry write occurred.
Both paths use the same server and web build task. The Linux job archives the bundle after release branding.
publish_clirestores it before adding the unchanged resource-monitor artifacts and running the unchanged publish command. This verifies the new handoff, but it does not claim that a real release ran.- For stable
juliusmarminge added labelsmacroscope-review
juliusmarminge assignedjuliusmarminge
Taking over this one as maintainer for batch server-persistence-01. Main now contains the release artifact reuse and desktop declaration changes, and CI dependency setup has moved into a composite action. I will rebuild the remaining full-versus-filtered dependency-cache isolation from current main in an origin stack, retain your author credit, map every original change, and close this only after the replacement is published. No merge.
Thanks @t3dotgg — the full-versus-filtered cache collision you identified remains useful to fix. Rebuilt that concern for current main in the one-layer stack #21885, which isolates full pnpm stores in the existing CI composite and reuses it from all four full-install release jobs. The replacement is published, linked, and unmerged; CI and hosted cache proof are being followed there.
I compared the complete original diff against current main and the replacement:
- The full-install cache isolation lands in the replacement, through the shared composite rather than duplicated workflow blocks.
- The old Linux desktop-to-npm bundle handoff is superseded by main’s build-once JS bundle, platform CLI archives, and npm launcher. The current release guide describes that architecture; no old handoff or npm-before-release ordering was restored.
- Desktop declaration output is already disabled on all seven current pack entries.
- The old server-test and scripts-only preflight filters were intentionally omitted: current dependency graphs differ, and preflight now verifies the full dependency policy and hands metadata to the bundle job. Those full installs remain intact.
- The artifact compression-level optimization is not present on current main and is intentionally omitted from this focused cache replacement. It was not silently treated as already implemented.
134 existing focused tests pass before and after, with no test additions. Scoped workflow/action validation adds no diagnostics. Two independent Opus 5.5 / GPT-6 Sol whole-diff review rounds finished without code findings after removing one stale comment. Current-head hosted results and human release-workflow approval remain explicit gates on the replacement. Closing this superseded PR; no merge performed.
Implemented with Codex gpt-6.1-sol through T3 Code.
juliusmarminge closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
04efa79· PR result:828e522· Source CI: successScenario 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.