Repository navigation
0.10.12: the MiMo audio and media HTTP tests wait for the media reservation to settle - #2026
Merged
jonathan308 merged 2 commits intoNov 12, 2026
Conversation
…settle The DevNet 0.10.12 release run 43162424068 (shard 5, attempt 1) failed `testNativeAudioReleaseAcceptsOpenRouterAACVideoThroughAuthenticatedHTTP` at its reservation check: 1, expected 0. Attempt 2 passed, CI (dev) run 43158852996 passed the same tree, and the check raced the engine: - the bridge returns the request's terminal to the client before the row's native retirement (`EngineV2Bridge+Events.swift:226-231`), and the lease the test joins is host-task ownership only; - the managed media reservation leaves the transaction's map only once its native side retires too: the SDK's `work.afterRetirement` runs the transaction's `retire` closure on the engine queue (`MiMoV26NativeLoadTransaction.swift:970-976`, `:1096-1103`). On a slow runner that retirement lands just after the join. In the failed run the rest of the test passed: retirement reached `.retired`, which needs an empty reservation map (`:1321`), and the ledger was back to 0. `assertNativeHTTPMedia` (the AAC video and PCM8 WAV tests) now waits up to 10 s for the count to reach 0 before asserting it, so a leaked reservation still fails. Red-first on Mac A with a 0.3 s sleep injected into that `retire` closure: the old check failed 5 of 5 (at `0b52123a18` and `0e6ac37885`); waiting for the count passed 3 of 3, reaching 0 after 0.31 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Red-first evidence on CI: #2027 (DO NOT MERGE; closed when done). |
…to settle too The red-first run on CI (#2027: a 0.3 s slower native media retirement) failed exactly three tests at their single reservation read: the two audio HTTP tests fixed in the previous commit, and `MiMoV26EncodedMediaIngressTests.testNativeMediaReleasePNGJPEGAndMP4GenerateThroughAuthenticatedRoutes` (`:375`), which reads the count once after joining its leases: the same race. It now waits up to 10 s for the count to reach 0 as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 12, 2026
…0.3 s slower retirement Expected green: each reservation check waits up to 10 s for the native retirement instead of reading once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Red-first evidence on CI is complete (#2027, now closed). With a 0.3 s slower native media retirement, today's tests fail exactly the three single-read checks (run 43168133947). With this PR's tests, the same injection is green (run 43171519156). This PR's own CI is green: run 43171504994. |
jonathan308
added a commit
that referenced
this pull request
Nov 12, 2026
…iving mutants, production-width wording From review-2026-2029 (#2026 and #2029 v1 ship; wording must-fix S1, should-fixes S2-S6, notes N1 and N2): - S1, wording: the managed Super slot serves up to 8 requests at once (`defaultConcurrentRequests`, halved by the load fit), and only images and videos one at a time; the one-request owner is the qualification hook's default. Fixed in both changelog fragments, the direct-mode refusal row and inference.md's Super media section. - N1: at the image binding, a stacked wait now holds only while the owner keeps a request slot free besides the waiting image's own (`Owner.hasFreeLocalAdmission`). A waiting image no longer takes the last slot a text request would get; on a width-2 owner, with an image streaming, the next image is refused at once as before, and text beside it is served. - S6: the DEBUG settlement seam runs in `execute` right after the answer is marked ended, not inside the mark, so a mark moved after the native settlement fails the settlement tests (mutant M7). `markEnded()` is synchronous again. - Tests: the binding's refusals without a bound and behind one waiter are timed (< 500 ms, M1), including `encodedRGBSuccessCancellationAndBusyIsolation`'s; a cancelled binding waiter returns at once and leaves no waiter (M4); a drain ends a binding wait with `closed` at once (M8); the stacked image reserves only after the first image's charges are released, sampled at its first chunk (M10); the owner's free-slot rule; after the HTTP test's served waiter, an image behind a text answer is refused at once, so every request's progress returned with its admission (M5); and a width-2 HTTP test, the production shape, for the free text slot (S3). Owner cancellation (M3) was already covered. - N2: one deadline (`stackedUntil`) already bounds both slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
merged commit Nov 12, 2026
bd7fde4
into
release/candidate-0.10.12d
32 of 34 checks passed
This branch was successfully 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.
Test-only fix for the 0.10.12 DevNet qualification flake (
earnings/MIMO-AAC-RACE.md). Targetsrelease/candidate-0.10.12d(0b52123a18) so the morning tag's release run doesn't flake on it.What
The reservation checks that read
managedMediaReservationCountForTestingonce after joining the request's lease now wait up to 10 s for it to reach 0 before asserting it. A leaked reservation still fails.MiMoV26ManagedAudioProviderTests.assertNativeHTTPMedia(the AAC video and PCM8 WAV tests).MiMoV26EncodedMediaIngressTests.testNativeMediaReleasePNGJPEGAndMP4GenerateThroughAuthenticatedRoutes(:375). The CI red run below showed it has the same race.Before / after
Test-only change, no product code changes.
Behavior (the test's check after a 200 response):
flowchart LR subgraph Before A1["HTTP media request returns 200"] --> B1["join the request's lease: host task only"] B1 --> C1["read the reservation count once"] C1 -- "native retirement still running" --> F1["1, expected 0: flaky failure"] C1 -- "retired" --> P1["0: pass"] end subgraph After A2["HTTP media request returns 200"] --> B2["join the request's lease"] B2 --> W2["poll the count every 5 ms, up to 10 s"] W2 -- "reaches 0" --> P2["assert 0: pass"] W2 -- "still held after 10 s: a leak" --> F2["assert 0: fail"] endCode:
MiMoV26ManagedAudioProviderTests.assertNativeHTTPMediaandMiMoV26EncodedMediaIngressTests.testNativeMediaReleasePNGJPEGAndMP4GenerateThroughAuthenticatedRouteseach replace the singleXCTAssertEqual(managedMediaReservationCountForTesting, 0)with a bounded wait followed by the same assertion. Engine code is unchanged: the reservation is still removed by the nativeretireclosure (MiMoV26NativeLoadTransaction.swift:970-976,:1096-1103), after the terminal (EngineV2Bridge+Events.swift:226-231).Why
Release run 43162424068 shard 5, attempt 1: the AAC video test failed at
:270with a count of 1 (expected 0) after a 200 response. Attempt 2 passed. CI (dev) run 43158852996 passed the same tree. The check raced the engine:EngineV2Bridge+Events.swift:226-231). The lease the test joins is host-task ownership only (MultiModelBatchSchedulerEngine+Registry.swift:183-185).work.afterRetirementruns the transaction'sretireclosure on the engine queue (MiMoV26NativeLoadTransaction.swift:970-976,removeSettledMediaReservation:1096-1103).:270passed. Retirement reached.retired, which requires an empty map (:1321), and the ledger was back to 0. So the reservation was released moments later, not leaked.No product code changes, and no step-3 fold touched this path.
Red-first
The old single read against a 0.3 s sleep injected into that
retireclosure:0b52123a18and at0e6ac37885. Waiting for the count passed 3 of 3; the count reached 0 after 0.305–0.309 s. Without the injection: 10/10 pass at both commits.testNativeMediaReleasePNGJPEGAndMP4GenerateThroughAuthenticatedRoutes.641bbc938a), run 43171519156: green. All three tests passed, each waiting for the slower retirement.No changelog fragment: a test-only change, and no gate requires one for it.
Validation, limitations, refactor pass
docs-impact-checkis OK.docs-checkis OK with submodules checked out.