Repository navigation
fix(tests): desktop lobster scale and reconcile tests read the mascot mood before it renders - #2181
Conversation
… mood before it renders The mascot and the notification bubble reconcile on separate Reactor hosts, so bubble layout or message text does not mean the mascot has rendered the arrival mood. MascotScale captured its original mood too early and could then count the arrival as a scaling change; the Reactor reconcile test read the first-arrival mood and the second arrival's two mood changes once. Wait for the combined bubble and mascot condition with diagnostics, as openclaw#2178 does for the notification test. Test-only. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe PR waits for both notification rendering and the mascot's expected mood before continuing two native UI tests. Example: The scale test presents “Same popup” before testing 50%, 100%, 200%, and 75% mascot sizes.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs two remaining test synchronization races on main without weakening assertions; no introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherDesktopCompanionWindow shares presentation state between separate Reactor hosts for the mascot and popup; the native UI tests must observe both hosts before asserting settled behavior. flowchart TD
P[Presentation changes] --> M[Mascot Reactor host]
P --> B[Bubble Reactor host]
M --> W[Combined test readiness wait]
B --> W
W --> A[Scale and reconciliation assertions]
Technical reviewBest possible solution: Use the existing rendered-condition helper to settle both hosts while preserving scale, retained-control, and exact mood-replay assertions. Do we have a high-confidence way to reproduce the issue? Independent host reconciliation permits the existing tests to observe bubble readiness before the mascot mood changes; the body also reports repeated baseline failures, which this review did not rerun. Is this the best way to solve the issue? The patch is the smallest complete repair: strengthen the three existing readiness conditions, retain their assertions, and add useful timeout diagnostics without new helpers or production changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bf61595e68f1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 13, 2026, 2:51 PM ET / 19:51 UTC. |
Picks up openclaw#2181, which fixes the racy desktop mascot test failing this PR's CI. Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes: two desktop lobster UI tests fail intermittently in CI because they read the mascot's mood before the mascot has rendered a notification's arrival.
User Impact
User impact: no product change.
DesktopCompanionWindowTestsstops producing intermittentMascotScale_…andReactor_ReconcilesNotifications_…failures.Why This Change Was Made
The mascot and the notification bubble reconcile on separate Reactor hosts. Each re-renders independently after
presentation.Changed, so bubble layout or bubble message text does not mean the mascot has applied the arrival mood. #2178 fixed this forNotification_UsesExistingMascot_ShowsLiteralText_AndDismissesLocally. This PR applies the same pattern to the two remaining tests with the same race:MascotScale_UpdatesLayoutAndHitRegionWithoutScalingOrReplacingPopupcapturedoriginalMoodafter bubble layout alone. If the arrival mood rendered later, it landed during the scaling loop and failed the final mood checks.Reactor_ReconcilesNotifications_RetainsMascot_AndDoesNotReplayOnThemeChangeread the first-arrival mood once after the message text appeared, and checked the second arrival's two mood changes (Idle, then Happy) once.Following #2178, each test now waits with one combined
WaitForRenderedConditionAsynccondition across both hosts, with a diagnostics lambda, then keepsAssert.Sameand the existing final assertions. No assertions were removed. The scale test gains anAssert.Sameon the mascot. No sleeps or retries were added; this is a test-only change and #2178's notification test is unchanged.Evidence
ff530013e)MascotScale(chatOpen: True)failed 3/15: expected Idle, actual Happy at the final mood checkDesktopCompanionWindowTestsclassChange Type
Scope
winnodeRequired proof pools
none: a test-only synchronization change, proven by the native UI test class itself in hosted CI.Validation
./scripts/validate-test-timing-patterns.ps1: passed../build.ps1: passed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj: passed, 5,862 passed, 29 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: passed, 6,489 passed, 0 failed.Real Behavior Proof
OPENCLAW_TRAY_DATA_DIR,OPENCLAW_TRAY_APPDATA_DIRandOPENCLAW_TRAY_LOCALAPPDATA_DIR.dotnet test tests/OpenClaw.Tray.UITests --no-build -c Debug -r win-x64 --filter "FullyQualifiedName~DesktopCompanionWindowTests.MascotScale|FullyQualifiedName~DesktopCompanionWindowTests.Reactor_Reconciles|FullyQualifiedName~DesktopCompanionWindowTests.Notification_UsesExistingMascot", 20 times; the whole class 5 times.Security Impact
Yes, explain the risk and mitigation: N/ACompatibility and Migration
Review Conversations