Skip to content

base autofix: make the action exports on the newest tip (base red: no action export since 02:14Z) - #23453

Merged
teamleaderleo merged 6 commits into
feat-cmux-nextfrom
claude/autofix-action-exports-on-tip
Oct 21, 2026
Merged

teamleaderleo merged 6 commits into
feat-cmux-nextfrom
claude/autofix-action-exports-on-tip

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Base red: ActionSurfaceParityTests.reportIsFresh (stale plans/cmux-next/action-surfaces.json and actions.md). No action export has landed since 02:14Z on 2026-10-21. Reported by omnibox-auto-2.

Why. After #23352 the Mac exports job gets a runner and finishes green, but base-autofix-push.sh judged the action exports from the run's own commit. The job queues for up to half an hour, and the actions area moves every few minutes, so every run held them:

The settings exports already had a "made at the newest tip" path (#23249, #23315). The action exports did not.

Fix

  • New scripts/cmux-next/base-autofix-action-exports.sh (the Mac step):
    • when the actions area moved while the job queued, it checks out the newest tip and builds there first;
    • after each regeneration it reads the tip again, and regenerates on the new tip while the area keeps moving (3 times in all);
    • it prints made at: SHA, hands on the export files that differ from the run's commit, and leaves the checkout at the run's commit (prepared again) for the settings step.
  • base-autofix-push.sh judges the action exports from ACTIONS_MADE_AT, as it judges the settings exports:
    • they land whole, as made there, when nothing after that commit moved the actions area or wrote one of them;
    • a made-at commit that isn't between the base and the tip holds them, with an error.
  • Narrower holds. An action export's inputs are the actions area only, so moves in the shortcuts and app-host areas (for example first-party-apps/ or the docs-shortcuts exporter) no longer hold the exports. They still hold the files built from them, and a held export still holds what is built from it.
  • Files built from the exports, made again on the tip. This covers `web/data/cmux-shortcuts.generated.json` (the "keyboard-shortcuts docs freshness" base red), the app-host generated files and `schemas/defaults/cmux-next.json`.
    • They are built at the run's commit, so a CmuxNextActions move during the run holds them at the first push even when the exports made after that move land.
    • `base-autofix-land.sh` now remakes them in its round on the tip when the tip's action exports are known current: none was held, and nothing after `ACTIONS_MADE_AT` moved their inputs (the exports this run just landed don't count as a move).
    • The snapshot also needs the tip's settings stamp to be current (`defaults_guard.py check-stamp`).
    • `base-autofix-repair.sh` builds them from the tip's committed exports when it is told they are current.
  • Wiring. base-autofix-land.sh passes the made-at commit to the push. The workflow gives the step a 40-minute timeout and the Mac job 90 minutes, since it can now regenerate up to three times for actions and three for settings.

Tests. 16d638c is the red commit:

  • new scripts/cmux-next/tests/base-autofix-action-exports.test.sh, wired into cmux-next.yml:
    • push cases: the cmux NEXT: view a Claude Code or Codex session without taking it over #21921 pattern lands; a move after made-at holds; a newer write holds the whole export; an unproven made-at holds; exports land whole; a shortcuts-exporter move does not hold them;
    • land.sh passes the made-at commit on;
    • Mac-step cases: unmoved; moved while queued (one build, on the tip, prepared, checkout restored); moved once; moved elsewhere; always moving (fails after 3, hands on nothing); a failed regeneration;
  • tests/test_cmux_next_base_autofix_finishes.py: workflow wiring. The Greptile ci(base autofix): land the files of untouched areas when another area moved #22474 case (a shortcuts file never lands without its export) now uses an actions-only input, and a new case checks that an app-host input change lands the export together with its shortcuts file.

Red on 16d638c (base code):

bash scripts/cmux-next/tests/base-autofix-action-exports.test.sh  # FAIL: action exports made at the moved tip did not land
python3 tests/test_cmux_next_base_autofix_finishes.py             # FAILED (failures=1)

Second red commit: b6bde59. Cases 8 to 11 cover the files built from the exports on the tip; case 18 covers a failed checkout of the tip, which a review found was ignored under `||` and is fixed in 8edd4eb. Case 8 fails when run against the 7f7c5bf scripts.

Green on 8edd4eb: both pass, and base-autofix-push.test.sh, base-autofix-land.test.sh, base-autofix.test.sh, test_cmux_next_pr_autofix_settings.py and test_ci_session_label_routing.py still pass. actionlint is clean and the prepush gate reports no new violations.

