Repository navigation
ci: narrow churny cache keys and move PR-local cache saves to main - #34600
Conversation
|
No actionable comments were generated in the recent review.
|
5dc80d1 to
6862afb
Compare
b0efaf0 to
eae9564
Compare
Its three parallel real-Git lanes, two of them through Docker, push git-binary-compatibility.test.ts past the 30s test timeout on the 4-vCPU hosted runner (64s file time vs 14s), failing PR #34600 twice after #34566. Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
eae9564 to
d65ee7f
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Hash dependency edges in the native cache digest. · native-dependency-lock-digest.mjs:78-83
config/scripts/native-dependency-lock-digest.mjs:78-83
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHash dependency edges in the native cache digest.
node-ptyusesnode-addon-apiduring its native build. If its lockfile edge changes fromnode-addon-api@7.1.1tonode-addon-api@7.1.0while both snapshots remain selected,nativeDependencyClosure()returns the same snapshot set. The cache key remains unchanged.The cache restores
node-pty/build, while runtime validation checks loadability and patched behavior. It does not check whichnode-addon-apiheaders produced the binary. The cache can therefore reuse a build made with the old headers after the lockfile selects the new headers.Include parent-to-child dependency edges in the digest input while retaining the snapshot closure for workspace-setting filtering.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d269612a-ed75-45b3-aad4-23c75b3ca350
Files selected for processing: 6-
.github/actions/prepare-windows-agent-hook/action.yml.github/actions/prepare-windows-cli-launcher/action.yml.github/workflows/ci-cache-warmup-platform-jobs.yml.github/workflows/ci-cache-warmup-platforms.yml.github/workflows/pr.ymlconfig/scripts/windows-rust-build-scope.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
Also adds config/scripts/native-dependency-lock-digest.mjs and windows-rust-build-scope.mjs, which main's synced actions call (#34600).
Also adds config/scripts/native-dependency-lock-digest.mjs and windows-rust-build-scope.mjs, which main's synced actions call (#34600).
…tablyai#34600) * ci: narrow native, launcher and packaging cache keys and stop PR-local saves * ci: hash Rust crate sources, not build outputs, in launcher and hook keys * ci: fail closed on unlocked native packages and cover transitive key inputs * ci: resolve the Windows Rust cache scope with a script, not a nested local action --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> (cherry picked from commit 2cd3e6d)
The Actions cache is capped at 10 GB. This PR narrows keys that changed far more often than their outputs did, and stops PR-scoped saves of entries that main now produces.
Key changes
native-modules-*pnpm-lock.yamlandpnpm-workspace.yaml, plus the scripts, patches and addon sourcesnative-dependency-lock-digest.mjs, which covers the locked closures of node-pty, @vscode/windows-process-tree, @electron/rebuild and node-gyp, the workspace addons' deps (node-addon-api), the Electron version, and workspace layout and build-approval settings. OS, image or libc scope, arch, runtime, Node and pnpm stay in the key.orcad-windows-prebuild-v2-*version, the lockfile, the workspace file andImageVersionbuild:orcad-prebuildsandbuild:packagesscripts, the existing build-script and patch list, andImageOSorcad-windows-cli-launcher-v2-*,windows-agent-hook-v2-*,windows-cli-launcher-v2-*windows-pe-imports.mjsand the icon, plus rustc version and the package.jsonversion.restore-keysis the prefix up to and including rustc.electron-builder-{win,linux-*}-*hashFiles('pnpm-lock.yaml'), about 613 MB per lockfile changeWhy none of these can serve a stale binary:
patch_hash. A selected package missing from the lockfile makes the digest step throw instead of producing a key. Restored addons are still probed byensure-native-runtime. Of the 62 lockfile/workspace commits in 30 days, 60 produced distinct lockfile contents but only 14 distinct digests.windows-rust-executable-build.mjsreuses an exe only when its sha256 fingerprint matches: sources, Cargo.lock,.cargo/config.toml, build scripts, icon, app version and target triple. The fingerprint omits rustc, so rustc is in the restore prefix.--validatestill checks the module version, N-API, Node headers, the payload hashes, arch and the job-ownership patch before a restored slot is used.Saves moved to main
bun-*:no-cache: trueon every setup-bun.electron-package-*: PRs restore only on every OS. The macOS ARM64 archive is warmed by ci: warm GitHub-hosted runner caches and drop the serve-switch installer cache #34576.native-modules: PRs restore only.warm-windows-electron(windows-2022) is new, and package_windows no longer saves the Node ABI.The unit-module seal is not changed here. #34512 owns it.