Skip to content

ci: narrow pnpm cache keys and shallow development checkouts - #20370

Merged
nwparker merged 3 commits into
mainfrom
nwparker/ci-download-cache-checkouts
Sep 12, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/ci-download-cache-checkouts

Conversation

@nwparker

@nwparker nwparker commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​103 $\color{#cf222e}{\Huge{\mathbf{−}}}$​15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​88
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 $\color{#cf222e}{\Huge{\mathbf{−}}}$​15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

ELI5

Stop fetching unused Git history in development builds, and stop invalidating desktop dependency caches for mobile-only changes.

What Changed

  • Use depth-one daily, hourly, and adhoc build checkouts after verifying their version helpers need only HEAD.
  • Preserve full release-cut history and the adhoc trust mirror, including case-twin ref handling.
  • Scope the existing pnpm download cache to the root lockfile by default; mixed desktop/mobile jobs explicitly include both lockfiles.

Why

Development version helpers read HEAD and obtain published versions from the release API, so full checkout history adds unnecessary transfer. Desktop-only dependency jobs also needlessly missed caches when only the mobile lockfile changed.

Linked Issue

Part of #20366. Independent PR targeting main.

Visual Proof

N/A — CI configuration only; no application UI or interaction changes.

Testing

  • 80 focused cache, Git checkout/trust, native-runtime, release, and workflow tests passed in seven files on macOS after narrowing the change.
  • Real Git fixtures cover shallow checkout behavior and trust-mirror case handling.
  • Lint, formatting, workflow syntax, and commit hooks passed.
  • Original release-ref CI checks passed on both macOS and Windows. Hosted Linux checks remain queued; no required checks are configured/reported for the PR.

Measured impact

Four real network fetches of the same main revision (923858e0981667216826788ab7156294dfc5c755), ordered shallow/full/full/shallow, using single-branch main, no tags, and blob:none in both cases:

History Fetch times Median Pack bytes
Full 1.81s, 2.00s 1.90s 31,546,816
Depth one 0.80s, 0.72s 0.76s 832,590

Depth-one reduced history-transfer bytes by 97.4% and median fetch time by 60.2% (1.15s). This deliberately measures only the history cost on macOS, not checkout/materialization or full CI elapsed time. The original full checkout can fetch more refs and blobs, so this is a conservative comparison.

Desktop/mobile cache-key separation prevents unnecessary invalidation by construction; no additional cache restore step is added. Timing reports remain in /tmp/orca-ci-impact/checkout-* in the measurement workspace.

Review

Self-reviewed for versioning, publication gates, trust boundaries, and cross-platform compatibility. No application execution-host, SSH, folder-workspace, or wire changes.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer content is copied.

Notes

Measurement rejected the proposed mobile pnpm release cache: cold fetch was 22.44s versus warm fetches of 15.81s and 16.50s, but its 300 MB compressed store took 28.15s just to extract locally, before network transfer. Archiving also took 36.81s. That is not a demonstrated runtime win, so the addition was removed. New Gradle/CocoaPods caches are likewise deferred pending their own end-to-end evidence. The proposed release-cache signing adjustment was removed because it is not a demonstrated performance improvement and deserves separate review.

Runners, triggers, full release-cut history, existing release cache/signing behavior, publication gates, and explicit reruns remain unchanged.

Checklist

  • Focused scope and measured improvement documented.
  • Visual proof is N/A with a reason.
  • Cross-platform and SSH impact considered.
  • Local checks and remaining hosted-CI limitations documented.

@pullfrog

pullfrog Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

This run was cancelled 🛑

The workflow was cancelled before completion. Please check the link below for details.

Pullfrog  | View workflow run | via Pullfrog | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4cb925ca-3ddd-4212-97a1-15e311c349b9

📥 Commits

Reviewing files that changed from the base of the PR and between 923858e and c5aa16d.

📒 Files selected for processing (9)
  • .github/actions/install-node-dependencies/action.yml
  • .github/workflows/adhoc-mac-build.yml
  • .github/workflows/daily-mac-build.yml
  • .github/workflows/hourly-mac-build.yml
  • .github/workflows/mobile.yml
  • .github/workflows/pr.yml
  • config/scripts/ci-dependency-download-cache.test.mjs
  • config/scripts/workflow-ref-mirror-case-safety.test.mjs
  • config/scripts/workflow-ref-reachability.test.mjs

📝 Walkthrough

Walkthrough

The reusable Node dependency action now accepts configurable lockfile paths for pnpm caching. Mobile and pull request workflows pass both root and mobile lockfiles. Daily, hourly, and adhoc macOS workflows now use depth-1 checkouts. Tests validate cache configuration, shallow checkout behavior, build version identity, and vetted-commit reachability.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker nwparker changed the title ci: cache dependency downloads and shallow development checkouts ci: narrow pnpm cache keys and shallow development checkouts Sep 12, 2026
@nwparker
nwparker merged commit 4aa9329 into main Sep 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant