#4377
fix(networking): recover shared relay clients and preserve write order
Distinguish relay failures from individual stream errors, discard failed shared clients with transport cleanup, and flush queued socket writes before open callbacks.
Relay runtime error classification needs validation against the deployed runtime.
Validation on this isolated branch: 112 sdk tests across 4 suites. git diff --check passed.
Activity
4r58Playzreviewed3d ago
from my codex: Found one issue in f04c1b5:
- [P2] Writes can remain queued forever after the initial flush — PSocket.js:204–208. After the flush empties the queue, await yields before #flushing resets. A write arriving in that gap gets queued, but nothing drains it afterward. The socket emits open while the payload remains unsent and its callback never runs. Reset the flag synchronously with the final queue check.
other than that lgtm
Coverage Report for puter.js SDK
⬇️ -0.22 pp
⬇️ -0.21 pp
⬇️ -0.50 pp
⬇️ -0.23 pp
File Coverage
⬇️ -0.48 pp
⬇️ -1.38 pp
🟰 ±0 pp
⬇️ -0.22 pp
⬇️ -3.40 pp
🟰 ±0 pp
🟰 ±0 pp
⬇️ -3.34 pp
⬇️ -14.94 pp
⬇️ -8.98 pp
⬇️ -7.28 pp
⬇️ -14.94 pp
⬆️ +2.74 pp
⬆️ +0.74 pp
🟰 ±0 pp
⬆️ +2.74 pp