Repository navigation
test(gateway): stabilize yielded-session settlement - #149558
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 15, 2026, 9:58 PM ET / September 16, 2026, 01:58 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR isolates the yielded-session regression test, waits for specific completion state without advancing fake time, improves cleanup diagnostics, and makes PR-wrapper dependency fixtures repeatable. Merge readiness✅ Ready for maintainer review The test stabilization remains useful and is not present on fetched main. No blocking correctness or security finding was identified; the member-authored PR should remain open for normal maintainer handling. Priority: P3 Review scores
Verification
How this fits togetherGateway session messaging resumes paused child tasks, while the subagent registry schedules delivery of their combined results to the parent. These tests check that lifecycle and configure its isolation from other tests. flowchart TD
A[Session resume test] --> B[Isolated Gateway test process]
B --> C[Session messaging handler]
C --> D[Child registry and task state]
D --> E[Scheduled parent wake]
E --> F[Combined result delivery]
F --> G[Completion and cleanup assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +75. Total +75 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep lifecycle assertions synchronized to their actual state changes, preserve teardown leak detection, and reuse the existing isolated test lane. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the timing mechanism: default Vitest polls advance fake time while this test owns a future requester wake. The captured discussion reports CI failures; this review did not execute a reproduction. Is this the best way to solve the issue? Yes. The patch uses existing test isolation and observes lifecycle facts without relaxing delivery assertions, increasing timeouts, or changing production scheduling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4321816e2a76. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Main's duplicate alias initialization is now repaired at its caller by #149520 ( At audited head |
* test(gateway): stabilize yielded-session settlement * test(pr): prepare dependencies for alias handoff fixtures (openclaw#149488) * test(pr): refresh wrapper dependencies idempotently --------- Co-authored-by: Peter Steinberger <[email protected]>
landed for prior shard failures) Co-Authored-By: Claude <[email protected]>
Carry the test-only correction from 2dd0ed9 (#149558). Preserve both idempotent alias setup calls and the yielded-session completion and zero-root cleanup contracts. Adapt only the wrapper fixture hunks to the frozen metadata branch; runtime and dependency inputs remain unchanged. Co-authored-by: Vincent Koc <[email protected]>
Summary
Problem
Main CI run https://github.com/openclaw/openclaw/actions/runs/35028916689 failed in
checks-node-compact-large-26while this regression waited for the process-wide Gateway root count to reach zero.The test uses fake timers and owns a future requester-settle wake. Vitest advances fake time on every default
vi.waitForpoll, so a slow shard can fire that future wake while the test is trying to observe unrelated cleanup quiescence. The file also replaces process-global registry and task state while running in the shared Gateway methods project.Solution
Route the file through the existing isolated Gateway methods project. Replace body-level global-quiescence waits with zero-interval waits for the exact lifecycle facts produced by each action. Keep the teardown leak invariant and report named root holders when it fails.
Validation
node scripts/run-vitest.mjs src/gateway/server-methods/sessions.send-yield-resume.test.tsnode scripts/run-vitest.mjs test/vitest-projects-config.test.tsnode scripts/check-changed.mjs --dry-run -- <changed paths>node scripts/check-changed.mjs -- <changed paths>git diff --checkProduction code delta: 0.