Repository navigation
test(ui-react): cut B's recovery read short in the parallel-sessions case - #4058
Merged
Merged
Conversation
…case (#3414) Under load, B's recovery read after its failure was sometimes still in flight when the 390-phone case fast-forwarded the page clock 2:05. The fake clock also runs the read's `AbortSignal.timeout`, so the read aborted, B went `can't check`, and the next read's same failure was announced a second time. #3980 fixed the announcer; this makes the condition a step of the case instead of something only load produces. B's recovery reads are held from just before its failure until the fast-forward has turned B `can't check`, then answered, and the case waits for B to read `failed` again. Every assertion and deadline is unchanged. With the #3980 guard removed the case now fails at "a ticking age announces nothing" with the duplicate announcement. Refs #3414 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
Closed
Closed
Merged
Merged
…ssions-failure-once
schlessera
marked this pull request as ready for review
November 16, 2026 09:36
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.
Closes #3414
What changed
The 390-phone "A and B stream side by side" case in
parallel-sessions-runtime.test.tsnow always puts B's tracker through the condition that made it announce B's failure twice under load. B's recovery reads are held from just before B fails until the 2:05 fast-forward has cut the in-flight read short (the fake clock also runs the read'sAbortSignal.timeout) and B readscan't check. The case then answers them and waits for B to readfailedagain, before the existing "a ticking age announces nothing" check. The product fix, the announcer keeping its baseline throughcan't checkandunknown, is already onmainfrom #3980 (0f6296a79). This PR supplies #3414's own acceptance: the case fails with that guard reverted under the issue's condition, passes with it, and passes 30 times under load. It touches only the test file, and every assertion and deadline is unchanged.Why this shape
tracker-runtime.test.tscovers a completion behind an injected 503. The race ui-react: parallel-sessions runtime announces B's failure twice under load on 390 phone #3414 saw (the fake-clock fast-forward aborting a slow read and leaving the same failure) was only reached when load made a read slow. Holding B's reads makes it happen on every run of the case, at all widths, so a regression fails the case without depending on load.can't check, so the step can't race the fast-forward. Each failure sends more than one end-of-turn frame, so a second read is already queued behind the held one, and answering the gate brings B back tofailed.can't checkon a fast or slow host.Proof
All runs used real Chromium 1243 from the pinned Playwright cache,
BRAIN_REQUIRE_CHROME=1 bun run test packages/ui-react/tests/parallel-sessions-runtime.test.ts -t '390 phone.*A and B stream', baseorigin/mainateb3c53ac2, head2e5166498.mainwith #3980's guard removed and a temporary 1.5 s hold on B's recovery reads (not committed),--rerun-each 3+ "Row through Scylla's strait failed.", the diff in #3414mainwith the same temporary hold,--rerun-each 3--rerun-each 2+ "Row through Scylla's strait failed."--rerun-each 2--rerun-each 30, 10 busy loops on 16 cores, one-minute load sampled every 15 s: median 24.2 (3.4 at start, up to 28.9)The mutation removed the guard
(last.has(view.sessionId) && (view.state === "cant_check" || view.state === "unknown"))inpackages/ui-react/src/lib/tracker-announcer.ts(observe). It was restored withgit checkoutbefore the restored and load runs.The hosted
unitshard that carries this file (issue verification) runs on the ready candidate.{"version":1,"kind":"brain-check-pr-receipt","head":"2e5166498d62cb0e6027a3c6d40a6fdf83669e00","base":"origin/main","mode":"focused","startedAt":"2026-11-15T21:29:19.658Z","finishedAt":"2026-11-15T21:29:43.247Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":14163.859322000004},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":106.72663699999976},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":97.9387029999998},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.533863000004203},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":9183.692573}]}Collisions (
bun scripts/collisions.ts --json --pr 4058at head2e5166498, graph built at that head): nopathorunknownreport.closureonly, against 25 open PRs through theui-reactworkspace. Of those, #3056, #3059, #3622, #3806, #4002, #4018, #4028, #4041, #4046 and #4050 also reachparallel-sessions-runtime.test.tsin their closure. #3437 is the superseded PR for this issue and is closed.Checklist
docs/reflect the change, or nothing documented moved. (fix(ui-react): keep tracker recovery from repeating announcements #3980 recorded the recovery behaviour in D52.)docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.Anything left open
Nothing.
🤖 Generated with Claude Code