Repository navigation
perf(test): complete managed handoff explicitly - #125129
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:53 AM ET / 06:53 UTC. ClawSweeper reviewWhat this changesThe PR makes the managed-service handoff lifecycle test wait for the helper’s readiness output, then explicitly end the simulated parent process instead of waiting for a 750 ms timer. Merge readinessKeep open: this is a coherent, current test-only improvement with no blocking correctness or security finding. The Priority: P3 Review scores
Verification
How this fits togetherManaged-service updates launch a detached helper that waits for the existing Gateway process to exit before running the updater. This test simulates that handoff boundary and verifies the helper completes after an indefinite parent wait is deliberately released. flowchart LR
A[Existing Gateway process] --> B[Detached handoff helper]
B --> C[Ready signal]
C --> D[Test ends parent input]
D --> E[Helper runs update]
E --> F[Terminal handoff result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +34. Total +34 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the explicit readiness-to-parent-completion test sequence once the exact-head required checks are green; it removes timer-dependent test latency without changing production behavior. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main waits for a fixed 750 ms simulated-parent lifetime, while the focused test can measure the resulting timer-bound completion path. The review was read-only and did not run the test. Is this the best way to solve the issue? Yes. The production helper emits readiness before it polls the parent, so using that existing transition to gate explicit parent completion tests the intended lifecycle boundary rather than a timer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 83d279a4c18a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for source
|
|
Merged via squash.
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: perf(test): complete managed handoff explicitly This is item 2/3 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What Problem This Solves
The managed-service handoff lifecycle test used a fake parent that exited naturally after 750 ms. That incidental timer dominated the case and made completion timing depend on process lifetime rather than the handoff state transition under test.
Why This Change Was Made
The helper already emits
OPENCLAW_UPDATE_HANDOFF_READYbefore it starts polling the parent. The test now observes that READY signal, proves the parent is still alive, closes the parent stdin explicitly, and then awaits helper completion. This preserves the state-machine coverage while making parent completion deliberate instead of timer-driven.User Impact
No production behavior changes. This is test-only (+48/-14), reduces managed-handoff suite latency, and makes the indefinite-parent-exit case deterministic. No changelog entry is needed.
Evidence
tbx_01m076q9jhr2jg8k23y72fea01: https://github.com/openclaw/openclaw/actions/runs/32002065866ac5c8be00196bad2fca0f87b756c859efa8aae89.aaee6b59e21aedb84de55606eb3aecd262135aaf.