Repository navigation
feat: make node.pair.approve idempotent for already-paired nodes (fix… - #94532
xiaoping1988 wants to merge 1 commit into
Conversation
#94040) When approveNodePairing returns null (e.g., request expired, superseded by reconnect), check if the node is already paired. If so, treat it as a successful approval to avoid misleading 'unknown requestId' errors during duplicate clicks or delayed approvals. Changes: - Add getPairedNode import - Before approval, capture nodeId from pending request (if still present) - If approve returns null but nodeId exists and node already paired, synthesize approved result - Maintain existing error handling for truly unknown requests This improves UX by making approval actions idempotent once pairing is complete.
| if (!approved && nodeIdFromPending) { | ||
| const alreadyPaired = await getPairedNode(nodeIdFromPending); | ||
| if (alreadyPaired) { | ||
| approved = { requestId, node: alreadyPaired }; |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the linked operator-facing Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Live GitHub data shows #94452 merged on 2026-06-26 and closed #94040 with CLI changes and regression coverage for stale node approval request ids. So I’m closing this here and keeping the remaining discussion on #94452 and #94040. Review detailsBest possible solution: Keep the merged CLI boundary fix; any future gateway approval idempotency should come back as separate maintainer-approved API work with explicit token, scope, cleanup-claim, and regression-test coverage. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main shows the stale Is this the best way to solve the issue? No. The merged CLI rendering fix is the narrower solution for the reported operator-facing error, while this PR changes gateway approval semantics and is not buildable. Security review: Security review needs attention: The diff changes a token-returning gateway approval boundary and is superseded by a safer CLI-only fix for the reported problem.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d1b917120a47; fix evidence: commit deb0ffdcdf92, main fix timestamp 2026-06-27T00:40:29+01:00. |
…es #94040)
When approveNodePairing returns null (e.g., request expired, superseded by reconnect), check if the node is already paired. If so, treat it as a successful approval to avoid misleading 'unknown requestId' errors during duplicate clicks or delayed approvals.
Changes:
This improves UX by making approval actions idempotent once pairing is complete.
Summary
Linked context
Real behavior proof
Tests and validation
Risk checklist
Current review state