Skip to content

cmux-next guards: a stale settings export fails only the change that made it stale (defaults-snapshot base red) - #23056

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/defaults-stamp-own-sources
Oct 21, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
cmux/defaults-stamp-own-sources

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

cmux-next guards / defaults-snapshot is red on base and on every pull request into feat-cmux-next. #22877 (merged 04:02Z) did not fix it.

What drifted. On base 6143f81, check-stamp reports four settings sources as stale:

  • Localizable.xcstrings
  • NotificationModes.swift
  • NotificationPreferences.swift
  • SettingsSchema+Appearance.swift

Three merges landed those source changes without their exports:

No default changed. defaults_guard.py check --base C^ --head C lists nothing for any of the three commits. They changed help text and translations only, so nothing needs a call.

Why it stays red. The exports are meant to come from the base autofix after each merge. With merges minutes apart, those runs get cancelled or lag. Meanwhile check-stamp judges the whole tree, so every pull request inherits the base's stale stamp. Its message also pointed at a "REPAIR.md row" that this repository doesn't have.

What this changes.

  • check-stamp --base REF fails only for sources whose bytes changed since REF. Sources that were already stale on the base print as a ::warning saying the base autofix regenerates them.

  • The defaults-snapshot job checks out with depth 2 and passes HEAD^1. That is the base tip for a pull request's merge commit, or the parent commit for a push. A push that lands a settings source without its exports is still red on that one commit, so the drift points at the commit that caused it.

  • The stale message now says how to regenerate:

    • the PR autofix (cmux-next-pr-autofix.yml) for a pull request;
    • the base autofix after a merge;
    • scripts/cmux-next/regenerate-settings-exports.sh on a fleet Mac to do it yourself.
  • The generated-files job in cmux-next.yml runs the same check-stamp --base HEAD^1, so it also only warns about exports that were already stale on the base.

  • A source counts as the base's only when both its bytes and its stamp entry match the base's. That split happens before the list is cut to 20 lines, so a head that edits the stamp itself still fails, and a base with more than 20 stale sources still passes.

  • cmux-next: the defaults snapshot is bot-only #22275 follow-ups:

    • the comments in autofix-areas.sh and regenerate-settings-exports.sh now name check-stamp instead of the old check-fresh;
    • the fork hint in the PR autofix uses git apply --index so it stages new files too.

This complements #22004, which makes the base autofix itself keep up.

Separate base red. This job's next step, check-menu-actions.py, also fails on base: ChiefPaneTools.swift has an inline menu row from #22852. It is hidden behind the stamp failure today. I'm reporting it separately rather than fixing it here.

Changelog

none

Testing

python3 tests/test_defaults_guard.py:

  • Base: the new tests fail (319a7a8 and b388714, both committed before their fixes).
  • Head: 36/36 pass.

bash scripts/cmux-next/tests/pr-autofix.test.sh passes.

On this PR's own CI at b61b216, the stamp step passes and warns about the four inherited sources. The only red is the next step, check-menu-actions.py, which is the separate base red.

python3 scripts/ci/defaults_guard.py check-stamp --base HEAD on base 6143f81 exits 0 and warns about the four inherited sources. Without --base it exits 1.

Observed / Not run

  • Ran both commands above on Linux (huge-blue).
  • Saw this PR's defaults-snapshot run warn about the four inherited sources and pass the stamp step.
  • An independent review subagent passed b61b216. Its non-blocking note: on a plain workflow_dispatch, such as a next-batch stack, HEAD^1 is only the previous commit, so a stale source from earlier in the stack passes as inherited. Each PR's own pull_request run still judges it.
  • Not run: the base autofix after merge.

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 defaults-snapshot guard so a stale settings export fails only the change that made it stale, and applies the same fix to the generated-files job.

  • check-stamp --base REF fails only for sources whose bytes changed since REF; sources already stale on the base print as a ::warning.
  • A source counts as the base's only when both its bytes and its stamp entry match the base, and that split runs before the 20-line list is cut, so a head's own stamp edit fails and over 20 inherited sources still pass.
  • Both guards check out depth 2 and pass HEAD^1 — the base tip for a PR's merge commit, or a push's parent.
  • The stale message names the PR autofix and scripts/cmux-next/regenerate-settings-exports.sh instead of a REPAIR.md row this repository doesn't have.
  • The three merges that left the stamp stale changed only help text and translations, so no default changed.
  • autofix-areas.sh and regenerate-settings-exports.sh now name check-stamp instead of check-fresh; the fork hint uses git apply --index so new files get staged.
  • A separate base failure in check-menu-actions.py (ChiefPaneTools.swift from cmux NEXT: the Chief's status, subagents and actions in its pane's tab row #22852) remains hidden behind the stamp failure and is tracked separately.

Written for commit b61b216. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 06:19
…it changed

Red: defaults-snapshot fails every pull request and base push while the base
autofix catches up (base 6143f81: stale for Localizable.xcstrings,
NotificationModes.swift, NotificationPreferences.swift and
SettingsSchema+Appearance.swift, none of them changed by those PRs), and the
message points at a REPAIR.md row this repository does not have.

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
…hanged its source

defaults-snapshot ran check-stamp on the whole tree, so once a merge landed a
settings source without its exports (d986b17, #22678, #23028; none
changed a default), every pull request and every base push was red until the
base autofix caught up, which merges minutes apart kept from happening for
hours. check-stamp --base now fails only for sources changed since the base
(the merge commit's base tip, or a push's parent) and prints the inherited
ones as a warning. The stale message names the PR autofix and
regenerate-settings-exports.sh instead of a REPAIR.md row this repository
does not have.

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

teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by land-and-ci-a8 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 b61b216: 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=pr23056 -f ref=cmux/defaults-stamp-own-sources -f platform=macos -f backend_mode=local

… too; #22275 follow-ups

The generated-files job's check-stamp failed every pull request on the base's
stale exports the same way; it now passes --base HEAD^1 as defaults-snapshot
does. #22275's review follow-ups: autofix-areas.sh, regenerate-settings-
exports.sh and the generated-files comments still described check-fresh and
the snapshot, and the fork hint's `git commit -am` left files the patch adds
unstaged (now `git apply --index`).

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
@cursor

cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

teamleaderleo and others added 2 commits October 21, 2026 06:25
…t 20 inherited sources

Red (review of #23056): a head that takes an old stamp passes as stale on the
base, and with over 20 stale sources the "and N more" line fails every head.

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
…e list is cut

The inherited split ran on the printed lines: a head whose own stamp entry
differs from the base's passed as stale on the base, and past 20 sources the
"and N more" line failed every head. stamp_freshness now splits the full list
and needs both the source bytes and the stamp entry to be the base's.

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

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

@teamleaderleo
teamleaderleo merged commit 7a4b464 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the cmux/defaults-stamp-own-sources branch October 21, 2026 06:31
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

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