Repository navigation
fix: preserve relay cleanup after authority rejection - #183247
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Fixed: OpenClaw now preserves the authority rejection while admitted relay descendants complete acknowledged cleanup. |
Preserves the expected authority rejection while admitted relay descendants settle through the existing acknowledged cleanup lifecycle.
|
Seen in production on 2026.10.7 (Linux, systemd user unit): after one post-admission exec authority rejection (logged as |
Backport main #183247 for the exact Docker CLI backend startup-cleanup failure in FRV 41143541683. Keep an admitted native relay transport alive long enough to cancel through its owner and receive kernel descendant-extinction evidence. Co-authored-by: Shakker <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes an exec lifecycle failure when source authority expires immediately after a native relay launch is admitted. The command is correctly rejected, but the relay host previously disconnected lifecycle IPC before the native owner could finish its closing-receipt and sequence-ACK handshake. That premature disconnect could replace the expected authority rejection with
service child cleanup identity lost: write EPIPEand leave cleanup reported as uncertain.User Impact
OpenClaw now preserves the original authority rejection while the already-admitted command and its descendants settle through the existing native cleanup lifecycle. Pre-admission failures and genuine transport loss keep their existing fail-closed behavior. Missing or invalid closing evidence still rejects cleanup; this change does not accept lineage EOF as extinction or relax the receipt, ACK, sequence, descendant-reaping, deadline, or cancellation requirements.
There are no configuration, schema, protocol, public API, dependency, or migration changes.
Why This Change Was Made
The relay's
readyreceipt already establishes the distinction the host needs: before readiness there is no admitted command, while afterwards the host owns a live authenticated cancellation transport. The construction-failure path now passes that existing cancellation operation to the relay retirement owner after admission. The same helper retains its prior direct owner-stop behavior when no command was admitted, so startup and true transport-loss paths are unchanged.The private-input authority test continues to verify rejection before stdin is written, but no longer requires the obsolete direct-child-kill implementation. The unchanged launch-policy integration suite exercises the real relay, native owner, closing receipt, ACK, extinction join, and final authority error.
Evidence
The retained failing case ran on the unchanged base path and observed lineage EOF while the host was still active, a control-write
EPIPE, nongraceful control close, and anchor exit 1 without any accepted closing receipt. Source qualification traced that sequence to the post-readiness catch disconnecting lifecycle IPC before the closing/ACK join.On exact commit
41eabd6fdf37e5fa688f2e6e3915a7be1862641f(tree03f12ac16afc139a54c2131cb24c9936be32fa3b), focused Blacksmith Testbox validation passed:Hosted CI, exact-head automated review, and independent engineering review remain pending at initial publication.