base autofix: a queued Mac export job keeps its place (base red: no export since 02:14Z)

Merged
TE
16d ago
+251-20

Base red, priority zero (coord-deputy). The cmux-next base autofix has not landed a Mac export since 02:14Z. schemas/settings/settings-schema.json on feat-cmux-next still says chief-pet where the source says chief (#22848), so settings/categories.test.ts fails on every webview run.

Why the Mac job never started. From 11:15Z to 11:36Z every run's action exports (Mac) job had a start time and no runner, and was cancelled 3 to 4 minutes later. Runs 39590571817 through 39592618210 are examples. The job's concurrency group (cancel-in-progress: false) never cancels a running job, but it replaces a pending one. With the Mac std runners saturated, each job waited minutes for a runner, and the next push, a few minutes later, replaced it before it started. #23315's fixes for a running Mac job never got the chance to apply.

Fix

  • action-exports has no concurrency group, so a queued job keeps its place.
  • A new step in action export areas, scripts/cmux-next/base-autofix-mac-busy.sh, skips this run's Mac job while another run's Mac job is queued or running. That job regenerates the settings exports on the newest tip when it starts (#23249).
  • A run that skipped its Mac job fails at the end ("Mac exports deferred to the run already making them"). The next run diffs from the last successful run, so its changes stay in the next run's range.
  • A failed API read starts the Mac job: two Mac jobs beat none. Two runs checking at the same moment can also both start one.

Also fixes my own base red from #23315: tests/test_cmux_next_pr_autofix_settings.py SettingsOnlyArtifactLeavesTheActionFollowers. Three base subtests fail with exit 127 in cmux-next checks at 92c12bc5 (seen on #23330). #23315 moved the base Repair step into scripts/cmux-next/base-autofix-repair.sh, which reads EXPORTS_DIR from the step env. The test ran the step's script without that file or env. That job was already red on base for other reasons, which hid this on #23315.

Test

Red commits first:

  • 51e1cea9f809 fixes the test itself. It was red on base: python3 tests/test_cmux_next_pr_autofix_settings.py, FAILED (failures=3), base-autofix-repair.sh: No such file or directory.
  • 926833dad0ed adds the queue tests. python3 tests/test_cmux_next_base_autofix_finishes.py against base's workflow gives FAILED (failures=8):
    • the Mac job has no group;
    • a run skips its Mac job while one is in flight;
    • a deferred run fails;
    • base-autofix-mac-busy.sh with a gh stand-in: another run's queued, waiting or in-progress Mac job counts; its own, a completed one or none doesn't; an unreadable API starts the job.

Green at the head: both files OK (27 and 6 tests), and actionlint on the workflow is clean.

Observed / Not run

  • Observed: the tests above, red then green, on huge-blue. The job timings above come from the Actions API.
  • Not run: a real feat-cmux-next run of the new workflow. After this merges I'll do one glaeda-gh wait on the first run whose Mac job finishes. Then I'll check that settings-schema.json says chief on base and that settings/categories passes, and report both.
  • tests/test_ci_no_shallow_dev_fetch.py fails in this sparse checkout only (a file not checked out).

Changelog

none

Agent session: huge-blue

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the base autofix pipeline so a queued Mac export job keeps its place instead of being replaced by the next push, and a deferred run passes its changes to the next run instead of losing them.

  • Removes the action-exports job's concurrency group; a queued job now waits for a runner indefinitely.
  • Adds base-autofix-mac-busy.sh, which skips this run's Mac job when another run's is queued or running.
  • A run that deferred its Mac exports ends green with a "Mac exports deferred" job naming the run that carries them; base-autofix-since.sh makes the next run diff from the newest successful run that made its own exports, so the deferred run's changes stay in range.
  • Fixes SettingsOnlyArtifactLeavesTheActionFollowers failing on base by giving the test the step env after #23315 moved Repair into base-autofix-repair.sh.
  • Registers test_crash_class_fast_gate.py in test-execution.toml, which #23331 left out.