Skip to content

fix(ui-react): keep tracker recovery from repeating announcements - #3980

Merged
schlessera merged 1 commit into
mainfrom
fix/3973-cold-tracker-hydration
Nov 11, 2026
Merged

schlessera merged 1 commit into
mainfrom
fix/3973-cold-tracker-hydration

Conversation

@schlessera

Copy link
Copy Markdown
Owner

Refs #3973
Refs #3414

What changed

A completed, failed or waiting tracker is no longer announced again when a recovery read briefly becomes unavailable or unknown and the next read repeats the same state. The announcer keeps its established baseline through that gap, and removes an unwatched-work marker when its tracker disappears. Genuine new states and turns still announce; the existing first settled unavailable baseline behavior is preserved.

Why this shape

D52 requires each work-state change to announce once. Unread observations describe the ability to check the work, rather than a new work transition. This adapts the established-baseline behavior already implemented in #3437 to current main, with a real browser recovery regression and marker-lifecycle coverage. #3414 retains its remaining stacked parallel-session qualification.

Proof

Head 5cf9cad26bc40492378976940ce449d46ac92532; base 40dbae0a2f332eb20c52c2a967611894ca30d289.

  • Original-main product source fails the added real-browser case at RECOVERY_DOES_NOT_REANNOUNCE_OLD_COMPLETION: expected an empty live region, received The voyage home is done. The test establishes a completed baseline after reload, injects a 503 at the browser request boundary, then recovers through the real host. Covered Chat cannot mark the tracker seen; recovery starts no work.
  • bun run test packages/ui-react/tests/tracker-announcer.test.ts packages/ui-react/tests/tracker-store.test.ts packages/ui-react/tests/trackers.test.ts packages/ui-react/tests/tracker-runtime.test.ts: 124 passed / 449 assertions, including all original 12 browser cells and the added case. Browser proof uses version-matched Bun 1.4.2 and real Google Chrome 156.0.8078.79.
  • Removing the recovery-baseline guard fails RECOVERY_DOES_NOT_REPEAT_COMPLETION; removing marker cleanup fails DISCARDED_TRACKER_STARTS_AS_A_BASELINE. Both exact restored controls pass, including the first unavailable baseline compatibility control.
  • Strict typecheck passed. bun run check:pr --base origin/main: all five gates passed, 804 fast-invariant tests. Complete pending changeset plan validates.
  • The original hosted response sequence was not captured. The controlled failure proves a matching announcement bug class; it does not establish that the original hosted run received a 503. Complete selected candidate proof and main recovery remain required.
{"version":1,"kind":"brain-check-pr-receipt","head":"5cf9cad26bc40492378976940ce449d46ac92532","base":"origin/main","mode":"focused","startedAt":"2026-11-11T10:50:51.713Z","finishedAt":"2026-11-11T10:52:58.300Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":15835.352661},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":190.624284000005},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":88.52319600000192},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":17.02997999999934},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":110436.96874399998}]}

Checklist

  • Focused failing-first, restored mutations, real browser proof and local preflight passed.
  • Complete selected hosted candidate and main recovery proof passed.
  • Current-main recovery behavior is covered; the original assertions and deadlines remain intact.
  • PR and advanced issues use the confirmed 0.45.0 release milestone; published packages remain 0.44.0.
  • A ui-react patch changeset is included and package names validate.
  • Leakage gates pass and examples use the established fictional corpus.
  • D52 records the recovery behavior. No exported API, wire grammar or provider-facing conversation changes.
  • This changes announcements only; it adds no admission, boot or authority guard.

Anything left open

Incident #3973 remains open until a main run covering its failed set passes. #3414 and its existing stack retain their remaining qualification; this PR references that work without closing it. PR #3979 independently adds the runtime fixture's free-space prerequisite, which must be retained during any later refresh. The separate #3977 safety-target fix and #3662 chat feature remain pending their own confirmation.

@schlessera schlessera added this to the 0.45.0 milestone Nov 11, 2026
@schlessera schlessera added type: fix Something is broken and must behave the way it is documented. area: ui-react React chat/files/voice components, stores, WebSocket transport. labels Nov 11, 2026
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 11:00
@schlessera
schlessera merged commit 0f6296a into main Nov 11, 2026
39 of 40 checks passed
schlessera added a commit that referenced this pull request Nov 16, 2026
…case (#3414) (#4058)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-react React chat/files/voice components, stores, WebSocket transport. type: fix Something is broken and must behave the way it is documented.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant