Repository navigation
CI: keep one generation of prefix-restored caches, share Core's pip cache - #14263
Merged
Merged
Conversation
…ache The repo sat at 50.2 of 50 GiB, so GitHub was evicting by last access. 14.8 GiB of that was second generations of pip-v2, uv and rust-cache entries. All three restore with a prefix fallback, so the older copy answers only an exact revert; a run whose key is gone still starts from the newest generation and downloads only what changed. The janitor now keeps 1 for those families (fe-dist, which has no fallback, still follows the keep input). consolidated-zoo runs the same core-cpu-setup install on the same matrix as consolidated but held its own ~1.4 GiB pip entry. It now restores consolidated's entry read-only and never saves, so there is one writer per key. The naming and budget tests allow exactly this borrower and fail if it saves, renames, or keys on different files.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
danielhanchen
added a commit
that referenced
this pull request
Oct 19, 2026
## Summary Main is over the startup bundle budget again, by 189 B raw, so `Frontend build + bundle sanity` fails on every PR based on it: ``` over the startup budget: raw 6682.2 KB > 6682.0 KB (main at 6ccf0e4) ``` #14258 set both limits to the measured build plus a 160 B raw / 189 B transfer margin. #11937 (a setting to hide the macOS menu bar icon) then added 349 B raw / 78 B transfer to the startup chunks, and merged without raising them. ## Cause #11937 adds strings to `i18n/locales/en.ts`, which ships in the startup chunks, and entries to the settings search index (`settings-search.ts`, `dialog-search-index.ts`). That is small real growth. I measured each commit since #14258 on its own: | tree | raw B | transfer B | |---|---|---| | `46e4f50bea` (#14258) | 6,842,183 | 2,060,321 | | `2b20770c91` (+ #11937) | 6,842,532 | 2,060,399 | | `f5e91f1ca5` (+ #14223) | 6,842,532 | 2,060,421 | | main `6ccf0e4e74` (+ #14232) | 6,842,532 | 2,060,400 | #14223 and #14232 add no raw bytes. #14021 and #14263 change no frontend code. ## Change - **`check-bundle-budget.ts`:** a BUDGET comment entry for #11937, and both limits moved to the measured build at main plus the same margin: - `rawBytes`: 6,842,343 -> 6,842,692. - `transferBytes`: 2,060,510 -> 2,060,589. ## Testing One machine and build, Node 24, exact byte totals from the budget script, 96 chunks. - **Main against the old limits:** `over the startup budget: raw 6682.2 KB > 6682.0 KB`. - **With this change:** `within budget (0.2 KB transfer, 0.2 KB raw to spare)`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repo's Actions cache is at 50.2 of its 50 GiB, so GitHub is evicting entries by last access regardless of whether they are live. That is the slow outcome for CI: the entry that goes can be main's pip cache or a multi-GB GGUF model, and the next run re-downloads it. This PR removes duplicate copies only; every family keeps its newest entry.
Where the space was
pip-v2-*: 11 job families, most with 2 generationsuv-*: 3 OSes x 2 generationsv0-rust-*: 4 jobs x 2 generationsSeven pip families (
consolidated,consolidated-zoo,repo-cpu-tests,studio-backendx2,mlx,llama-cpp-smoke) all key onpyproject.toml+studio/backend/requirements/*.txt, so every edit to those files writes a new generation in all seven at once (about 8.7 GiB), andkeep: 2then holds the previous set beside it.Changes
pip-v2-*,uv-*andv0-rust-*. All three restore with a prefix fallback (restore-keys: <prefix>in pip-cache-restore and uv-cache-restore; rust-cache's restore key is its key minus the lockfile hash), so a run whose exact key was pruned still starts from the newest generation and downloads only the wheels or crates that changed. The second copy only ever answered an exact revert, or a re-run on a merge ref older than the last requirements bump.pip-v2-notebooks-colab-*already worked this way; its special case is folded into the general rule.fe-dist-*has no fallback, so it still follows thekeepinput.consolidated-zoorestoresconsolidated's pip entry read-only. Both jobs run the samecore-cpu-setupcall on the same matrix (already asserted bytest_zoo_suite_parallel_isolation.py), so the separate ~1.4 GiB entry held the same wheels twice. The shared-name rule exists because two writers of one key race and the loser's extras are never saved; with the save step removed there is one writer and nothing to lose.test_pip_cache_naming.pygains aREAD_ONLY_BORROWERSallowlist and a test that the borrower restores only its owner's name, never saves, keys on the same files, and that the owner has exactly one saving job.test_cache_budget_discipline.pyaccepts restore-without-save for that one job only. The preamble-parity test now compares the restore step whole, name included.Verification
tests/studio/test_pip_cache_naming.py,test_cache_budget_discipline.py,test_zoo_suite_parallel_isolation.py,test_uv_cache_discipline.py: 279 passed.name: consolidated-zoofails 2 tests; putting back the zoo save step fails 2 tests.gh.Trade-off
A run that would have hit the older generation exactly now takes the prefix fallback and downloads the delta. That is a few wheels on a requirements bump, against a cache that otherwise sits over its ceiling and evicts live entries. The old
consolidated-zooentries are left for the janitor and GitHub's 7-day idle timer.