Skip to content

test: wait for the first tab to hear the draft settle before the late-refusal check - #6173

Merged
leaf-agent merged 1 commit into
mainfrom
fix/late-refusal-heard-settlement
Nov 16, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/late-refusal-heard-settlement

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

test_a_late_refusal_cannot_restore_an_attempt_another_tab_settled[None] failed in push run 43877886146 because the test refused the first tab's send before that tab had heard that the draft was settled. The test holds the first tab's state read, so that tab learns about the second tab's send only from the drafts read the same news look starts. The test waited for the server to hold the draft settled (until_draft_settled), which says nothing about what the tab has heard. When the refusal won the race, keepRefusedWords still found the tab's unsettled record carrying the refused attempt. It raised the error on the reply field rather than in the panel, so the panel wait ran until the held state read's 120 s timeout turned it into "Lost the connection — reconnecting".

The test now waits on the tab's own copy, through draftHasContent, which check-api.js now exports. loadDraft (heard_draft) can't answer this, because it hides a generation while the tab is sending it. Product code is unchanged.

Verification on this runner: the test failed 16 of 17 runs on main and on commits back to #6162, each time with the CI diagnostic. With the change, it passed 11 of 11. CI passed this test at e65b8507e, so it's timing-dependent, not a regression from a recent commit.

Refs #3985 — automated triage

… refusal

test_a_late_refusal_cannot_restore_an_attempt_another_tab_settled[None] holds the first tab's state read, so the only way that tab learns the second tab's send settled the shared attempt is the drafts read the same news look starts. The test waited for the server to hold the draft settled (until_draft_settled), which says nothing of what the tab has heard. When the refusal arrived before that drafts read landed, keepRefusedWords still found the unsettled record carrying the attempt, so the error covered the reply field rather than the panel, and the panel's wait ran out at 120 s into the state read's own timeout ("Lost the connection — reconnecting").

The test now waits on the tab's own copy through draftHasContent, which check-api.js exports for it. loadDraft can't answer this: it masks a generation while the tab is sending it. No product behavior changes.

Refs #3985
@leaf-agent
leaf-agent merged commit f1b3673 into main Nov 16, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/late-refusal-heard-settlement branch November 16, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant