Repository navigation
Studio: hand the audio route's heal gate the request's contract, and follow the hoisted audio_base64 in the turn-scope check - #16023
Merged
Conversation
…oisted audio_base64 in its turn-scope check #15889 left two checks red on main: - the audio-input route's heal_gate call did not forward response_format, which test_every_post_decode_reinterpreter_is_handed_the_request_s_own_contract requires of every site - chat-adapter.ts now sends audio_base64 through turnAudioBase64, which the media turn test matched as a literal; the test now follows a hoisted const to its definition
Member
Author
|
@codex 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. |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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.
Two checks went red on main with #15889 (LFM3-Audio / LFM3-Omni on MLX). They fail every PR's Backend CI
(Python 3.13, g-r)shard andRepo tests (CPU, studio)job, for example on #15988 and #15934.1. The audio-input route's heal gate did not get the request's contract
test_passthrough_healing.py::test_every_post_decode_reinterpreter_is_handed_the_request_s_own_contractrequires everyheal_gate/nudge_enabledcall to be handed the request'sresponse_format, so a constraining format withdraws tool-call healing. #15889 added a new call in the audio-input branch ofroutes/inference.pywithout that argument:The product side is where this belongs, not the test. Today the omission is harmless: that branch only runs when the request carries
audio_base64and the model has audio input, and earlier in the handler that same case refuses a constrainingresponse_format. Forwarding_extract_response_format(payload)keeps the site under the same rule as the other nine. If that refusal is ever relaxed, the gate then does the right thing without anyone remembering this site.2. The turn-scope check read
audio_base64as a literaltest_multi_chat_prompt_queue_contract.py::test_a_media_turn_stays_legacy_and_its_attachments_stay_turn_scopedchecks thatimage_base64,audio_base64andvideo_base64are scanned fromcurrentTurnMessages, never from thread history. #15889 hoisted the audio scan intoconst turnAudioBase64 = findLatestUserAudioBase64(currentTurnMessages, ...)so it can also gatemodalities. The behaviour is unchanged, but the test matched the old inline text.Here the test was wrong. It now reads every request body site for each field and follows a hoisted
constto its definition. It then requires the value to be afindLatestUser*Base64(currentTurnMessages, ...)scan. A new test pins that reader on a hoisted value and on a history scan.Verification
test_passthrough_healing.pyhas 111 passed,test_multi_chat_prompt_queue_contract.py17 passed.turnAudioBase64atmessagesinstead ofcurrentTurnMessagesfails the media turn test and names the sent expression.routes/inference.pyfails the contract test.audio_base64or the heal gate: 2872 passed, 7 skipped.