Repository navigation
fix(process): release completed command output under Bun - #139965
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 6, 2026, 5:50 AM ET / 09:50 UTC. ClawSweeper reviewWhat this changesThe PR releases completed command output under Bun while preserving Node standard streams and explicitly forwarding stdin EOF. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from inspected current main. The corrected Bun-only descriptor handling addresses the previous Linux Node concern; no concrete blocking defect remains in the introduced patch. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's process supervisor launches service-managed commands through a relay and a process-group anchor. Command results require completed output, while a separate control channel retains responsibility for cleaning up descendants. flowchart LR
A[Command request] --> B[Supervisor host]
B --> C[Relay process]
C --> D[Process-group anchor]
D --> E[Command and descendants]
E --> F[Output streams]
F --> B
D --> G[Cleanup control channel]
G --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +25. Total +25 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep output-descriptor ownership runtime-specific while preserving real output EOF, decoder flushing, and independent descendant cleanup. Do we have a high-confidence way to reproduce the issue? Yes: the existing retained-descendant and incomplete UTF-8 lifecycle cases provide concrete reproduction paths, supported by the supplied baseline failure report; this read-only review did not execute them. Is this the best way to solve the issue? Yes: the patch repairs stream ownership at the relay and anchor, preserves Node's established behavior, and leaves host completion and cleanup checks intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2dbbb33887ae. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…9965) * fix(process): release completed command output under Bun * fix(process): preserve Node standard descriptors during cleanup
What Problem This Solves
Fixes an issue where service-managed commands finish under Bun but their result remains pending until retained descendants exit.
Why This Change Was Made
Give Bun's private anchor ownership of its output streams and release the relay's inherited duplicates after successful spawn. Preserve Node's original standard-stream behavior, which its Linux process census requires. Forward stdin EOF explicitly because Bun's default pipe end check initializes extra output writers.
User Impact
Completed command output reaches real EOF while descendant cleanup remains available. Root-result delivery, decoder flushing, lineage authority, input error handling, backpressure, and subsequent cleanup retain their existing contracts.
Evidence