Skip to content

ci: prepare independent native architecture cache retention - #1723

Merged
zackees merged 5 commits into
masterfrom
infra/1269-native-architecture-retention
Oct 25, 2026
Merged

zackees merged 5 commits into
masterfrom
infra/1269-native-architecture-retention

Conversation

@zackees

@zackees zackees commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Refs #1801 and #782, under #1667. Original incident/report: #1269. Draft hold: do not merge until global allocation/transport is reconciled. No second issue selected.

Defect and candidate

The trusted queue janitor actually deleted current Windows x64 seed9320261567 while retaining ARM64 under a pooled800MiB family (run39727319824/job119654117873). Earlier pinned replay also selected a current macOS architecture seed. Split native retention into independent Windows x64/ARM64 and macOS x86_64/ARM64 first-match families, with honest allowances above observed archives.

No cache keys/paths, working limits, trust/writers, workflow or build/test coverage changes. Tests now resolve actual native workflow matrices, including release include rows, so specific-family checks do not rely on generic unresolved prefixes.

Allocation hold

Native declarations:1,363,148,800→4,254,701,977 bytes. Total declarations:13,542,359,039→16,433,912,216 bytes, 5,696,493,976 above10GiB. Separate newest-entry protection does not create storage or guarantee retention during writer bursts. This is a prepared candidate, not production adoption or a global capacity fix. Keep draft pending an honest total allocation/transport decision. No paid capacity or hidden external storage.

RED → GREEN and evidence

  • RED ce50253e1: two focused cases fail on shared/undersized families and unresolved native matrix keys.
  • GREEN 036f8bd14:15 focused stdlib CI tests passed.
  • Full ./lint: PASS84.3s.
  • Pinned production janitor replay over identical real inventory: before selects current Windowsx64 and macOSARM64; candidate keeps all four. Explicitly synthetic older-entry fixture: all four older same-architecture entries reclaimable, current seeds protected. No delete callback.
  • One primary clud-review reviewer: no code findings; one low documentation ambiguity corrected to attribute SUCCESS only to the completed janitor job, not the still-active parent run.
  • Compressed reproducible inputs/configs/reports, real job metadata/log hash/excerpts and replay command retained in docs/ci-evidence/2026-10-22-native-architecture-retention.*.

The #1715 pruned Flatpak rebuild and #1712 capacity probe are separate experiments. This policy candidate adds no full workflow dispatch. Global allocation, actual adopted sweeps/consumers and representative durability remain incomplete; remaining capacity/disposition work is tracked in #1801; platform qualification remains with #782.

Capacity disposition under #1801

Revise; do not adopt this candidate unchanged. The per-architecture retention defect and saved RED/GREEN evidence remain valid, but this candidate does not fit the existing global budget. Keep it draft and unqueued until an evidence-supported allocation or transport decision addresses all current writers, architecture variants, growth and overlap. Do not reduce working limits merely to make declarations fit: the recorded 350M Windows trial nearly doubled rebuild time.

#1826 retires only the unused standalone Flatpak reservation (209,715,200 bytes); it does not provide native capacity. If that bounded change lands, this candidate would still declare 16,224,197,016 bytes, 5,486,778,776 bytes above the unchanged 10 GiB budget. Those are conditional configuration arithmetic, not observed occupancy or guaranteed retention.

Native release transport remains default-off pending strict compiler reuse, freshness and cost qualification. No paid storage, global budget increase, extra validation lane, or weaker profile matching is authorized by this disposition.

@zackees

zackees commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master (was 69 behind). Master's #1782 moved the native seed keys to windows-ccache-${{ steps.native-seed.outputs.suffix }}/macOS-xcode-…, which broke the 'every cache key has a family' check against the split families. native_cache_seed.py still puts the architecture first in the suffix, so the split stays correct. The test resolver now expands the suffix from the job's matrix. Locally: ci/test_ci_toml.py 16/16, full ./lint passes. The draft hold on global allocation is unchanged.

@zackees
zackees force-pushed the infra/1269-native-architecture-retention branch from 036f8bd to 846dae4 Compare October 22, 2026 21:17
@zackees

zackees commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

Per maintainer: the cache key binds to its family dynamically. Removed the static resolver that parsed the native-seed suffix out of the workflow matrix. test_every_cache_key_has_a_family now accepts a runtime-bound key when any family sits under its literal part (windows-ccache- → windows-ccache-x64-/-arm64-), and the janitor assigns the actual key at runtime. ci/test_ci_toml.py 16/16 and full ./lint pass.

…ecks (#1269)

Master (#1782) keys native seeds by a computed suffix whose first component
is the job architecture; resolve it from the job matrix so the split
per-architecture families still cover every key.
…ly (#1269)

Replaces the static native-seed suffix resolver: a key whose suffix is a
runtime expression is covered when any family sits under its literal part;
the janitor assigns the actual key at runtime.
@zackees
zackees force-pushed the infra/1269-native-architecture-retention branch from cd7ea89 to ae30cb8 Compare October 25, 2026 19:31
@zackees
zackees marked this pull request as ready for review October 25, 2026 19:31
@zackees

zackees commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

The maintainer lifted the draft hold and asked for this to merge. I rebased it onto master (on top of #2287's cache resizing), and ci/test_ci_toml.py passes (16 tests). It is queued once CI is green.

@zackees
zackees enabled auto-merge October 25, 2026 19:31
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In progress to In review in obs-rust Multiview Oct 25, 2026
@zackees

zackees commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

Coordinator review: the split matches #1269. Each Windows and macOS architecture gets its own LRU family, so a pooled family can no longer evict a current x64 seed to make room for ARM64. Test coverage resolves the real workflow matrices.

One thing to know, which doesn't block the merge you asked for: at this head the family max values add up to about 17.5 GB, against the global [cache] budget = "10GB". So the family caps aren't reservations. The final cache-janitor still evicts LRU across all families down to 10 GB, and under write bursts a native seed can still be evicted by global pressure. The body's "Draft hold" and "Allocation hold" paragraphs predate the hold being lifted; worth updating them so the squash message isn't misleading.

@zackees
zackees added this pull request to the merge queue Oct 25, 2026
Merged via the queue into master with commit 6c17a60 Oct 25, 2026
31 checks passed
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Oct 25, 2026
@zackees
zackees deleted the infra/1269-native-architecture-retention branch October 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant