Repository navigation
fix(e2e): stabilize flaky E2E tests against timing races - #20900
AmethystLiang merged 2 commits into
Conversation
There was a problem hiding this comment.
ℹ️ No critical issues — one minor consistency suggestion inline.
Reviewed changes
- Cold-activation oracle — the pre-activation assertion now waits for a stable
{ mounted: 0, parked: 8 }state viaexpectStableColdActivationMountStateinstead of the one-shot read that raced the parking sweeper. - Native chat hydration — user/assistant text assertions are scoped to the
[data-native-chat-root="true"]transcript subtree so chrome (worktree row, tab title) can't match. - Onboarding skip path — publishes a verified/ready host status snapshot at max sequence so the registered server reads
availableand a later hydrate can't downgrade it. - Paired-web unavailable host — encodes the blocked/disconnected fault in
entry.snapshot(transport/verification/retired) at max sequence rather than a status-only write. - Quick-open tooltip — clears the pointer before re-hovering and widens the retry/timeouts.
- Terminal attention — seeds the tab bell with the
'terminal-bell'marker value (matches production; a bare call storesundefined, which the DOM ignores).
ℹ️ Nitpicks
- Both specs hardcode
2_147_483_647as the "cannot be outbid" sequence sentinel. A shared named constant would keep the intent discoverable and flag the assumption if the store's sequence semantics ever change.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe changes update five end-to-end tests. The terminal test now checks the stable parked state. The onboarding test publishes a verified ready host snapshot and uses a longer assertion timeout. The native chat test scopes transcript assertions. The quick-open test clears stale tooltips and increases retry timeouts. The terminal attention tests pass the explicit Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The stabilized E2E setup supplies the required verified host and terminal marker values; no merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem and lists the main stabilization changes, but it omits required template sections and information. It does not include a linked issue, a dedicated Visual Proof section with the required N/A explanation, AI Disclosure, Review, Agent skill upstream boundary, or Notes content. Resolution Add all required template sections. Include a valid issue reference after "Fixes #". Add a Visual Proof section with exactly "N/A" and a brief reason for the test-only changes. Complete or explicitly address AI Disclosure, Review, Agent skill upstream boundary, Notes, and the remaining Testing and Checklist items.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Warning Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use 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. Comment |
- Paired terminal: use stable cold activation assertion instead of racy one-shot read; background tabs park eagerly. - Native chat: scope hydration assertions to transcript subtree to avoid false positives from UI chrome (worktree rows, tab titles). - Onboarding: inject verified status snapshot with max sequence to prevent hydration from downgrading host health during skip-to- project-setup. - Paired web: encode host health faults in snapshots with high sequence so real hydrations cannot outbid injected state. - Quick open: clear prior tooltips and increase hover timeouts to handle streaming result remounting. - Terminal attention: pass 'terminal-bell' to unread marker to match production contract (reads marker value, not presence).
0aee6e7 to
618ecae
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta since pullfrog's prior review (0aee6e7607): the branch was rebased and one new commit landed.
- Terminal attention pane seed —
markTerminalPaneUnread(paneKey, 'terminal-bell')now supplies a truthy reason, soapplyTerminalPaneAttentionToManageractually setsdata-terminal-attention; the prior bare call storedundefined, which the reads-value consumer ignores even though the keys-only helper still passed. This also clears theTS2554flagged in the prior review. - Paired-web change removed —
paired-web-add-project-unavailable-host.spec.tsis no longer in the diff;mainnow ships an equivalent, strictersetOnlyRuntimeHostHealth(snapshot atNumber.MAX_SAFE_INTEGER, #20003), so the rebase dropped a redundant hunk rather than a live fix.
ℹ️ PR description still lists the dropped paired-web change
The PR body and the 248fe4bb8d commit message both advertise a paired-web host-health fix that is no longer in the diff. Harmless for a test-only PR, but worth correcting so the description matches the branch.
Technical details
# Stale PR description
## Affected sites
- PR #20900 body — "Paired web host health: Encode faults in status snapshot at max sequence..." bullet
- commit `248fe4bb8d` message — "Paired web: encode host health faults in snapshots with high sequence..."
## Required outcome
- Description and commit message match the actual 5-file diff (no paired-web file).
## Suggested approach (optional)
- Drop the paired-web bullet; `main` already carries the fix (#20003).DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
) * fix(e2e): stabilize flaky E2E tests against timing races - Paired terminal: use stable cold activation assertion instead of racy one-shot read; background tabs park eagerly. - Native chat: scope hydration assertions to transcript subtree to avoid false positives from UI chrome (worktree rows, tab titles). - Onboarding: inject verified status snapshot with max sequence to prevent hydration from downgrading host health during skip-to- project-setup. - Paired web: encode host health faults in snapshots with high sequence so real hydrations cannot outbid injected state. - Quick open: clear prior tooltips and increase hover timeouts to handle streaming result remounting. - Terminal attention: pass 'terminal-bell' to unread marker to match production contract (reads marker value, not presence). * fix one last test

Problem
E2E tests are failing intermittently due to timing races between async operations: tab parking, status hydration, tooltip rendering, and terminal state updates.
Solution
Multiple targeted fixes to await stable states and scope assertions correctly:
'terminal-bell'marker value tomarkTerminalTabUnread()instead of relying on undefinedTesting
These are test-stabilization fixes only; no new test coverage needed.
Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)