Repository navigation
fix(managed-child): honor process groups that vanish before cleanup - #119614
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 9:27 AM ET / 13:27 UTC. ClawSweeper reviewWhat this changesThis PR makes strict managed-command cleanup accept a process group that genuinely disappears between its liveness probe and SIGKILL attempt, while retaining rejection for real lingering descendants. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep open: the patch is a correct, focused repair for a current POSIX cleanup race, but the protected Priority: P2 Review scores
Verification
How this fits togetherThe live updater runs Git phases through the managed-child wrapper with strict process-tree exit verification. Cleanup results determine whether the updater proceeds to report a readiness failure and restore the prior LaunchAgent. flowchart LR
A[Live updater] --> B[Strict managed command]
B --> C[Detached process group]
C --> D[Liveness probe]
D --> E[Cleanup signal result]
E --> F[Readiness result]
F --> G[Rollback or update outcome]
Decision needed
Why: The patch is source-supported, but the available PR evidence does not directly show the after-fix operator-visible updater outcome, and protected-label handling requires a human choice. Before merge
Agent review detailsSecurityNone. PR surfaceTests +34, Other -8. Total +26 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep this lifecycle-owner repair, preserve fail-closed handling for successfully signaled live groups, and add a redacted live-updater transcript that shows the original readiness failure and rollback remain visible after the ESRCH race. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the added POSIX test creates a real exited child group, injects only the stale liveness result, and lets the actual cleanup signal return ESRCH; it was not executed in this read-only review. Is this the best way to solve the issue? Yes: the change fixes the lifecycle owner at the authoritative cleanup signal, retains strict rejection for real survivors, and matches the sibling process-group runner's ESRCH interpretation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d85920c03e25. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: (130 commits) refactor(qa): consolidate scenario runtime helpers (openclaw#119623) fix(telegram): bind Mini App auth to dashboard launches refactor(agent-core): unify session projection and compaction summaries (openclaw#119639) fix(codex): allow natural reactions in the current conversation (openclaw#119649) refactor(providers): deduplicate bundled model catalogs (openclaw#119627) fix(ui): observe the active service worker after asset refresh (openclaw#119622) fix(agents): strip echoed base64 image payloads so photo-heavy turns no longer hit the per-turn output cap (openclaw#119488) improve: make state-heavy test suites faster (openclaw#119617) perf(agents): add concurrency benchmark (openclaw#119569) fix(browser): visibly report failed pairing and tab-sharing actions (openclaw#119526) refactor(lobster): consolidate embedded workflow execution (openclaw#119630) fix(plugin-sdk): stabilize tuple-derived API baseline ordering (openclaw#119635) docs(skills): make full-authority maintainer runs unattended (openclaw#119629) fix(managed-child): honor process groups that vanish before cleanup (openclaw#119614) fix(ci): stop label-driven automation churn (openclaw#119610) fix(media): keep the ttl sweep out of the managed outgoing tree (openclaw#119127) fix(claws): remove owner-qualified skills (openclaw#119606) fix(clawrouter): show stable error for malformed usage responses (openclaw#119580) fix(gateway): claim malformed plugin icon routes (openclaw#119559) fix(telegram): preserve truthful empty-content delivery (openclaw#88810) ...
What Problem This Solves
Resolves a problem where live updater operations can fail with "Git fast-forward merge process tree could not be cleaned up" after a successfully exited Git process group disappears between its liveness probe and cleanup signal, masking the actual replacement readiness failure and breaking LaunchAgent rollback.
Why This Change Was Made
The managed-child lifecycle owner now treats Node process.kill(-pid, SIGKILL) throwing ESRCH as authoritative proof that the process group no longer exists, superseding the earlier stale liveness probe. Real lingering descendants still fail closed after cleanup; Windows behavior, timeout guarantees, and orphan draining remain unchanged. The owner implementation removes 8 net production lines.
User Impact
Live updater users retain accurate replacement-readiness failures and reliable LaunchAgent rollback instead of false process-tree cleanup errors. Actual surviving process groups remain rejected.
Evidence
Exact-head live-updater ESRCH and rollback runtime proof
Reviewed, unchanged head:
2bcfdd5f28a01f68b9fdc6e7db34d5474a5798e8. A remote-only, isolated fixture injected the stale liveness observation directly into the real live-updater Git merge after the kernel had already confirmed that its owned process group was absent. The unchanged production updater then preserved the original readiness error and restored the previous managed service:The existing deterministic managed-child regression and the original live-updater LaunchAgent rollback scenario both passed in the same exact-head run: 2 tests passed, 98 skipped. Remote runtime proof: https://github.com/openclaw/openclaw/actions/runs/31011790318.
Second rank-up move disposition: exact-head
build-artifactsand requiredopenclaw/ci-gateare already SUCCESS. The branch head is unchanged since the substantive ClawSweeper review, so rootAGENTS.mdexplicitly forbids a review-refresh round trip on an unchanged reviewed SHA; no bot re-review is warranted.