Observed / Not run

  • Observed: the commands above, red then green, on huge-blue. The run ids and hold messages come from omnibox-auto-2's report; I read the push script's hold paths against them.
  • Not run: a real feat-cmux-next Mac run of the new step (the first run after merge; I'll report the first run that lands the action exports), and shellcheck (not installed here). The remade shortcuts, app-host files and snapshot on the tip are covered only by the stand-in repair in the tests; the real bun generators run on CI only.

Changelog

none

Agent session: huge-blue

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 21, 2026 13:54
…m from there

No action export landed after 02:14Z on 2026-10-21 (ActionSurfaceParityTests.reportIsFresh red on
base). Once #23352 stopped the Mac job being replaced, it finished green, but base-autofix-push.sh
judged the exports from the run's own commit: the job queues for up to half an hour and the actions
area moves every few minutes, so every run held them (runs 39607727081, 39609533631).

- scripts/cmux-next/base-autofix-action-exports.sh (the Mac step): starts on the newest tip when the
  actions area moved while the job queued, regenerates there again while it keeps moving (3 in
  all), prints "made at: SHA", and leaves the checkout at the run's commit for the settings step.
- base-autofix-push.sh judges the action exports from ACTIONS_MADE_AT, as it does the settings
  exports: they land whole as made there when nothing after it moved the actions area or wrote
  one of them. Their own inputs are the actions area only, so the shortcuts and app-host areas no
  longer hold them (they still hold what is built from them).
- base-autofix-land.sh hands ACTIONS_MADE_AT to the push; the Mac job gets 90 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by land-and-ci on huge-blue · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review a1ea818: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23453 -f ref=claude/autofix-action-exports-on-tip -f platform=macos -f backend_mode=local

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-6ta4l created for this PR by the cmux coordinator.

teamleaderleo and others added 2 commits October 21, 2026 14:11
…a failed checkout of the tip fails the Mac step

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue
…ain on the tip

The docs shortcuts (the "keyboard-shortcuts docs freshness" base red), the app-host files and the
defaults snapshot are built from the action exports at the run's commit, so a CmuxNextActions move
during the run held them even when the exports made after it landed, and the next run held them
the same way. base-autofix-land.sh now makes them again on the tip when the tip's action exports
are known current: none was held and nothing after ACTIONS_MADE_AT moved their inputs (the exports
this run landed are no move). The snapshot also needs the tip's settings stamp current.
base-autofix-repair.sh builds them from the tip's committed exports when told so.

Review fix: base-autofix-action-exports.sh's check_out runs under `||`, where set -e is off, so a
failed checkout of the tip went on and named exports made at the old commit as made at the tip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 23 of 23 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

teamleaderleo and others added 2 commits October 21, 2026 14:16
…ed by a guard that finds its repository like the real one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue
… in its checkout

Review fix: base-autofix-land.sh ran a copy of defaults_guard.py from a temp directory, but the guard
finds the repository from its own path; there it read no stamp, noted it and passed, so a stale
settings stamp never held the defaults snapshot. The round now checks the tip out first, runs the
tip's guard there, and also needs the tip to have a stamp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at a1ea818

Covers the whole PR at this head, after two FIX rounds:

  • At 7f7c5bf: a failed git checkout of the tip was ignored under || in base-autofix-action-exports.sh. Fixed in 8edd4eb, with test 18.
  • At 8edd4eb: base-autofix-land.sh ran a copy of defaults_guard.py from a temp directory. The guard finds its repository from its own path, so the copy read no stamp, noted it and passed, and a stale settings stamp never held the defaults snapshot. Fixed in a1ea818: the round checks out the tip, runs the tip's own guard there, and requires the tip to have a stamp. Test 9 now uses a guard that finds its repository the same way.

What the review checked:

  • Made-at judgement: the action exports are judged from ACTIONS_MADE_AT and their output areas are narrowed to actions. Their inputs are exactly that area; the shortcuts and app-host areas still hold what is built from them.
  • "Known current" for remaking the shortcuts, app-host files and snapshot on the tip:
    • an export held earlier is in waits;
    • first_repair holds the full regeneration made at M, so ignoring export paths equal to it hides no input move;
    • later rounds never write the exports.
  • Moving the checkout earlier: no exit path changes. A non-hold exit returns before it, and the round-limit and nothing-left exits leave the checkout on the tip, which nothing reads.

Runs, all passing:

  • base-autofix-action-exports.test.sh, base-autofix-push.test.sh, base-autofix-land.test.sh, base-autofix.test.sh;
  • test_cmux_next_base_autofix_finishes.py, test_cmux_next_pr_autofix_settings.py;
  • actionlint.

Nits, left for later:

  • a failed checkout of the tip in land.sh stops with only git's own error;
  • defaults_guard.py passing on an unresolvable ref is a trap for other callers and deserves its own PR.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Reds at a1ea818 are base findings, not this PR's (it changes no webviews or Swift files):

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant