Repository navigation
Order the Mac inference phases so the gates stop fighting each other - #8024
Merged
Merged
Conversation
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
Follow-up to the Mac consolidation, applying the resolution that came out of reviewing the equivalent Windows change in #8013. The installer carried an explicit 'if: ${{ !cancelled() }}' with a comment explaining why: phase 1's environment and model cache ran before it, so under the implicit success() a phase-1 GGUF download failure would skip the install, skip assert-llama with it, and take phases 2 and 3 down. The gate bought that independence, but at a price the comment did not mention: a failed setup-node or setup-python no longer stops anything, the installer runs on a runner that never got its pinned toolchain, assert-llama passes, and all three phases run and fail somewhere unrelated. Moving phase 1's block below the shared preamble is better than either gate, because it makes the two failure classes structural rather than conditional. Everything above the block is genuinely shared, everything below it belongs to phase 1, and the installer can go back to the implicit success(). Phases 2 and 3 also gated every step on assert-llama alone, so a failed download or a server that never came up still ran the test against it. Each phase now chains on its own prerequisites, keeping assert-llama as the first term so cross-phase independence is unchanged. Phase 3 additionally gates on its SDK install, which only it needs. Verified no coverage moved: every 'run:' body in the file is byte-identical across the change, 24 before and 24 after, none lost and none added.
danielhanchen
force-pushed
the
ci/mac-phase-gates
branch
from
August 6, 2026 14:04
f864894 to
b4eca3a
Compare
Member
Author
|
@codex review |
1 similar comment
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
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 to the Mac inference-smoke consolidation, applying the resolution that came out of reviewing the equivalent Windows change in #8013. Same three phases, same one-job shape, so the same two gating problems were present here.
The installer gate
The step carried an explicit
if: ${{ !cancelled() }}, and the comment above it explained the reasoning: phase 1's environment and model cache ran before the installer, so under the implicitsuccess()a phase-1 GGUF download failure or 15-minute timeout would skip the install, skipassert-llamawith it, and evaluate every phase-2 and phase-3 gate false. A transient HF download would take the whole workflow down.The gate does buy that independence. What the comment did not weigh is the other side:
!cancelled()is true after any non-cancellation failure, including a failedsetup-nodeorsetup-python. The installer then runs on a runner that never got its pinned toolchain,assert-llamapasses, and all three phases run and fail somewhere unrelated to the real cause.Reordering gets both properties at once, and needs no condition at all:
Everything above phase 1's block is genuinely shared; everything from the block down is phase 1's own. The installer goes back to the implicit
success(), where the only thing it can now see is a real shared-preamble failure, which should stop the job.Checked that nothing in the preamble needed the moved environment: the installer takes
gh-tokenandhf-token, notHF_HOME, and phase 2 already ran it with noHF_HOMEset at all.Phase-local prerequisites
Phases 2 and 3 gated every step on
assert-llamaalone. That is right for cross-phase independence and wrong within a phase: a failed download still booted a server with no model, and the test then ran against it, so the job spent the phase's full budget cascading from an error already reported several steps earlier.Each phase now chains on its own prerequisites, with
assert-llamakept as the first term so nothing about cross-phase independence changes:The download clause is
!= 'failure'rather than== 'success'on purpose: a cache hit skips the download step, and== 'success'would make a warm cache skip the entire phase.Phase 3 gates on the SDK install because it is the only phase that imports
openai/anthropic; phase 2 drives the API with curl and deliberately does not, so a pip failure there cannot cost the tool-calling coverage.Verification
run:body in the file is byte-identical across the change: 24 before, 24 after, 0 lost and 0 added. The diff moves steps and editsif:keys only.actionlintclean, and no step ends up with a duplicateif:key.id.