Skip to content
Source
Sign inSign up
pingdotgg/t3code

ci(release): desktop builds stop hitting the npm registry for staged installs #26458

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26458/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Desktop 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, and pnpm_config_prefer_offline on those two steps.

Proof:

  • Probe of the real release-desktop.yml on 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-offline made 0 network connections.
    • A warm cache without prefer-offline still made about 68 connections, so the flag is needed.
    • A package or version missing from the cache fetched only that package and installed it.
  • actionlint shows no new findings. vp run check:changed passes.

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

      Verdict: Approved at d9237f4

      Macroscope'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).
    2. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded21.6 KiB21.6 KiB0 B (0.0%)24.4 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.3 KiB1.3 KiB0 B (0.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
      ClaudeLive turn messages220 (0.0%)8✅

      Baseline: eb751fa · PR result: d9237f4 · 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.

    3. Review in Change Stack →

      No actionable comments were generated in the recent review.

      Recent review info
      Run configuration
      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

      Layer / File(s)Summary
      Stage and use the cache
      .github/workflows/release-desktop.yml
      The 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.yml
      The workflow saves the staged cache only when files newer than the marker are found.
      Priority: Normal

      Estimated code review effort: 2 (Simple) | ~8 minutes

      Change: Bug fix

      Possibly related PRs

      Suggested reviewers: pixpmusic, jahands, juliusmarminge

      Merge Risk: Minimal · up to d9237

      No actionable merge-blocking risk was identified.

      Pre-merge checks: Passed 3 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Description checkWarningThe 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 Passed checks: 3 passed
      Check nameStatusExplanation
      Title checkPassedThe 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 checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck 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
      Comment `@coderabbitai help` to get the list of available commands.

Sign in to join this conversation.