Repository navigation
chore(android): remove idle waits from queued-action tests - #159077
Conversation
|
🦞👀 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. Reviewed September 26, 2026, 2:31 PM ET / 18:31 UTC. ClawSweeper reviewWhat this changesThe Android test branch replaces two ten-second Gateway socket waits with session-admission assertions for queued saved-Gateway and conversation-notification actions. Merge readiness✅ Ready for maintainer review Keep open. Current main still has the two idle waits, and the proposed assertion matches the direct cleartext admission path. I found no actionable patch defect. Priority: P3 Review scores
Verification
How this fits togetherAndroid’s ViewModel coordinates Gateway connections with the foreground service. These tests queue connection actions, stop the service, and check whether retired work reaches Gateway session admission. flowchart LR
A[Gateway action] --> B[Queued ViewModel operation]
C[Service stop] --> B
B --> D[Runtime admission decision]
D --> E[Gateway session probe]
B --> F[Operation settles]
E --> G[Regression assertion]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the stale-action regression at the Gateway admission boundary and retain timed socket checks for actions whose effects can outlive the joined operation. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main still routes both cases through a ten-second request wait. The PR reports measured before-and-after runs; this read-only review did not execute them. Is this the best way to solve the issue? Yes. For these cleartext actions, the joined operation and call-through session probe provide a narrower check than waiting for a delayed socket request. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e67317ae3b59. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Two Android service lifecycle tests each spend ten seconds waiting for a Gateway request that settled, retired activity work must never admit.
User Impact
No user-visible change. This removes approximately 20 seconds of idle waiting from each invocation of the affected test class while preserving its stale-action regression coverage.
Why This Change Was Made
The saved-Gateway and conversation-notification fixtures use cleartext connections whose session admission completes before the awaited ViewModel operation returns. Extend the existing call-through connection probe to assert that no new target was admitted after that operation settles. The probe still calls the real Gateway session implementation, and initial node/operator admissions verify that it is active.
Refresh, bootstrap promotion, and foreground-reentry retain their existing waits because their asynchronous owners do not share that settlement boundary. No production behavior, timeouts, retries, worker settings, or heap settings change.
Evidence
NodeForegroundServiceTest: 53/53 passed in each run using:app:testThirdPartyDebugUnitTest --tests ai.openclaw.app.NodeForegroundServiceTest.CI on the published head passed both app editions, Wear tests, and lint. The third-party job JUnit report records 53/53 passing cases, 51.794 seconds for the class, with the two changed cases at 0.164 + 0.095 = 0.259 seconds. The entire job took 441 seconds; its Gradle test step took 364 seconds. These job/step durations include the other test classes and setup.