fix(test): wait for the startup composer before pointer assertions - #5979
fix(test): wait for the startup composer before pointer assertions#5979Hmbown wants to merge 1 commit into
Conversation
Buildkite 1861 and 1867 failed on Linux with partial launch frames; all cited macOS jobs passed. Wait for the composer and cleared onboarding as well as the launch header, preserving all startup and pointer queue assertions. Validation: focused all-features cucumber test 1 passed, 0 failed across five PTY sizes (40x12 through 140x40); cargo fmt --all -- --check passed; git diff --check passed. npm test and npm run check:web both unavailable: root package.json defines neither script. Hosted CI not run for this commit. Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e1f98906-bf40-4621-a8e6-8f8b5c3217b3) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @Hmbown's task in 1m 58s —— View job Review: PTY startup-readiness wait fix
Summary: This is a well-targeted, minimal test-only fix. Verdict: looks good to merge.
I checked the Also confirmed:
No correctness, provider/route-safety, reuse, or security issues found. No new test coverage is needed since this fixes flakiness in an existing regression test rather than adding behavior. Note on verification: I could not run |
There was a problem hiding this comment.
🟢 Approval recommended
The change is a small, test-only synchronization improvement that uses existing harness primitives and does not alter the asserted behavior beyond waiting for the UI to settle.
Pull request overview
Stabilizes the real-PTY cucumber regression active_composer_pointer_submit_queues_without_provider by waiting for a fully-settled startup screen (launch header + composer prompt + onboarding cleared) before running the existing startup and pointer-submit assertions, addressing a redraw-splitting flake observed on Buildkite/Linux PTY.
Changes:
- Replaces a single-string
wait_or_panic(..., "New session", ...)with aHarness::wait_forframe predicate that also requires the composer prompt (❯) and absence of onboarding copy ("You're ready."). - Preserves existing
assert_startup_contractand downstream pointer/queue assertions, changing only synchronization timing.
File summaries
| File | Description |
|---|---|
| crates/tui/tests/cucumber/active_composer_pointer_pty.rs | Strengthens startup wait condition to ensure the composer is painted and onboarding text is cleared before asserting startup/pointer behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Codewhale review
Test-only synchronization change in the active composer pointer PTY cucumber test replaces the single launch-header wait with a frame predicate that also waits for the composer prompt and for onboarding copy to clear before existing startup and pointer assertions run.
Assessment
The change is low risk and directly addresses the described PTY redraw race. Existing startup and pointer-queue assertions are preserved, and the strengthened wait condition should prevent the flaky mid-redraw assertion without hiding the original failure mode.
Advisory review by Codewhale (codewhale review --pr 5979 --post, head 2416013a5e3fae5e80f917d549b361d388160672). Line-specific findings are also posted as inline review comments; mechanical fixes arrive as committable suggestions you can apply from the Files tab. CODEOWNERS approval still governs merge.
Test-only fix for the Buildkite/Linux PTY flake (#1861/#1867 died asserting mid-redraw: the launch header arrives before the composer, with onboarding rows still on screen).
Waits for the launch header + composer + cleared onboarding before asserting the existing startup contract. All startup and pointer-queue assertions preserved — it still catches the failure mode, after the redraw settles.
Audit: verified honest (see codewhale-ops/AUDIT-REPORT-V0913-20260907.md).
Validation: focused all-features cucumber test 1 passed / 0 failed across five PTY sizes; cargo fmt clean. Hosted CI runs on this PR.
Note
Low Risk
Test-only synchronization change in a long-running PTY regression; no production code paths affected.
Overview
Stabilizes the real-PTY active composer pointer cucumber test after onboarding by replacing a single-text wait on
"New session"with a frame predicate that also requires the composer prompt (❯) and confirms onboarding copy ("You're ready.") is gone.This targets Buildkite/Linux flakes where PTY reads split a redraw so the launch header appears before the input surface is painted.
assert_startup_contractand the rest of the pointer-submit checks are unchanged—the test just waits for a fully settled startup UI before those assertions run.Reviewed by Cursor Bugbot for commit 2416013. Bugbot is set up for automated code reviews on this repo. Configure here.