JP Journal · bounded offline policy lab
WebSocket backpressure lab
Replay the same message envelopes through a stream-pressure policy and a classic application-owned byte cap. Compare admission, queued bytes, delivery, close, abort, and fallback without contacting a server.
Experimental status: WebSocketStream is non-standard, experimental, and available in limited browsers. This lab feature-detects the current browser at runtime and displays that observation separately from the selectable simulation scenario. A semantic classic WebSocket fallback remains mandatory. Capability is not product fitness.
Matched trace
At most 40 messages, 80 ticks, and 81,920 planned bytes. A deterministic fake transport owns the virtual clock. The scenario never overrides the runtime-detected capability shown above.
Receipt summary
Proof contract
- Both lanes receive the same canonical sequence and byte plan.
- The stream lane waits when desired capacity is exhausted; the classic lane applies one explicit byte-cap policy.
- Open, close, abort, readable EOF, cancellation, and first terminal reason remain distinct.
- Real ReadableStream and WritableStream primitives are exercised separately from the deterministic queue simulation.
- Capability and policy enter the canonical hash; JSON and CSV are reparsed.