fix(simulation): address bridge review feedback
Replace .lock().unwrap() with .expect("mutex poisoned") in LocalBridge
for clearer panic messages. Document 16MB MAX_MESSAGE_SIZE rationale
in framing.rs with entity count sizing analysis.
Addresses Hoshe PR review suggestions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
|
||||
use std::io::{self, Read, Write};
|
||||
|
||||
/// Maximum message size: 16 MB
|
||||
/// Maximum message size: 16 MB.
|
||||
/// Sized for ObserverSnapshot with ~1000 entities (each ~40 bytes serialized),
|
||||
/// plus generous headroom for future field additions. A full-map dump of 10k
|
||||
/// entities would be ~400 KB, well within this limit.
|
||||
const MAX_MESSAGE_SIZE: u32 = 16 * 1024 * 1024;
|
||||
|
||||
/// Write a length-prefixed message to a writer.
|
||||
|
||||
Reference in New Issue
Block a user