fix(agents): prevent native hook relay bridge race condition on renew and registration#100300
fix(agents): prevent native hook relay bridge race condition on renew and registration#100300nankingjing wants to merge 1 commit into
Conversation
… and registration Remove synchronous bridge record write after server.listen() that races before the TCP server binds, and guard renew handler with server.listening check to prevent stale relay registrations. Closes openclaw#98650
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 7:31 AM ET / 11:31 UTC. Summary PR surface: Source -3. Total -3 across 1 file. Reproducibility: Partially: the linked issue gives concrete Gateway steps and source inspection confirms the address-unavailable log plus fail-closed PreToolUse path. I did not run the isolated multi-agent Gateway flow, and the reported valid-record failure remains unproven by this PR. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Prove a real isolated Gateway Codex tool call recovers while PreToolUse enforcement still works, or narrow this PR to a non-closing cleanup and leave #98650 open. Do we have a high-confidence way to reproduce the issue? Partially: the linked issue gives concrete Gateway steps and source inspection confirms the address-unavailable log plus fail-closed PreToolUse path. I did not run the isolated multi-agent Gateway flow, and the reported valid-record failure remains unproven by this PR. Is this the best way to solve the issue? No: the patch is too narrow to be the best fix for the linked outage because it removes the pre-listen write path but does not address a valid bridge record that is still unusable. The safer path is a proven relay lookup/generation/session-lifecycle fix with focused regression coverage. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14eb460dd21a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -3. Total -3 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Remove synchronous bridge record write after server.listen() that races before the TCP server binds, and guard renew handler with server.listening check to prevent stale relay registrations.
Closes #98650