ci(release): desktop builds stop hitting the npm registry for staged installs #26458
main fromrefs/pull/26458/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubDesktop release builds still depended on the npm registry, and it has been stalling on the Blacksmith runners. In the 07:40 nightly, one metadata request (registry.npmjs.org/electron) took 851s, so the Linux x64 build spent 14 minutes in one install.
Two installs in release-desktop.yml have no lockfile:
- the CLI archive's runtime packages (
scripts/build-cli-archive.ts) - the staged desktop app, plus the Windows server sidecar (
scripts/build-desktop-artifact.ts)
So each build asks the registry about about 90 packages and downloads platform packages the workspace store doesn't have.
Fix: those two steps now share a cached pnpm metadata folder and a dedicated package store, and run with prefer-offline. With a warm cache, pnpm only contacts the registry for a package or version the cache lacks.
- The cache restores the latest entry for the same platform, architecture, and ISO week. A new week starts cold, so version ranges are never more than a week stale.
- It saves under a new key only when an install added registry metadata or package files, so warm runs write nothing. Each entry is about 42 MB.
- The workflow keeps the build scripts unchanged and only sets
pnpm_config_cache_dir,pnpm_config_store_dir, andpnpm_config_prefer_offlineon those two steps.
Proof:
- Probe of the real
release-desktop.ymlon all 6 targets (unsigned, with pnpm logging every request; branch and caches since deleted):- Cold: about 92 registry requests per target. Each target saved its cache.
- Warm: 0 registry requests and 0 downloads on all 6 targets. Nothing re-saved. Builds, Windows verify, and both launch checks passed.
- Local tests with pnpm 12.14 under
strace:- A warm cache with
prefer-offlinemade 0 network connections. - A warm cache without
prefer-offlinestill made about 68 connections, so the flag is needed. - A package or version missing from the cache fetched only that package and installed it.
- A warm cache with
- actionlint shows no new findings.
vp run check:changedpasses.
Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
- 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:M
Approvability#
Verdict: Approved at
d9237f4Macroscope's review found this PR approvable — Desktop and CLI staging installs now reuse a platform-specific weekly pnpm cache to avoid repeated registry requests. Registry fallback remains available, and reported cold/warm tests across all six targets support the change's limited build-time risk.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).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 0 B (0.0%) 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 0 B (0.0%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 21.6 KiB 21.6 KiB 0 B (0.0%) 24.4 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.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅ Claude Live turn messages 2 2 0 (0.0%) 8 ✅ Baseline:
eb751fa· PR result:d9237f4· 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.
- 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.
No actionable comments were generated in the recent review.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: t3/desktop-stage-install-offline
- File: .coderabbit.config.ts
- Commit: d9237f4
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
0dd23c6e-2b1d-4e6e-b371-2fb51dacd44b
Commits-
Reviewing files that changed from the base of the PR and between eb751fa0730d6a51d56547cb7fcaf4822a7e0e3b and d9237f413b2d3f012569e620aa1ad3ec060c8602.
Files selected for processing: 1-
.github/workflows/release-desktop.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
-
Walkthrough
-
The desktop release workflow now restores a staged pnpm cache keyed by platform, architecture, and UTC week. The CLI archive and desktop artifact builds use the staged cache and store directories in prefer-offline mode. The workflow saves the cache when files have changed.
Changes: Desktop release cache
Priority:Layer / File(s) Summary Stage and use the cache
.github/workflows/release-desktop.ymlThe workflow restores a weekly staged pnpm cache and configures the CLI archive and desktop artifact builds to use its cache and store directories in prefer-offline mode. Save updated cache
.github/workflows/release-desktop.ymlThe workflow saves the staged cache only when files newer than the marker are found. NormalEstimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#26362: Both changes add caching to the desktop release workflow, for different dependency-related requests.
- pingdotgg/t3code#26305: Both changes update dependency setup in the release workflow.
Suggested reviewers:
pixpmusic,jahands,juliusmarminge
Merge Risk:
Minimal · up tod9237-
No actionable merge-blocking risk was identified.
Pre-merge checks:
3 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Description check The description covers the problem (registry stalls on Blacksmith runners, with a specific 851s metadata request), the change (shared pnpm cache and store, prefer-offline, weekly cache key, save-on-ch… Add the template headings: Problem, Change, Scope and approval, and Verification. Under Scope and approval, link the triaged issue or the maintainer discussion that approved this direction and scope, with the approval comment. If no prior i… Passed checks: 3 passed-
Check name Status Explanation Title check The title names the main change: desktop release builds stop fetching staged installs from the npm registry, using a cache and prefer-offline. It follows the conventional commit form and states the pr… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title names the main change: desktop release builds stop fetching staged installs from the npm registry, using a cache and prefer-offline. It follows the conventional commit form and states the primary change from the developer's perspective. The raw summary and objectives both describe a shared pnpm cache and prefer-offline mode for these installs, which matches the title.
-
Full details: Description check
-
Explanation
The description covers the problem (registry stalls on Blacksmith runners, with a specific 851s metadata request), the change (shared pnpm cache and store, prefer-offline, weekly cache key, save-on-change), and verification (a probe of all six targets, local strace tests, actionlint, and check:changed). It does not follow the template headings. It has no Scope and approval section that links a triaged issue or maintainer approval, or an explicit statement that the change qualifies for an exemption. The Verification section gives concrete results, and it names the model used, which the template asks for. The description is mostly complete, but the missing scope and approval information is a required element of the template.
Resolution
Add the template headings: Problem, Change, Scope and approval, and Verification. Under Scope and approval, link the triaged issue or the maintainer discussion that approved this direction and scope, with the approval comment. If no prior issue exists, explain why this qualifies as a focused configuration change of an existing capability. Under Verification, keep the existing results and state anything that could not be checked. Remove the trailing 'Created with Claude' attribution line or keep the model and harness note at the end of the Verification section as the template requests.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes