ci: seed the Swift package cache from main pushes - #14638
Merged
Merged
Conversation
seed-derived-data.yml already restores the `spm-` cache from R2 and runs canonical-resolve on every main push. On an exact-key miss it now copies the resolved packages from the canonical root back into the workspace, sanitizes them and saves them to R2 under the exact key, right after resolve and without failing the seed. A Package.resolved change gets a correct package seed from the next main push instead of the next nightly. The read-only guard allows this one writer and pins its conditions: main ref, exact-key miss, the canonical resolved copy as the source, the same store and key as nightly.yml, and placement directly after resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Merge receipt for
Labeled |
rustybret
pushed a commit
to rustybret/bmux
that referenced
this pull request
Sep 25, 2026
60d8ac1 Land ejc3's isolated defaults test from manaflow-ai#12598 (manaflow-ai#14504) e926f24 fix: resolve the terminal Copy guard through the Command-aware keyboard layout (manaflow-ai#10872) (manaflow-ai#13015) 0df2946 Fix startup-race crash in v2RefreshKnownRefs against a half-restored session (manaflow-ai#2751) (manaflow-ai#9627) 611eeac ci(e2e): queue E2E runs for the owned pool within CI_PR_POOL_QUEUE_ROUNDS (manaflow-ai#14640) 27b8cbc ci: seed the Swift package cache from main pushes (manaflow-ai#14638) be46dba ci: stop E2E from saving an unresolved Swift package cache (manaflow-ai#14632) 2486e99 ci: run-e2e.sh --wait asks glaeda-gh instead of polling GitHub (manaflow-ai#14622) 088034b ci(ios): queue test-ios runs for the owned pool within CI_PR_POOL_QUEUE_ROUNDS (manaflow-ai#14630) # Conflicts: # .github/workflows/main-regression-bisect.yml # .github/workflows/perf-activation.yml # .github/workflows/seed-derived-data.yml # .github/workflows/test-e2e.yml # .github/workflows/test-ios.yml # .github/workflows/test-macos-suite.yml
teamleaderleo
added a commit
that referenced
this pull request
Sep 25, 2026
#14638 taught the read-only guard to inspect seed-derived-data.yml, but test_ci_cache_restore_receipt.py runs that guard in a fixture that copied only ci.yml, ci-macos.yml and nightly.yml, so receipt-contract failed on main with FileNotFoundError for seed-derived-data.yml. The fixture now copies the whole .github tree the guard globs, and the contract also runs when seed-derived-data.yml changes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Follow-up to #14632. Only nightly.yml saves the
spm-package seed, and only on an exact-key miss. After aPackage.resolvedchange, every reader takes the prefix fallback and resolves online until the next nightly, which can be up to a day away.Change
seed-derived-data.ymlruns on every main push. It already restoresspm-<hash>from R2 and runscanonical-resolve. On an exact-key miss, and only on main, two steps now run directly after "Resolve Swift packages":${CMUX_CI_CANONICAL_ROOT:-/private/tmp/cmux-ci}/src/.ci-source-packagesback into.ci-source-packages(as nightly.yml does), then sanitize it.cache-saveto the same store and key as nightly.yml.Both are
continue-on-error, and they sit right after resolve, so a concurrency cancel of the long build cannot lose them. R2 saves are write-once per key (If-None-Match: *inr2-cache.sh), so matrix legs that race here are harmless. The first leg to finish resolving wins.tests/test_ci_pull_request_caches_are_read_only.pyallows only this writer. It asserts that the writer:Verification
python3 tests/test_ci_pull_request_caches_are_read_only.pypasses. Mutations fail it: dropping the main-ref condition, and replacing the rsync.tests/test_seed_derived_data.py,tests/test_ci_workflow_guards_are_wired.py,tests/test_ci_swiftpm_manifest_cache.shactionlintonseed-derived-data.yml🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Seeds the Swift package cache from main pushes so a
Package.resolvedchange gets a fresh seed immediately instead of waiting up to a day for the nightly job.seed-derived-data.ymlnow copies the resolved packages from the canonical root back into the workspace, sanitizes them, and saves them under the samespm-key and store nightly.yml uses.continue-on-error, so they run before a cancel can cut them off and never fail the seed.Written for commit 674e19a. Summary will update on new commits.