Skip to content

perf(ci): cut duplicate release and dependency work - #9121

Closed
t3dotgg wants to merge 2 commits into
mainfrom
t3code/speed-up-ci-releases
Closed

t3dotgg wants to merge 2 commits into
mainfrom
t3code/speed-up-ci-releases

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

CI 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.

Reviewed by Cursor Bugbot for commit 828e522. Bugbot is set up for automated code reviews on this repo. Configure here.

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 t3 and mobile dependency graphs; release preflight installs only scripts
  • The Linux release build now archives the server dist directory as a CLI artifact, and publish_cli downloads it instead of rebuilding t3
  • Sets declaration to false for the main and preload bundles in vite.config.ts so generated .d.ts files are omitted from desktop output
  • Risk: publish_cli now depends on the Linux build artifact being present and correctly archived; a missing or stale dist tarball will fail the publish job

Macroscope summarized 828e522.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.3 KiB 13.4 KiB +147 B (+1.1%) 15.1 KiB ✅
Codex Thread snapshot wire 6.9 KiB 6.9 KiB +5 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +142 B (+2.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 55.6 KiB 57.0 KiB +1.4 KiB (+2.6%) 66.4 KiB ✅
Codex Live turn messages 10 10 0 (0.0%) 21 ✅
Claude Total thread wire 13.2 KiB 13.5 KiB +306 B (+2.3%) 15.1 KiB ✅
Claude Thread snapshot wire 6.9 KiB 6.9 KiB +3 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.3 KiB 6.6 KiB +303 B (+4.7%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 55.5 KiB 57.8 KiB +2.3 KiB (+4.2%) 66.4 KiB ✅
Claude Live turn messages 8 10 +2 (+25.0%) 21 ✅

Baseline: 04efa79 · PR result: 828e522 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

@macroscopeapp

macroscopeapp Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg

t3dotgg commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

This is a valid human approval request. I verified the artifact handoff at 93d148b8a8a607f0a29c493d55b52150c3c70606 in 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.38 and nightly 0.0.39-nightly.20260901.9999, the server bundle from vp run build:desktop followed by the exact production or nightly brand helper matched the former vp run --filter t3 build path 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-run with 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_cli restores 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.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
@juliusmarminge juliusmarminge self-assigned this Oct 19, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

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.

@juliusmarminge

Copy link
Copy Markdown
Member

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.

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

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). 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.

2 participants