Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughRewrote a test to create a REST client that uses the LiveObjects plugin, publish large map updates via REST to force server-side OBJECT_SYNC splitting, then attach a second realtime client to count OBJECT_SYNC messages and verify merged map values after sync. Changes
Sequence Diagram(s)sequenceDiagram
participant REST as REST Client\n(RestWithLiveObjects)
participant Server as Server
participant RT_A as Realtime Client A\n(publisher)
participant RT_B as Realtime Client B\n(reattaching)
participant TransportB as TransportB\n(onProtocolMessage)
REST->>Server: publish three large `mapSet` updates
Server->>RT_A: propagate realtime updates (may split OBJECT_SYNC)
Note over Server,RT_A: Server stores split OBJECT_SYNC fragments
RT_B->>Server: attach & request sync
Server->>RT_B: send OBJECT_SYNC fragments (>=3 messages)
RT_B->>TransportB: transport receives protocol messages
TransportB->>TransportB: onProtocolMessage counts action === 20 messages
TransportB-->>RT_B: deliver assembled state
RT_B->>RT_B: verify all three large keys have expected values
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.41.1)test/realtime/liveobjects.test.jsThanks 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 the current code and only fix it if needed.
Inline comments:
In `@test/realtime/liveobjects.test.js`:
- Around line 901-913: The test currently sizes probe payloads from
client.options.maxMessageSize which can diverge from the actual publish gate;
change the sizing to use connectionManager.connectionDetails.maxMessageSize when
computing largeValue so the seed writes (the loop calling entryInstance.set for
keys largeKey1/2/3) match the real publish limit; update the reference where
largeValue is computed and any uses of maxMessageSize in this block (including
the helper.recordPrivateApi call if needed) to read
connectionManager.connectionDetails.maxMessageSize instead of
client.options.maxMessageSize.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d415f7fc-98ca-4848-9fe3-985197791489
📒 Files selected for processing (1)
test/realtime/liveobjects.test.js
c49bec7 to
ea2f8e3
Compare
…al partial sync instead of injecting fake messages Resolves AIT-538
ea2f8e3 to
c41be17
Compare
Resolves AIT-538
Summary by CodeRabbit