Skip to content

Pre-flight whisper pairing before the chained install - #10027

Merged
danielhanchen merged 5 commits into
mainfrom
fix/whisper-pairing-preflight
Aug 31, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
fix/whisper-pairing-preflight

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The defect

chained_phase_plan waives its pairing gate when the llama phase will run first:

if marker.get("install_kind") == "slim" and not paired_llama_will_update:
    ...
    # When the llama phase will run first, it supplies the repaired pairing instead.

That assumption holds only while a whisper release actually exists for the llama build being installed. For ten days it did not. llama shipped b10639, b10672, b10679 and b10687 while the newest whisper bundle stayed pinned to b10472-mix-4b653db, because the whisper.cpp release resolver was failing on every trigger (fixed separately in unslothai/whisper.cpp#26).

The result: the whisper phase runs an install that cannot succeed, the installer exits 2, and a llama update that has already landed on disk is reported as a failed job.

The change

Do the check the plan deferred, once the new llama is actually in place.

run_chained_phase_after_llama resolves the pairing with force_refresh = True and, when no prebuilt is available for the newly installed llama, reports the phase as skipped with paired_llama_unavailable. That is the same clean skip the plan itself would have produced had llama not been updating, and the same reason string, so the outcome does not depend on which order the phases happened to be planned in.

Three deliberate limits:

  • Only install_kind == "slim" is pre-flighted. A full install carries its own ggml, so llama's build cannot strand it, and the plan's own gate is scoped the same way.
  • A probe that raises falls through to the install. The pre-flight exists to avoid an attempt known to be doomed, and one that cannot answer knows nothing, so attempting keeps the previous behaviour rather than silently skipping an update that would have worked.
  • run_chained_update now honours a skip reported from a phase result, not only from a plan. Deciding later must not mean explaining less: the breakdown still reads skipped: <reason> rather than degrading into a success with an empty message.

What this deliberately does not do

It narrows when exit 2 happens. It does not swallow it.

test_whisper_phase_exit_2_is_a_failed_phase pins the policy that an incompatible release "must remain an actionable job error instead of producing a false success toast and hiding the banner". An attempt that does go ahead and turns out incompatible still raises, and there is a test asserting that specifically, so the pre-flight cannot be used as a way to hide a failed install.

Tests

Six new cases in test_combined_update.py:

  • a slim install with no available prebuilt skips with paired_llama_unavailable and the install is never attempted (the assertion fires if it is)
  • a workable pairing still installs
  • full and an absent install_kind are not pre-flighted at all, asserted by making the resolver raise
  • a resolver exception still attempts the install
  • an incompatible release that slips past the pre-flight still raises

test_combined_update.py and test_llama_backend_switch.py: 66 passed.

Wider update surface, -k "update or whisper or llama or install or prebuilt": 4307 passed, 7 failed. Clean main in a separate worktree, same selection: 4301 passed, 7 failed, and the seven are the same tests. They are test_diffusion_* and test_mlx_repair, all from a local huggingface-hub version mismatch, unrelated to this branch. The +6 is exactly the new cases.

Note

This replaces #10026, which I closed. That PR started from a claim I could not support: that a llama update can newly expose a whisper update. whisper_cpp_freshness.py has no llama reference at all, so update_available there is a pure tag comparison and a llama update cannot flip it. The real defect is the one above, and this PR does only that.

I reasoned this from the source and reproduced it through the tests rather than by driving a live Studio through a real llama-then-whisper update, so the end-to-end sequence is inferred rather than observed.

chained_phase_plan waives its pairing gate when the llama phase runs first,
on the grounds that llama supplies the repaired pairing instead. That holds
only while a whisper release exists for the llama build being installed, and
for ten days it did not: llama shipped b10639, b10672, b10679 and b10687
while the newest whisper bundle stayed pinned to b10472-mix-4b653db.

The whisper phase then ran an install that could not succeed. The installer
exited 2 and a llama update that had already landed was reported as a failed
job.

Make the check the plan deferred, once the new llama is actually in place. A
pairing gap becomes the same clean skip the plan itself would have produced
had llama not been updating, with skip_reason paired_llama_unavailable. Only
slim installs are pre-flighted, since only they are pinned to llama's ggml,
and a probe that raises falls through to the install rather than skipping.

This narrows when exit 2 happens; it does not swallow it. An attempt that
does go ahead and turns out incompatible still surfaces as a job error, which
is what keeps an incompatible release actionable instead of a false success.

run_chained_update now honours a skip reported from a phase result, so the
breakdown reads the same whether the decision was reached at planning time or
after the phases before it ran.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-31T00:00:13.837505Z c11ec53 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Two defects in the pre-flight added by the previous commit.

It probed the download host's latest pointer while the install passes
--published-release-tag from the phase. That pointer sorts by commit date and
can lag the published_at pick the freshness check used, which is the #6219
class the phase pins against, so the pre-flight could clear one release and
install a different one. It now passes the phase's repo and pinned tag, so it
evaluates the artifact that would actually be installed.

It also treated every negative answer as a pairing gap. The resolver maps an
unreachable API, an unreadable manifest and an unsupported platform to exit 0
with prebuilt_available=false, so the exception fallback was unreachable for
that whole class and an update could be skipped over a network blip, reported
as a pairing gap that was never established.

The install path already draws the line the pre-flight needs:
ReleaseCompatibilityError is exit 2, a valid release this runtime cannot pair,
and every other failure is exit 1. The resolver flattened both into a bare
prebuilt_available=false. It now reports unavailable_reason, incompatible or
unresolved, and the pre-flight skips only on incompatible. Anything else,
including a resolver that never ran, falls through to the install.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6b737229fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Picks up #10025's bounded replay retry in the multi-turn smoke, which is what the
two failing checks on this PR were missing.
chatgpt-codex-connector[bot]

This comment was marked as resolved.

The pre-flight returned early unless the installed marker said install_kind
slim. That reads the source of the update to decide something about its
target.

A fat marker omits install_kind entirely, by design: prebuilt_core keeps the
legacy payload exactly for fat installs. Published whisper releases are
slim-only now, so a legacy fat install updating today gets a slim target that
does depend on the new llama runtime, and it was precisely the install that
skipped the check. That host then hits the doomed install this change exists
to prevent.

Probe unconditionally instead. Nothing is lost: the skip is already gated on
the resolver positively reporting incompatible, and _slim_release_incompatibility
explains only a slim pairing failure, so a fat target can answer available or
unresolved but never incompatible. The phase spec no longer carries
install_kind, since nothing reads it.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a9b705841a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment-only: 84 lines out, 39 in, AST-verified against a9b7058. Every
surviving line names a mistake this PR actually made and had corrected: the
false pairing assumption with the tags that falsify it, exit 2 staying an
actionable error, skipping only on a positive incompatibility, and why the
pre-flight must not gate on the installed install_kind.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: c11ec5321c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 31, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 31, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Aug 31, 2026
@danielhanchen
danielhanchen merged commit 1505087 into main Aug 31, 2026
61 checks passed
@danielhanchen
danielhanchen deleted the fix/whisper-pairing-preflight branch August 31, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant