ship/fix native resolve all resume - #7321
Conversation
|
Warning Review limit reached
Next review available in: 7 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe WebSocket adapter now validates native reconnect credentials before state updates. Resolve All now preserves ordered bounded logs and broadcasts persisted post-AI session state before acknowledgement. ChangesNative reconnect validation
Resolve All post-AI state
Estimated code review effort: 4 (Complex) | ~60 minutes Mergeability Score: 🟡 Moderate · up to The reconnect identity rejection can leave the socket attached, allowing subsequent state updates from a refused peer to reach cached state and potentially emit repeated errors. This concrete correctness and peer-isolation risk should be resolved or explicitly accepted before merge. Sequence Diagram(s)sequenceDiagram
participant NativeSocket
participant WebSocketAdapter
participant AdapterState
NativeSocket->>WebSocketAdapter: Receive reconnect message
WebSocketAdapter->>AdapterState: Validate persisted identity
AdapterState-->>WebSocketAdapter: Return validation result
WebSocketAdapter->>AdapterState: Store valid reconnect state
sequenceDiagram
participant ResolveAllHandler
participant Session
participant AIFollowUp
participant GameClients
ResolveAllHandler->>Session: Run Resolve All under lock
Session->>AIFollowUp: Execute continuation actions
AIFollowUp-->>Session: Return post-AI state and logs
ResolveAllHandler->>Session: Persist final state
ResolveAllHandler->>GameClients: Broadcast final update
ResolveAllHandler-->>ResolveAllHandler: Acknowledge requester
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@client/src/adapter/ws-adapter.ts`:
- Around line 1791-1822: Make rejected native reconnect identities terminal in
acceptNativeReconnectIdentity: latch the rejection, clear the ping interval,
close the socket, and ensure handleMessage returns immediately while latched so
later frames cannot update state or emit duplicate errors. Route
acceptFullSessionKey through the same rejection latch. In
client/src/adapter/__tests__/ws-adapter.test.ts lines 741-771, dispatch a
StateUpdate after the rejected GameCreated and assert getSnapshot() still throws
"No game state available" and the listener count remains 1.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5b718420-feba-403c-9de3-fbf7dc58258e
📒 Files selected for processing (3)
client/src/adapter/__tests__/ws-adapter.test.tsclient/src/adapter/ws-adapter.tscrates/phase-server/src/main.rs
ea426b2 to
e328235
Compare
Summary by CodeRabbit