Repository navigation
fix(process): release retired broker request references - #200567
Conversation
Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 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. What this changesThis PR releases retired broker request references after failure notification and file-output settlement. Example: Run one /bin/sh command with exit 0, wait for completion, then close its broker.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a source-confirmed retention defect still present on current main, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe spawn broker host translates command requests into broker IPC, tracks child proxies, and settles results and native cleanup when the transport closes. flowchart LR
A[Command caller] --> B[Broker host]
B --> C[Broker process]
C --> D[Native command]
C --> E[Transport retirement]
E --> F[Notify request failures]
F --> G[Release retired references]
E --> H[Join native writer cleanup]
H --> G
Technical reviewBest possible solution: Clear the existing retired collections at their final ownership boundaries while preserving failure notification and native writer settlement. Do we have a high-confidence way to reproduce the issue? The captured-map lifetime is visible in current source, and the existing real-process regression supplies a concrete reproduction; this read-only review did not execute it. Is this the best way to solve the issue? The patch is the smallest complete repair using the existing host owner: release the retired map after notification and the output list after settlement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ffd1538005b8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Tests 0. Total +3 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 17, 2026, 6:32 AM ET / 11:32 UTC. |
Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 9a38762)
…0216) Move private socket directory creation and cleanup to the existing broker process. Keep exclusive admission, private permissions, startup errors, and joined cleanup. Parent crash cleanup follows successful readiness. Accept the recoverable private directory orphan before readiness. (cherry picked from commit 775be7a) Release adaptation: retain the stable inline 103-byte socket path bound instead of importing the newer socket-directory helper. Reuse the saved real cold-resource regression with direct filesystem spies instead of introducing the later all-filesystem observation helper. Required companion: #200453 (22d5c87) will follow to preserve the parent-decided directory in broker bootstrap. #200320 source capture, #200370 host/readiness interface, #200567 retired request cleanup, and 4a9273a export correction are separate owners, not prerequisites for this stable private-directory lifetime. Co-authored-by: RomneyDa <[email protected]>
) Co-authored-by: RomneyDa <[email protected]>
Problem
The release qualification proxy-retention test reproduces on exact main base
5fb231527f4f14d83bc27067879370debe4d2b7a: one completed command proxy remains alive after closing its broker. A synthetic heap snapshot traces the strong reference through the retained broker error stack, its failure callback context, and the retired request map. Later retirement looks at the replacement map, leaving the captured old map populated.Change
No admission, restart, process ownership, native settlement, or error-reporting policy is changed. No prewarming, forced collection changes, or weakened lifetime assertion. Self-simplification retained a three-line production fix; independent review was waived by the release owner.
Evidence
These are local results, not release qualification. The separate Bun session-authorization failures remain unresolved. Main-first release backport waits for a verified merge.