Repository navigation
fix: stabilize reentrant lifecycle delivery across runners - #438
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe runtime now preserves packets that entered middleware before reentrant client teardown. Test fixtures provide write-drain synchronization, lifecycle tests coordinate asynchronous assertions, real-target files run serially, and conformance links use current locations. ChangesLifecycle Delivery Stabilization
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The lifecycle delivery behavior is covered by the supplied validation, and no actionable merge-blocking risk remains at the current head. Sequence Diagram(s)sequenceDiagram
participant Client
participant ServerSocket
participant Middleware
Client->>ServerSocket: Handle packet
ServerSocket->>Middleware: Enter middleware dispatch
Client->>ServerSocket: disconnect()
ServerSocket->>ServerSocket: Preserve active dispatch ownership
Middleware-->>ServerSocket: Resume queued delivery
ServerSocket-->>Client: Deliver queued packet
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes address all coding objectives in [ Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 7 files. (1 skipped: 1 unsupported.) Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Tracks whether client teardown starts inside the current server packet handler. Packets that already entered middleware retain that dispatch ownership for re-entrant
client.disconnect(), matching Socket.IO, while packets held before an external disconnect remain guarded.The real fixture waits for issued client writes to leave its queue before releasing the lifecycle handler, so the middleware regression observes
terminatebeforequeuedon every target. Manager ACK assertions are attached before teardown, and real Socket.IO files run serially because each owns a live server.Twenty consecutive focused dual runs, two complete real runs, the full 1,132-case dual run, typecheck, formatting, and conformance pass locally.
Related issue
Closes #437
Checklist