Repository navigation
Say which unsloth_zoo revision Core tested, and warn when it is not main - #10988
Conversation
resolve-zoo-ref pins the unsloth_zoo sha in a separate gating job. A re-run with --failed re-runs only the failed jobs and reuses the successful ones, so a re-run of a red Core zoo job keeps the sha it was handed on the first attempt, however long ago that was. That makes re-running to confirm a landed unsloth_zoo fix actively misleading. It re-tests the revision from before the fix, fails with the same errors, and says nothing about why. Observed on #10883: the Core zoo jobs started at 05:32 on the 15th and failed on gemma4 and flashinfer tests that unsloth_zoo #1219 and #1220 had fixed hours earlier, because the resolve job on that run had started at 19:29 the previous day and pinned 055c049. The only way to see it was to read the resolve job's log from the first attempt and notice the timestamp. So record the revision in the job, and warn when it is behind main, naming both shas and saying that a full re-run is what picks up main. Checked both directions against the live repo: silent when the pinned sha is main, warns on 055c049.
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The lookup was written as
head="$(git ls-remote ... | cut -f1)"
and the step runs under `set -euxo pipefail`. pipefail hands git's status to the
pipeline, the pipeline's status becomes the assignment's, and -e ends the step.
So a DNS blip on a diagnostic would fail a Core cell whose clone, install and
whole suite had already passed.
That is the opposite of what this change is for, and the PR description claimed
it could not happen. It can: `set -euxo pipefail; head="$(false | cut -f1)"`
exits 1 before the next line runs.
Absorb the failure inside the substitution, so an unanswerable lookup leaves
head empty and the check stays quiet.
Guarded behaviourally rather than by reading: the new test extracts the block
from the action and runs it under the same shell flags against a stubbed git,
covering a lookup that fails, one that answers nothing, a revision behind main
and a revision that matches. Restoring the unguarded form fails two of them.
The structural assertion is there because the behavioural ones also pass if the
guard is moved outside the substitution, which silences the assignment but not
the pipeline.
The previous round stopped a failing lookup from ending the step. A lookup that HANGS is the same hazard by another route, and || true cannot reach it: nothing has exited, so there is nothing to absorb. git applies no timeout to ls-remote and no low-speed limit is configured, so a connection that opens and then stalls would hold this step until the job's own 25 or 35 minute limit killed the cell. Again after the clone, the install and the whole suite had already passed, which is the outcome this block must never cause. An external timeout bounds it. timeout exits 124, which the existing guard absorbs like any other failure, and both jobs using this action run on ubuntu-24.04 where timeout is coreutils. The new test reads the bound out of the action, stubs git to sleep six times that, and fails if the block does not come back inside it. Removing the timeout fails it.
The remedy was stated unconditionally: re-run ALL jobs to pick up main. That is right for the case this warning was added for and wrong for the other one. A workflow_dispatch run that pinned unsloth_zoo_ref on purpose reaches the same code, because resolve-zoo-ref hands over a sha either way and the action cannot tell the two apart. Re-running preserves the original inputs, so that run resolves the same non-main ref again and warns again, having been told to do something that cannot work. Say both readings instead. I did not plumb a flag through from the workflow to distinguish them: that means a new action input kept in sync at two call sites, which is a fresh way for this to rot, and the message is short enough to hold both cases. A test pins the contract, and restoring the unconditional wording fails it.
…oving main Two holes, both found in review. The guard could be absent for the change it guards. This test reads .github/actions/core-cpu-setup/action.yml and runs under tests/studio, which is Backend CI's Repo tests (CPU, studio). Backend CI is path-filtered and did not list .github/actions, so a PR touching only the action ran Core -- which does list the action in its own filter, but does not execute tests/studio -- and skipped Backend CI, which does. Nothing would have run against the change. That is not specific to this file: nine tests under tests/studio assert properties of composite actions, covering cache naming, install phase timing, uv and pip cache discipline. None of them ran on an action-only change. Adding .github/actions to the filter covers all nine, and follows the reasoning the file already applies to install.sh. tests/studio/test_local_actions_are_in_path_filters.py enforces the neighbouring rule, that a workflow lists the actions it uses. The new test is the other direction: a workflow must also list the actions its TESTS read. Separately, the warning blamed a --failed re-run for every mismatch. A first attempt can mismatch too: resolve-zoo-ref pins main in the gating job and this step asks again only after the whole install, so main advancing in between is enough. That was a wrong diagnosis rather than a vague one, and it now names both causes. Both mutation-checked: removing the path entry and dropping the clause each fail their test.
The marker only asked for bash. Stock macOS has bash and no GNU timeout -- it is gtimeout, from coreutils -- which tests/sh/test_llama_build_jobs.sh already records for the same reason. There the bounded lookup fails, the guard absorbs it exactly as designed, head comes back empty, and the two tests that expect a warning fail. So a developer running the suite on a Mac gets two red tests describing nothing about their change. Reproduced by hiding timeout from PATH: head comes back empty and no warning is emitted. The marker now asks for both tools and names whichever is missing. The PATH handed to the subprocess was hardcoded to /usr/bin:/bin, which could disagree with that check in the other direction: a Mac WITH coreutils has timeout on PATH, shutil.which finds it, the marker does not skip, and the fixed PATH still would not find it. It now takes the caller's PATH with the stub directory in front, so the check and the run see the same tools. The action only ever runs on ubuntu-24.04, so skipping gives up no coverage that exists. Verified both ways: 9 pass with timeout present, 9 skip without it.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
One block accrued per review round. Verified comment-only two ways, since the shared gate cannot lex YAML: the action's executable lines are identical with comment lines stripped, and the test file's AST is identical ignoring docstrings.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…d on (unslothai#11001) * Run the chat width presets in CI, and two guards main is currently red on Three merges left main failing guards that every open PR then inherits. Lint CI's "Workflow guard suites" step and Repo tests (CPU, studio) are red on main right now, and six open PRs show the failure as their own. 1. unslothai#10958 added tests/studio/playwright_chat_width.py and no workflow that runs it. test_every_playwright_driver_is_invoked_by_ci exists for exactly that and says so. It could not be wired as written: it took CHAT_THREAD_ID and no CI step can produce a thread id, so the presets shipped with a driver that runs nowhere. The driver now seeds its own conversation through /api/chat/threads, the way playwright_thread_scoped_settings.py does, and CHAT_THREAD_ID stays honoured when set. Seeding needs no model: the messages endpoint stores whatever roles it is given, and an assistant-role message renders the .aui-assistant-message-root every assertion here measures. Verified against a real Studio: the seeded thread renders the bubble, and the sweep passes. Its sign-in also handled only the already-rotated case, so it could not have run against a fresh CI boot even with a thread id. Same two-branch shape as its siblings now. While making it run, one assertion that could not fail: the preset ordering is >=, so three presets pinned to the same width satisfy every line of it. The setting could stop working entirely and the driver would pass. At the widest viewport the three are separated by construction (48rem / 72rem / max(72rem, 100% - 6rem) in appearance-custom-store.ts), so that separation is now required. Pinning --custom-chat-max-width in a live browser: the old assertions pass, the new one fails with "at 2560px Wide gives message 744px, no more than Standard's 744px, so the preset is doing nothing". 2. unslothai#10985 added studio/nvidia_probe.py, imported by both install_llama_prebuilt.py and install_python_stack.py, which studio-mac-install-matrix.yml lists as inputs. Editing the probe did not run the matrix that depends on it. Added to both triggers. 3. unslothai#10988 (mine) added tests/studio/test_core_setup_zoo_revision_notice.py, which reads a workflow file but was not in workflow-trigger-lint's guard step, the only job with no paths filter. A PR editing only workflow files never collected it. Added. The 1054 tests in the guard step pass, as does tests/studio (9687 passed; the two failures there are on main already and untouched by this: an mlx import and a PR-scoped guard). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Tighten the comments this PR adds Comment/docstring text only. comment_tools.py check --strict-ext --allow-docstring-edits: 3/3 OK. The guard step's 1054 tests still pass, and the driver still runs green end to end against a real Studio. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ain (unslothai#10988) * Say which unsloth_zoo revision Core tested, and warn when it is not main resolve-zoo-ref pins the unsloth_zoo sha in a separate gating job. A re-run with --failed re-runs only the failed jobs and reuses the successful ones, so a re-run of a red Core zoo job keeps the sha it was handed on the first attempt, however long ago that was. That makes re-running to confirm a landed unsloth_zoo fix actively misleading. It re-tests the revision from before the fix, fails with the same errors, and says nothing about why. Observed on unslothai#10883: the Core zoo jobs started at 05:32 on the 15th and failed on gemma4 and flashinfer tests that unsloth_zoo unslothai#1219 and unslothai#1220 had fixed hours earlier, because the resolve job on that run had started at 19:29 the previous day and pinned 055c049. The only way to see it was to read the resolve job's log from the first attempt and notice the timestamp. So record the revision in the job, and warn when it is behind main, naming both shas and saying that a full re-run is what picks up main. Checked both directions against the live repo: silent when the pinned sha is main, warns on 055c049. * Stop the revision notice failing the step it reports on The lookup was written as head="$(git ls-remote ... | cut -f1)" and the step runs under `set -euxo pipefail`. pipefail hands git's status to the pipeline, the pipeline's status becomes the assignment's, and -e ends the step. So a DNS blip on a diagnostic would fail a Core cell whose clone, install and whole suite had already passed. That is the opposite of what this change is for, and the PR description claimed it could not happen. It can: `set -euxo pipefail; head="$(false | cut -f1)"` exits 1 before the next line runs. Absorb the failure inside the substitution, so an unanswerable lookup leaves head empty and the check stays quiet. Guarded behaviourally rather than by reading: the new test extracts the block from the action and runs it under the same shell flags against a stubbed git, covering a lookup that fails, one that answers nothing, a revision behind main and a revision that matches. Restoring the unguarded form fails two of them. The structural assertion is there because the behavioural ones also pass if the guard is moved outside the substitution, which silences the assignment but not the pipeline. * Bound the revision lookup in time as well as in status The previous round stopped a failing lookup from ending the step. A lookup that HANGS is the same hazard by another route, and || true cannot reach it: nothing has exited, so there is nothing to absorb. git applies no timeout to ls-remote and no low-speed limit is configured, so a connection that opens and then stalls would hold this step until the job's own 25 or 35 minute limit killed the cell. Again after the clone, the install and the whole suite had already passed, which is the outcome this block must never cause. An external timeout bounds it. timeout exits 124, which the existing guard absorbs like any other failure, and both jobs using this action run on ubuntu-24.04 where timeout is coreutils. The new test reads the bound out of the action, stubs git to sleep six times that, and fails if the block does not come back inside it. Removing the timeout fails it. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Word the warning for a pinned ref as well as a stale re-run The remedy was stated unconditionally: re-run ALL jobs to pick up main. That is right for the case this warning was added for and wrong for the other one. A workflow_dispatch run that pinned unsloth_zoo_ref on purpose reaches the same code, because resolve-zoo-ref hands over a sha either way and the action cannot tell the two apart. Re-running preserves the original inputs, so that run resolves the same non-main ref again and warns again, having been told to do something that cannot work. Say both readings instead. I did not plumb a flag through from the workflow to distinguish them: that means a new action input kept in sync at two call sites, which is a fresh way for this to rot, and the message is short enough to hold both cases. A test pins the contract, and restoring the unconditional wording fails it. * Run the action guards on action-only changes, and stop misreading a moving main Two holes, both found in review. The guard could be absent for the change it guards. This test reads .github/actions/core-cpu-setup/action.yml and runs under tests/studio, which is Backend CI's Repo tests (CPU, studio). Backend CI is path-filtered and did not list .github/actions, so a PR touching only the action ran Core -- which does list the action in its own filter, but does not execute tests/studio -- and skipped Backend CI, which does. Nothing would have run against the change. That is not specific to this file: nine tests under tests/studio assert properties of composite actions, covering cache naming, install phase timing, uv and pip cache discipline. None of them ran on an action-only change. Adding .github/actions to the filter covers all nine, and follows the reasoning the file already applies to install.sh. tests/studio/test_local_actions_are_in_path_filters.py enforces the neighbouring rule, that a workflow lists the actions it uses. The new test is the other direction: a workflow must also list the actions its TESTS read. Separately, the warning blamed a --failed re-run for every mismatch. A first attempt can mismatch too: resolve-zoo-ref pins main in the gating job and this step asks again only after the whole install, so main advancing in between is enough. That was a wrong diagnosis rather than a vague one, and it now names both causes. Both mutation-checked: removing the path entry and dropping the clause each fail their test. * Skip this file where GNU timeout is not there to run it The marker only asked for bash. Stock macOS has bash and no GNU timeout -- it is gtimeout, from coreutils -- which tests/sh/test_llama_build_jobs.sh already records for the same reason. There the bounded lookup fails, the guard absorbs it exactly as designed, head comes back empty, and the two tests that expect a warning fail. So a developer running the suite on a Mac gets two red tests describing nothing about their change. Reproduced by hiding timeout from PATH: head comes back empty and no warning is emitted. The marker now asks for both tools and names whichever is missing. The PATH handed to the subprocess was hardcoded to /usr/bin:/bin, which could disagree with that check in the other direction: a Mac WITH coreutils has timeout on PATH, shutil.which finds it, the marker does not skip, and the fixed PATH still would not find it. It now takes the caller's PATH with the stub directory in front, so the check and the run see the same tools. The action only ever runs on ubuntu-24.04, so skipping gives up no coverage that exists. Verified both ways: 9 pass with timeout present, 9 skip without it. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Tighten the comments this PR added One block accrued per review round. Verified comment-only two ways, since the shared gate cannot lex YAML: the action's executable lines are identical with comment lines stripped, and the test file's AST is identical ignoring docstrings. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…d on (unslothai#11001) * Run the chat width presets in CI, and two guards main is currently red on Three merges left main failing guards that every open PR then inherits. Lint CI's "Workflow guard suites" step and Repo tests (CPU, studio) are red on main right now, and six open PRs show the failure as their own. 1. unslothai#10958 added tests/studio/playwright_chat_width.py and no workflow that runs it. test_every_playwright_driver_is_invoked_by_ci exists for exactly that and says so. It could not be wired as written: it took CHAT_THREAD_ID and no CI step can produce a thread id, so the presets shipped with a driver that runs nowhere. The driver now seeds its own conversation through /api/chat/threads, the way playwright_thread_scoped_settings.py does, and CHAT_THREAD_ID stays honoured when set. Seeding needs no model: the messages endpoint stores whatever roles it is given, and an assistant-role message renders the .aui-assistant-message-root every assertion here measures. Verified against a real Studio: the seeded thread renders the bubble, and the sweep passes. Its sign-in also handled only the already-rotated case, so it could not have run against a fresh CI boot even with a thread id. Same two-branch shape as its siblings now. While making it run, one assertion that could not fail: the preset ordering is >=, so three presets pinned to the same width satisfy every line of it. The setting could stop working entirely and the driver would pass. At the widest viewport the three are separated by construction (48rem / 72rem / max(72rem, 100% - 6rem) in appearance-custom-store.ts), so that separation is now required. Pinning --custom-chat-max-width in a live browser: the old assertions pass, the new one fails with "at 2560px Wide gives message 744px, no more than Standard's 744px, so the preset is doing nothing". 2. unslothai#10985 added studio/nvidia_probe.py, imported by both install_llama_prebuilt.py and install_python_stack.py, which studio-mac-install-matrix.yml lists as inputs. Editing the probe did not run the matrix that depends on it. Added to both triggers. 3. unslothai#10988 (mine) added tests/studio/test_core_setup_zoo_revision_notice.py, which reads a workflow file but was not in workflow-trigger-lint's guard step, the only job with no paths filter. A PR editing only workflow files never collected it. Added. The 1054 tests in the guard step pass, as does tests/studio (9687 passed; the two failures there are on main already and untouched by this: an mlx import and a PR-scoped guard). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Tighten the comments this PR adds Comment/docstring text only. comment_tools.py check --strict-ext --allow-docstring-edits: 3/3 OK. The guard step's 1054 tests still pass, and the driver still runs green end to end against a real Studio. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
A CI trap that makes re-running a red
Core zoojob actively misleading, rather than merely unhelpful.What happens
resolve-zoo-refpins theunsloth_zoosha once, in a separate gating job, and the sixCore/Core zoomatrix cells consume it throughneeds.gh run rerun --failedre-runs only the failed jobs and reuses the successful ones, andresolve-zoo-refis almost always one of the successful ones. So a re-run of a redCore zoojob keeps the sha that job was handed on its first attempt, however long ago that was.The result is that re-running to confirm a fix that has since landed in
unsloth_zoore-tests the revision from before the fix, fails with exactly the same errors, and says nothing about why.Observed on #10883 while sweeping failing CI. Its
Core zoojobs started at 05:32 on the 15th and failed on the Gemma-4 and FlashInfer tests that unsloth_zoo #1219 and #1220 had fixed at 22:17 and 00:59. The jobs were testing055c0497, pinned by a resolve job that had started at 19:29 the previous day. Nothing in the failing job mentioned a revision, so the only way to find out was to fetch the resolve job from the original attempt and notice its timestamp.I drew the wrong conclusion from this twice before spotting it, first deciding the fix had not worked and then that the whole cluster was stale for a different reason.
The change
Print the revision under test, and when it is behind
main, warn with both shas and the remedy:A full re-run, without
--failed, re-runsresolve-zoo-refand picks upmain. That was already true and is now discoverable.Notes
The
git ls-remoteis best-effort. If it fails or returns nothing,headis empty and the check stays quiet rather than failing the job over a network blip: this is a diagnostic, and it must never be the reason a green run goes red.A pinned
unsloth_zoo_refpassed in viaworkflow_dispatchwill also warn when it is notmain. That is correct, and in that case the warning is the accurate description of what the run is doing.Verification
YAML parses, the composite step passes
bash -n, and the comparison was checked both directions against the live repo: silent when the pinned sha equalsmain, warns on055c0497.This changes a composite action rather than a test, so it wants a look from someone other than me.