Skip to content

test(planning): wait for cross-page state before the UI suites act on it - #8436

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/ui-suite-read-races
Oct 19, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/ui-suite-read-races

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: main's post-merge verification run 39266464614 failed on ui_myreports.js.

Summary

ui_myreports.js failed on main (run 39266464614) because it read the owner page's copy of a report before that page had polled it. The same read-then-act race, and the route-handler-across-reload race that #8418 fixed, also sat in five other browser suites; this fixes all of them by waiting, never by loosening a check.

Fix

  • ui_myreports.js, ui_general.js, ui_review.js (two places) and ui_inbox.js wait with until() for a report, request or chat message to reach the other page before reading its id; four of those waits are new ok() checks, so a value that never arrives fails with a named check instead of a TypeError.
  • ui_uploads.js and ui_journey.js: route handlers that stay on across a reload or a closed page swallow the aborted request instead of crashing the suite.
  • No assertion was removed or loosened. A bump: none planning fragment says why no release is needed.

Verification

  • Each changed suite run alone 5 times: myreports 20/0, general 27/0, review 32/0, inbox 46/0, uploads 31/0, journey 31/0 on every run.
  • ui.test.sh in full at the default 6 jobs and at UI_JOBS=10: 34 suites, 1146 passed, 0 failed both times.
  • Left out: suites already guarded (advance, askbox, welcome, discussion, run_all) and route handlers not active across a reload (snappy, acceptance, telemetry, report, inputs).

Related

🤖 Generated with Claude Code

ui_myreports read the owner's report id before the owner's page had polled
it, so reportAct ran with an undefined id (main run 39266464614). Wait for
the report on the owner's page first, with a clear assertion if it never
arrives. The same read-then-act shape is fixed in ui_general (Claude's chat
answer after a reload), ui_review (the host's request ids, now an 8-10 s
wait with an assertion instead of a 5 s in-page poll that threw), and
ui_inbox (Bo's own request before the leak check). The upload and heartbeat
route handlers in ui_uploads and ui_journey now swallow a request aborted
under them, as #8418 did for ui_general.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 19, 2026 14:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T14:43:42.861981Z 553c8c7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 553c8c7fc15835d5d1d38f8ce3136833247f7b1d: 0 finding(s), 0 as inline comments.

No security issues found.

PR #8436 at head 553c8c7 changes only Playwright UI test suites under plugins/planning/shared/tests/ and adds a .changes fragment with bump: none. The test changes add until waits, add .catch(() => {}) on route handlers, and replace two inline polling loops. They touch no production code, auth, token or secret handling, workflow files, or standing instructions. No guardrail is deleted, narrowed or softened, so the instruction-surface lens doesn't apply. The register was not consulted because nothing here needed it.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 553c8c7fc15835d5d1d38f8ce3136833247f7b1d: 0 finding(s), 0 as inline comments.

No findings. I read the full diff (7 files) and the PR context. The PR has no closing issue, so there were no acceptance criteria to check.

  • Wait-before-read changes in ui_myreports.js, ui_general.js, ui_review.js and ui_inbox.js wait on the same condition the code reads right afterward, so they only add waiting. I found no assertion loosened or removed. Each suite imports until from browser_harness, so the new calls resolve. The until calls added in ui_myreports.js, ui_general.js and ui_review.js are wrapped in ok(), so a value that never arrives fails with a named check. In ui_inbox.js the wait is unchecked, but the next ok asserts the same state, so a timeout still fails there.
  • Route-handler .catch(() => {}) in ui_uploads.js and ui_journey.js only swallows a rejected abort, continue or fulfill on a request that a reload or closed page has already aborted. The assertions that follow (the sent counts in ui_uploads.js, the heartbeat beats count in ui_journey.js) are unchanged.
  • Planning fragment is bump: none, which fits a test-only change. The PR body has no Closes line, but it has the allowed No related issue: <reason> line.

I did not run the suites. The 5x-per-suite and full-run results in the PR's Verification section are author-claimed and unverified by me.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 9e7d9b5 Oct 19, 2026
40 of 51 checks passed
@kyle-sexton
kyle-sexton deleted the fix/ui-suite-read-races branch October 19, 2026 15:20
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