Skip to content

test(ci): wait for the work under test in five checks that failed on a loaded runner - #4698

Merged
devswha merged 2 commits into
mainfrom
fix/main-red-1125b
Nov 25, 2026
Merged

devswha merged 2 commits into
mainfrom
fix/main-red-1125b

Conversation

@devswha

@devswha devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What broke

main went red on five checks, none of them a product regression: each one timed or counted its way past the work it checks, and a loaded CI runner outran it.

  • CI run 45559180115 (Fast checks): src/components/review-client-p12.test.ts "RED P12b-F6" and src/components/UnconfirmedPcNotices.test.tsx "writes the invited record before the card goes". Both press a card's Add and then settle a fixed 20 timer turns. The press's work (the number Add's onClick is void, and the invited Add was voided on purpose behind a held lock) signs and writes the list through WebCrypto. With 24 copies at once on this PC, the card still showed "PC is not in your account's list yet. Try again." (the in-flight placement) when the test asserted. RED P12-F9 has the same shape and failed the same way under load.
  • CI run 45558592545 (browser, other 2/3 and 3/3):
    • sidebar-context-ring-demo-regression.ts:82 (boundingBox() null) and reply-comments-demo-regression.ts:214 ("the chat did not move under the selection", scrollTop 503 -> 564). Both use the demo's api pane, whose opening turn finishes on its own setTimeout(finishOpeningTurn, 4500). When a slow page load reaches that timer mid-check, the api agent turns done, so its row folds under +N resting and its chat grows by the final answer. fix(sidebar): keep an agent's helper with it across the resting line #4675 (the family fold) is not the cause and is unchanged: a resting agent folded before it too.
    • prompt-card-lifetime-browser-qa.ts "blocked edge" measured Date.now() around page.evaluate, the server read, the 250 ms quick re-read, the render and Playwright's waitFor retry backoff, against 1000 ms. CI got 2034 and 1022 ms, and in the CI runner image with 5 runs at once 3 of 5 failed (1057 to 1391 ms).

Fix (tests only)

  • The account tests' press waits until the card's buttons are enabled again (the card's act clears busy when its work is done), with a 10 s bound. The two lock tests wait until the PC is in the list, then until the Add is done. No fixed sleep.
  • The two demo scripts set the existing __ovisDemoHoldTurn fixture hook, the same fix as test(browser): keep the demo finish notice out of workspace reorder #4682 and other demo scripts (agent-groups, sidebar-peek and more).
  • The prompt card check times the gap between the edge's read and the next one as they arrive at the server. That is still a timing check, because promptness is the behaviour under test: the quick cadence (BLOCKED_PROMPT_READ_MS 250) must beat the 2 s poll. Page and test steps are no longer counted. The card must still appear.

No product, UI or contract change.

Validation

  • Account tests, 24 copies at once on the P620 (load ~200 on 128 cores): before, 2 to 10 of 24 runs failed F6, invited-record, F9 and "stays, once the account admitted"; after, 48 of 48 runs pass (79 pass, 0 fail each).
  • In the CI runner image (herdr-ci-runner:local on old-desktop, --cpus 24), 5 at once each: sidebar-context-ring 5/5 and reply-comments 5/5 with the fix (UI_EVIDENCE_DIR set, as in CI). prompt-card-lifetime: 2/5 before, 6/6 after (re-read gap 304 to 355 ms).
  • bun run check fast in the same image at 256572b (this commit before its rebase onto b0f20e7, which touched none of these files): generated files, typecheck and build pass; unit tests all pass but server/ssh-account-add.test.ts "a confirmed host key connects...", which fails the same way when run alone in that container (its sshd closes the connection) and passes in CI's Fast checks; this PR touches no server file.
  • Not run: bun run check full.

Not in this PR: on 6946dcb, ui-contexts-regression.ts timed out at 600 s while every one of its steps was passing (its TIMING lines add up to 597 s; it usually takes 280 to 330 s). That is runner load against the CI per-script budget, a workflow setting this PR does not touch.

…aded runner

- review-client-p12 and UnconfirmedPcNotices: a press waits until the card's
  buttons are enabled again (its work is done), and the lock tests wait until
  the PC is in the list, instead of 20 timer turns that a loaded runner outran.
- sidebar-context-ring and reply-comments: hold the demo's opening turn, which
  finished the api agent on its own 4.5 s timer (folding its row under
  +N resting, growing its chat under the selection).
- prompt-card-lifetime: time the quick re-read after the blocked edge between
  the two reads' arrival at the server, not across the page and test steps.
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Summary by CodeRabbit

  • Tests
    • Improved the reliability of timing-sensitive checks under busy CI conditions. Card interactions now wait for updates to complete, demo checks account for the opening turn, and prompt-read timing is measured between server arrivals.
    • These adjustments reduce the chance of intermittent test failures without changing app behavior.

The changes update five CI checks to wait for the work they test. Component tests poll for completed card actions, demo checks hold the opening turn, and the prompt-card check measures the interval between server-side reads.

Changes: CI Test Timing Synchronization

Layer / File(s) Summary
Wait for component card operations
src/components/UnconfirmedPcNotices.test.tsx, src/components/review-client-p12.test.ts
Test helpers poll until card buttons are enabled. Race tests wait for the PC record to appear before checking card visibility.
Hold the demo opening turn
scripts/reply-comments-demo-regression.ts, scripts/sidebar-context-ring-demo-regression.ts
Regression contexts set window.__ovisDemoHoldTurn before navigation or page creation.
Measure prompt read intervals
scripts/prompt-card-lifetime-browser-qa.ts, changelog.d/main-red-test-races.md
The harness returns server-arrival timestamps to waiters. The blocked-edge check asserts that the interval between reads is under 1,000 ms. The changelog records the updated waits and timing scope.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • Issue 4026: The PR updates browser checks in the same CI flake category tracked by this issue, but does not address every listed script.
Merge Risk: Low · up to 03604

This change makes five flaky CI checks wait for the work they test, with no product behavior change. The remaining concern is a small possible ordering gap in the lock tests that was not confirmed. Merge risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: five CI test checks that failed on a loaded runner now wait for the work under test, not fixed timers. It matches the raw summary and the objectives, and it follows th…
Description check Passed The description follows the template. It has a Change section that explains the problem and the resulting behavior, and a Validation section that lists the checks run and the one skipped (bun run chec…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: five CI test checks that failed on a loaded runner now wait for the work under test, not fixed timers. It matches the raw summary and the objectives, and it follows the test(ci) convention.

Full details: Description check

Explanation

The description follows the template. It has a Change section that explains the problem and the resulting behavior, and a Validation section that lists the checks run and the one skipped (bun run check full). The Change section does not link an issue, but the template only asks for a link on features, and this PR is a test-only fix. The changelog entry is in changelog.d/, as the template's comment asks.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha devswha changed the title test: wait for the work under test in five checks that failed on a loaded runner test(ci): wait for the work under test in five checks that failed on a loaded runner Nov 25, 2026
@devswha devswha closed this Nov 25, 2026
@devswha devswha reopened this Nov 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

src/components/UnconfirmedPcNotices.test.tsx-791-791: 1

791-791: <pictu[REDACTED]e><img s[REDACTED]c="https://sto[REDACTED]age.googleapis.com/code[REDACTED]abbit_public_assets/[REDACTED]eview-comment-icons-v1/ambe[REDACTED]-16.svg" width="16" height="16" align="absmiddle" alt=""></pictu[REDACTED]e> Mino[REDACTED] · Functional Co[REDACTED]ectness · Quick win

<pictu[REDACTED]e><img s[REDACTED]c="https://sto[REDACTED]age.googleapis.com/code[REDACTED]abbit_public_assets/p[REDACTED]e-me[REDACTED]ge-checks-wa[REDACTED]ning.svg" width="20" height="20" align="absmiddle" alt=""></pictu[REDACTED]e> Unve[REDACTED]ified finding
Ve[REDACTED]ification [REDACTED]an but could not confi[REDACTED]m this finding. It is shown fo[REDACTED] [REDACTED]eview, not as a ve[REDACTED]ified issue.

Wait fo[REDACTED] the [REDACTED]eco[REDACTED]d lock [REDACTED]equest befo[REDACTED]e checking the ca[REDACTED]d.

The PC can appea[REDACTED] in list.view() befo[REDACTED]e Add [REDACTED]eaches noteAct. If the continuation is delayed, this asse[REDACTED]tion can pass and [REDACTED]elease the lock without checking the ca[REDACTED]d du[REDACTED]ing the blocked w[REDACTED]ite. Signal when the lock stub is ente[REDACTED]ed, and wait fo[REDACTED] that signal befo[REDACTED]e asse[REDACTED]ting. The numbe[REDACTED]-Add lock test has the same gap. ([REDACTED]aw.githubuse[REDACTED]content.com)

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d9643f0 and 0360426.

Files selected for processing: 6

  • changelog.d/main-red-test-races.md
  • scripts/prompt-card-lifetime-browser-qa.ts
  • scripts/reply-comments-demo-regression.ts
  • scripts/sidebar-context-ring-demo-regression.ts
  • src/components/UnconfirmedPcNotices.test.tsx
  • src/components/review-client-p12.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@devswha
devswha merged commit 120166b into main Nov 25, 2026
15 checks passed
@devswha

devswha commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 036042643. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

CodeRabbit hit its limit on the first head and left no findings; gate reviewer CLEAR (Dori lane main-red-1125b)

@devswha
devswha deleted the fix/main-red-1125b branch November 25, 2026 10:19
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