Repository navigation
fix(gateway): keep reapproved node connections alive - #187461
Conversation
Backport committed node approval publication so connection reconciliation sees the approved generation and capability surface before the RPC resumes. Keep the release dispatcher post-operation database snapshot behavior. (cherry picked from commit 94f180d) 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 publishes committed node approval facts before reconciliation can disconnect the authenticated connection. Example: A connected node is reapproved while a canvas.snapshot command is being prepared.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a useful maintainer-authored release backport, and review found no introduced correctness defect. Main already contains the repair, and exact-head CI passed. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe pairing worker commits approved node capabilities in SQLite, publishes identity and generation facts, and updates the Gateway registry that authorizes transport dispatch. flowchart LR
A[Approval RPC] --> B[Pairing worker]
B --> C[SQLite commit]
C --> D[Commit publication]
D --> E[Live node registry]
E --> F[Generation fenced dispatch]
Technical reviewBest possible solution: Retain the focused release backport with committed publication owning live promotion and existing generation fences protecting dispatch. Do we have a high-confidence way to reproduce the issue? The base publishes the new durable generation before the RPC updates the live session, allowing intervening reconciliation to invalidate it; the PR reports a deterministic red-before/green-after regression. Is this the best way to solve the issue? The change repairs publication ordering at the existing pairing owner, removes obsolete rereads, and preserves the release branch's database snapshot behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 00125bb5bbc0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +51, Tests +46. Total +97 across 9 files. Added test files: 0. View PR surface stats
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 October 29, 2026, 3:49 AM ET / 07:49 UTC. |
What Problem This Solves
Fixes connected nodes being disconnected when their capabilities are reapproved while command dispatch is being prepared.
User Impact
Reapproval preserves the authenticated connection while still refusing commands admitted under its previous pairing generation. Replaced devices, revoked tokens, and stale generations remain rejected. No public configuration, database schema, or permission-policy changes.
Why This Change Was Made
Backports Peter Steinberger’s
94f180d9ab19d969d59298312cff8ed019e18b58torelease/2026.10.9. The worker publishes committed identity, generation, and surface together before connection reconciliation can invalidate the old live generation. The current release dispatcher’s post-operation database read is preserved.The failure was observed in source CI 40833415360, job 123312855002, at exact source
8358419696a54cc1843d35686ea6c669cbe1276a: the reapproval case inserver.node-pairing-publication.test.tsdisconnected withdevice-pairing-changed.Evidence
git diff --checkpassed.No release validation was dispatched and nothing was merged or released by this repair lane.