ci(cmux-tui): owned minis skip the Go and branch Rust caches that never restore

Merged
TE
6d ago
+88-0

On owned Mac minis, the cmux-tui macOS job (macOS lint and tests) now runs setup-go without the Actions cache. It also saves the cargo cache only from feat-cmux-next. Blacksmith VMs start empty, so they keep both caches as before.

Why (measured)

I sampled the 8 macOS lint and tests jobs on owned minis from 2026-10-29 14:30Z to 22:30Z, after setup-go landed in 58894451. The raw step timings and log excerpts are saved in the lane's scratch dir.

  • setup-go restored 0 of 8 times. In 6 jobs it downloaded the ~590 MB entry (about 63 s mean, up to 128 s) and then failed to untar it. The mini keeps its own ~/go/pkg/mod, which Go makes read-only, so tar fails with Can't unlink already-existing object: Permission denied and then Failed to restore. Each job then tried to save the entry again: 48 s mean, ending in Unable to reserve cache ... another job may be creating this cache.
  • rust-cache restored 0 of 8 times (No cache found.). Its key carries a hash of each mini's Rust environment, so minis produce different keys (ae76135b, b2523b1e, baf93c3c, ...). A branch dispatch can only read that branch's entries and the default branch's. Each branch save still took about 155 s (median 175 s).
  • These saves fill the repository's GitHub cache store. At 2026-10-30 01:30Z it held 9.79 GB of its 10 GB: 6.80 GB under v0-rust-cmux-tui-macos-* and 2.87 GB under setup-go-macOS-*. 7.69 GB of that was on branch refs that no other run reads. The store evicts by least-recent use, so these entries push out the shared ones, such as ghostty-zig-packages. Only runners outside Blacksmith write this store; Blacksmith runners use Blacksmith's own store.

Changes

  • .github/workflows/cmux-tui.yml (macos job):
    • setup-go sets cache: ${{ !contains(runner.name, '-glaeda') }}.
    • rust-cache sets save-if: ${{ !contains(runner.name, '-glaeda') || github.ref == 'refs/heads/feat-cmux-next' }}.
    • contains(runner.name, '-glaeda') is the repo's existing test for an owned mini; 12 other steps use it.
  • tests/test_cmux_tui_owned_mini_caches.py pins both conditions. It is registered in tests/test-execution.toml (linux-guard) and run from ci-guards.yml.

Performance

Per owned-mini macOS lint and tests job. "Before" is the 8-job sample from 2026-10-29, at base 58894451 and later. "After" is a dispatch of this head on this branch.

metricbeforeafterdeltaharness or run link
setup-go step62.5 s mean (0/8 restored)AFTER_GOAFTER_GO_DELTAbefore: jobs 123671398605, 123684093131, 123664698315, 123684118038, 123732090143, 123772035002, 123660185485, 123653593592; after: AFTER_RUN
post setup-go (save attempt)47.8 s meanAFTER_POSTGOAFTER_POSTGO_DELTAsame
post rust-cache on a branch (save)155.5 s mean (0/8 restored)AFTER_POSTRUSTAFTER_POSTRUST_DELTAsame
GitHub cache store written per branch dispatch0.6-0.9 GB rust + 0.6 GB go0 GB-1.2 to -1.5 GB/actions/caches listing, 2026-10-30 01:30Z

Restore hit rate on owned minis is 0% before and after. The change removes time and store space spent on restores that never succeed; it does not add hits. feat-cmux-next still saves the cargo cache that branches read.

Risk

This is CI only, and touches only the macOS job of cmux-tui.yml. If an owned mini lacks Go's module cache, go build downloads the modules, as the fleet step cmux-tui-rust-check.sh already does. Blacksmith macOS runs keep both caches unchanged.

Verification

  • python3 tests/test_cmux_tui_owned_mini_caches.py: OK.
  • python3 tests/test_ci_rust_cache_keeps_runner_bin.py: ok (25 steps).
  • bash scripts/ci/tests/cmux-tui-rust-check.test.sh: ok.
  • actionlint on both changed workflows: clean.
  • tests/test_ci_test_execution_registry.py has 2 failures that fail the same way on base: test_verify_local_jobs_option_keeps_recipe_tests_live and test_cli_product_lane_selects_the_hook_spool_regression.

Part of cmuxterm-hq#5230 row "Blacksmith Actions cache ... cache inspection". The report half of that row is a separate PR into main, which adds an Actions cache section to the CI health report.

risk: normal (CI only)

šŸ¤– Generated with Claude Code

Agent session: agent session


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Owned Mac minis in the cmux-tui macOS job now skip caches that never restore on them, saving job time and space in the repository's GitHub cache store.

  • On an owned mini, setup-go's cache failed to restore in 8 of 8 sampled jobs: the mini keeps its own read-only ~/go/pkg/mod, which tar can't overwrite, so each job still downloaded the ~590 MB entry (~63 s) and re-saved it (~48 s).
  • The cargo cache key hashes each mini's Rust environment, so branch dispatches never read those entries; each save took ~155 s and filled ~70% of the 10 GB store, evicting shared caches.
  • setup-go now sets cache: ${{ !contains(runner.name, '-glaeda') }}; rust-cache saves only from feat-cmux-next. Blacksmith VMs start empty and keep both caches.
  • Adds tests/test_cmux_tui_owned_mini_caches.py, registered in tests/test-execution.toml under the linux-guard lane, to pin both conditions.