Skip to content

ci: keep the runner account out of the SwiftPM manifest cache key - #14282

Merged
teamleaderleo merged 2 commits into
mainfrom
ci/swiftpm-manifest-cache-user-independent
Sep 24, 2026
Merged

teamleaderleo merged 2 commits into
mainfrom
ci/swiftpm-manifest-cache-user-independent

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Compile admission jobs on the glaeda Mac minis restore the SwiftPM manifest cache from #14257 but still evaluate every manifest. Their resolves take 52 to 56 s, against 13 to 21 s on Blacksmith macOS 26 in the same window (PR runs created 19:07 to 20:40Z).

For example, admission job 107819765887 on cmux11s-mac-mini-glaeda logged "Installed 162 SwiftPM manifest cache entries" (same Xcode 26.6 prefix), then resolved cold.

The cause is the fixed resolve environment in scripts/ci/swiftpm-manifest-cache.sh run. It kept HOME, USER and LOGNAME, and SwiftPM keys every manifest on the whole environment. Those three name the runner account: runner on Blacksmith, cmux on the minis. This drops them.

Without HOME, SwiftPM finds the same ~/Library/Caches/org.swift.swiftpm through the user database. I checked locally with xcodebuild:

  • A resolve with no HOME, USER or LOGNAME succeeds.
  • It writes to the usual manifest.db.
  • A second run hits.
  • Adding HOME back creates a separate entry.
  • A resolve that fetches a remote package over git also succeeds without HOME.

install, stage and a new clear (used by both seeders) find the cache directory through the user database too, so they agree with xcodebuild even on a runner that points HOME elsewhere.

The script's hash is part of the cache key, so current seeds stop matching exactly:

  • seed-derived-data.yml reseeds the macOS 26 pool on the next main push that changes the build.
  • seed-swiftpm-manifests.yml reseeds macOS 15 on its schedule.

Until then, readers restore the newest seed for their Xcode, which is now keyed differently, so resolves run as they did before #14257.

Tests: tests/test_ci_swiftpm_manifest_cache.sh now runs run under two different accounts and requires identical environments with no HOME, USER or LOGNAME. These also pass: test_ci_test_compilation_cache_seed.sh, and test_ci_canonical_build_root.py with a realpath TMPDIR.

Signed: Manifold g1 ✨ (run_swiftpm-manifest-cache-20260924)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • CI workflows now use a consistent process to clear and restore the Swift package manifest cache. The cache location can be set explicitly and no longer depends on the HOME, USER, or LOGNAME environment variables.
  • Tests
    • Expanded checks confirm cache operations use consistent environments and support a configured cache location.

The fixed resolve environment kept HOME, USER and LOGNAME, which SwiftPM
keys every manifest on. They name the runner account, so the glaeda minis
(cmux) restored the Blacksmith seed (runner) and still missed every
entry. SwiftPM finds the same ~/Library/Caches through the user database
without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c8caa972-e70f-4c8e-a2b0-0c70f2837d14

📥 Commits

Reviewing files that changed from the base of the PR and between 150ba9f and ab4c0a1.

📒 Files selected for processing (4)
  • .github/workflows/seed-derived-data.yml
  • .github/workflows/seed-swiftpm-manifests.yml
  • scripts/ci/swiftpm-manifest-cache.sh
  • tests/test_ci_swiftpm_manifest_cache.sh
 ____________________________
< Try...catch me if you can. >
 ----------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 24, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@teamleaderleo
teamleaderleo merged commit f6b3f4a into main Sep 24, 2026
49 of 50 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 24, 2026
5eb6722 Scope shell command history per terminal surface (manaflow-ai#13851)
f6b3f4a ci: keep the runner account out of the SwiftPM manifest cache key (manaflow-ai#14282)
150ba9f fix(ios): use focused still photos for pairing onboarding (manaflow-ai#14266)

# Conflicts:
#	.github/workflows/ci-guards.yml
#	.github/workflows/seed-derived-data.yml
#	.github/workflows/seed-swiftpm-manifests.yml
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Measured after the reseed. Push seed 36059263610 saved under the new key at about 21:10Z. The table covers PR runs created 21:55Z to 22:55Z.

lane runner resolve
admission Blacksmith macOS 26 14 to 19 s, median 15 s (n=11)
admission glaeda minis 13 to 16 s (n=4); before this PR: 52 to 56 s
cli-pipe-regressions Blacksmith macOS 26 13 to 18 s, median 14 s (n=6)
cli-pipe-regressions glaeda mini 41 s (n=1)

Before #14257, the medians were 63 s for admission and 48 s for cli-pipe.

The minis now hit the Blacksmith seed for admission, which resolves at the fixed canonical root. cli-pipe-regressions resolves in the runner workspace. That path differs between a mini (/Users/cmux/actions-runner-glaeda/_work/...) and Blacksmith (/Users/runner/_work/...), and each manifest's cache entry includes its absolute path, so it still misses there. No PR jobs landed on the macOS 15 pool in this window. Its seed (#14272) saved at 21:03Z.

Signed: Manifold g1 ✨

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