Skip to content

Fix native multi-AI setup frame limit#6615

Merged
matthewevans merged 1 commit into
mainfrom
ship/fix-native-multi-ai-frame
Jul 25, 2026
Merged

Fix native multi-AI setup frame limit#6615
matthewevans merged 1 commit into
mainfrom
ship/fix-native-multi-ai-frame

Conversation

@matthewevans

@matthewevans matthewevans commented Jul 25, 2026

Copy link
Copy Markdown
Member

Fixes native Play vs AI falling back to WASM when 3+ seats make the CreateGameWithSettings frame exceed the old 8 KiB WebSocket limit.\n\nRaises the bounded frame limit to 64 KiB and adds a WebSocket integration regression for a 3-seat AI setup frame larger than 8 KiB.

Summary by CodeRabbit

  • Bug Fixes
    • Increased the maximum WebSocket message size from 8 KB to 64 KB.
    • Native Play-vs-AI game setup messages larger than 8 KB can now be transmitted and validated successfully.
    • Added regression coverage for larger game-creation requests.

@matthewevans
matthewevans enabled auto-merge July 25, 2026 00:21
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 24a9edcf-ba92-4db4-b252-5d5b2785f387

📥 Commits

Reviewing files that changed from the base of the PR and between 40a36f6 and ea8e6d5.

📒 Files selected for processing (1)
  • crates/phase-server/src/main.rs

📝 Walkthrough

Walkthrough

The WebSocket message limit increases from 8 KB to 64 KB. A full-mode regression test constructs an oversized native multi-AI game-creation request and verifies it passes framing before receiving the expected validation error.

Changes

WebSocket message limit

Layer / File(s) Summary
Increase WebSocket payload limit
crates/phase-server/src/main.rs
Raises the WebSocket frame payload limit to 64 KB and updates the adjacent comment.
Validate oversized create requests
crates/phase-server/src/main.rs
Adds AI protocol imports, a large-deck helper, and a regression test confirming an 8–64 KB CreateGameWithSettings request reaches server validation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: parthmishra, realdiligent

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: increasing the native multi-AI setup frame limit.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/fix-native-multi-ai-frame

Comment @coderabbitai help to get the list of available commands.

@matthewevans
matthewevans added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 3423ebc Jul 25, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/fix-native-multi-ai-frame branch July 25, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant