Repository navigation
test: fix flaky mllama exact-zero assert and webui 401 wait - #2517
Merged
Merged
Conversation
The ragged multi-image test asserted max_abs_diff of exactly 0.0 against rows taken from the legacy all-tiles path, but the two sides batch tiles differently and reassociate the parallel reductions, so the same value can differ by one f32 ulp (1.19e-7 was seen once on main). Reuse the sibling TILE_SELECTION_REASSOCIATION_TOL (1e-6, #1067); a deliberately swapped media-major row order still fails the assert with a diff of 0.32. injectRealUnauthorizedCatalog waited on the session-key field (5 s) but assumed the refresh click's own catalog request carries the rewritten header. WebUiSynchronizer.refresh() returns early while an observation tick is in flight, deferring the forced resnapshot to the next 2 s poll, so the 401 can land past the 5 s window under CPU load. Wait on the 401 catalog response instead (waiter registered before the route is armed), then assert the field, which mounts ~22 ms after the 401 is processed. Validated with 20 consecutive harness runs, runs 8-14 under a 16-process yes load, and the full mllama parity file. Closes #2467
Member
Author
PR Finalization CompleteSummary
All checks passing. Ready for merge. |
Bilingual technical report for the flaky-test fixes (#2467): mllama reassociation tolerance and webui 401 wait.
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.
Summary
Item 2 root cause
WebUiSynchronizer.refresh() (webui/src/state/sync.ts) returns early when an observation tick is already in flight, so the explicit resnapshot behind the "Refresh server state" click only sets needsFullSnapshot and defers the forced full snapshot to the next 2 s poll tick. The one-shot route stays armed until that later tick's catalog GET, so the 401 lands at (in-flight tick remainder + 2 s poll + bootstrap latency) after the click, which exceeds the 5 s DOM wait under CPU load. An instrumented run confirmed the passing ordering: the click's own catalog GET consumes the one-shot route and the key prompt mounts ~22 ms after the 401 response, so the DOM signal itself was never late, the timing assumption was.
What changed
Test plan
Closes #2467