Repository navigation
fix(nightly): the resolved build commit carries the tip's scripts/ci/nightly-steps - #31121
Merged
Merged
Conversation
…step scripts differ from the tip's (red) Since #30912 the nightly runs step scripts from scripts/ci/nightly-steps/ in the resolved commit's checkout, under the tip's workflow. A published commit behind the tip whose step scripts differ would run older copies of steps the tip's workflow names. The case runs nightly.yml's own CMUX_TUI_TREE_SAME_PATHS policy. Red here: bash scripts/cmux-next/tests/pin-cmux-tui-resolve-newest.test.sh FAIL: nightly must not resolve a published revision with an older nightly step script
…nightly-steps resolve-nightly-cmux-tui-client's CMUX_TUI_TREE_SAME_PATHS gains scripts/ci/nightly-steps. pin-cmux-tui.sh compares `git rev-parse <rev>:<path>`, which for a directory is its tree, so a candidate whose step scripts differ in any file from the tip's is skipped with "scripts/ci/nightly-steps differs from the tip", as for nightly.yml and the Chief lockfile. Follow-up from the #31013 review. Cost: a nightly no longer builds a published commit behind the tip when the tip changed a step script after it; it takes a newer published commit, or builds the tip while its tree publishes (resolve-tree-pending.sh), as for a nightly.yml change today. Green here: bash scripts/cmux-next/tests/pin-cmux-tui-resolve-newest.test.sh PASS
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 1, 2026 16:08 — with
GitHub Actions
Inactive
…-same-paths-steps # Conflicts: # .github/workflows/nightly.yml
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 1, 2026 16:10 — with
GitHub Actions
Inactive
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
Contributor
Author
|
Review (subagent, correctness first): SHIP at 9fed58b What the reviewer confirmed:
Non-blocking, and present before this PR: other scripts the tip's workflow calls from the build checkout ( |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from the #31013 review (lead decision, 15:3xZ). Since #30912, the nightly runs step scripts from
scripts/ci/nightly-steps/in the resolved build commit's checkout, under the tip's workflow.CMUX_TUI_TREE_SAME_PATHSonly made the build commit carry the tip'snightly.ymland Chief lockfile. So a published commit behind the tip, whose step scripts differ from the tip's, could run older copies of steps that the tip's workflow names.Change
resolve-nightly-cmux-tui-clientaddsscripts/ci/nightly-stepstoCMUX_TUI_TREE_SAME_PATHS.pin-cmux-tui.shcomparesgit rev-parse <rev>:<path>. For a directory this is its tree object, so a candidate that differs from the tip in any step script is skipped. The message is "scripts/ci/nightly-steps differs from the tip", the same as fornightly.ymltoday.Cost: when the tip changed a step script after the newest published commit, the nightly now takes a newer published commit, or builds the tip while its tree publishes (
resolve-tree-pending.sh). That is the same as after a nightly.yml change today. In the last 14 days on feat, 8 of 41 step-script commits did not also changenightly.yml(nightly.yml changed in 239 commits). So this adds a skip rarely.Out of scope, tracked in #31127: other scripts that the tip's workflow runs from the build commit's checkout (
scripts/ci/*.py,scripts/cmux-next/*.sh, 90 steps in 19 jobs). The lead decided not to widen this list for them, because each path makes skips more frequent. #31127 proposes the root-cause fix: steps that run tip-workflow logic take their scripts from the workflow commit's checkout.Red and green (test first, then fix)
The new case in
scripts/cmux-next/tests/pin-cmux-tui-resolve-newest.test.shruns nightly.yml's ownCMUX_TUI_TREE_SAME_PATHS. It publishes a commit with an older step script, then a tip with a newer one. The resolver must refuse the older commit with a clear message, and must accept it once the tip's tree is published.349227ff466(test only):FAIL: nightly must not resolve a published revision with an older nightly step script.24a7029fc3b(fix) and at this head:PASS.cmux-next.ymlalready runs this test file. No CI job, step or gate is added.Observed / Not run
1f80a9fc5c7. The same 10 base reds fail on both sides.test_workflow_file_size.pypasses (458,338 bytes after merging ci(nightly): headroom under the size budget (14 more run blocks, step notes into scripts, expressions through env) #31013).test_cmux_next_media_tree_fallback.pypasses (the other user of the variable, in cmux-next-media.yml, which this PR does not change).prepush-gate.pypasses.Risk tier: high (
risk_tier.py: nightly.yml is on the release path).Changelog
none