Skip to content

ui-react: accepted answers can appear as two cards under load #4475

Closed as duplicate

Description

@schlessera

Context

The real Chrome answer-delivery suite intermittently records two answer cards after a single accepted response. The unchanged assertion at packages/ui-react/tests/answer-delivery-runtime.test.ts:541 expects one; cards in packages/ui-react/tests/fixtures/answer-delivery-client.ts:56 counts exchanges across the chat buffers. The preceding assertions confirm one backend settlement, the expected answer and ANSWERED UI state.

This reproduces independently at main 7e861bdb3, using main's own test preload, Bun 1.4.2 and real Chrome. A first complete file run passed 24/24. Repeating the four online cases with four CPU burners produces the identical expected-1/received-2 failure for list, rank and form. No native-isolation PR code is loaded in this baseline run. The underlying reconciliation cause is not yet established.

Out of scope

Do not weaken the card-count, receipt or exactly-once settlement assertions. No native isolation or transport changes.

Scope

Find whether duplicate exchanges arise from history/live-stream reconciliation or buffer accounting, and correct the responsible behavior.

Acceptance criteria

  • The existing online cases keep one exchange after one accepted answer, including under CPU load.
  • Preserve receipt-before-answered and exactly-once backend settlement behavior.
  • Add a controlled reproduction of the responsible ordering; do not use sleeps to conceal it.

Verification

Run bun run test packages/ui-react/tests/answer-delivery-runtime.test.ts and repeat its online, the card says cases under CPU load. The observed baseline command uses --test-name-pattern 'online, the card says' --rerun-each 10 and four independently tracked CPU burners.

Found during the complete unit selection for #4314. This is an independently reproduced main failure, filed without a milestone; it is not fixed in that guard PR.

Contract impact

None expected; preserve current UI and answer-delivery contracts.

2026-11-23 triage at main a3395c4: duplicate of #3834 (same assertion, trigger and attributed fixture cause); see the triage comment. needs: human to close it as a duplicate; not agent-ready.

Activity

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    needs: humanWaiting on an action only a human can perform. State the required action in the issue.
    on Nov 22, 2026
  2. schlessera commented on Nov 23, 2026

    @schlessera
    OwnerAuthor

    2026-11-23 triage at main a3395c4: this is the signature and trigger already attributed in #3834, which is open and agent-ready under #2753.

    Recommended action (needs a maintainer, outside triage): close this as a duplicate of #3834. The CPU-burner command recorded here (--test-name-pattern 'online, the card says' --rerun-each 10 beside four burners) is a useful extra confirmation run for #3834's PR. Added needs: human until then; not agent-ready.

  3. schlessera commented on Nov 23, 2026

    @schlessera
    OwnerAuthor

    Closed as a duplicate of #3834 by maintainer decision (2026-11-23): same assertion and trigger. Further evidence belongs on #3834.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.needs: humanWaiting on an action only a human can perform. State the required action in the issue.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions