You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Result chunk assembly silently accepts incomplete or gapped streams #36
src/Client/ResultChunkAssembler.php:32 assembles whatever chunks are currently present for a result id after sorting by sequence number. It does not require that a terminal chunk with more === false has arrived, it does not validate that sequence numbers are contiguous from zero, and push() silently overwrites duplicate sequence numbers. A client can therefore get a truncated or corrupted assembled result without any exception when a chunk is missing, duplicated with different data, or assembled too early.
This is risky because the README describes result chunks as part of an ordered stream that should survive reconnects gap-free, and the helper is the public client-side abstraction intended to make that stream usable. The current integration coverage only exercises the happy path in tests/Integration/JobLifecycleTest.php:237.
Fix prompt: Make ResultChunkAssembler track completion and validate integrity before returning bytes. assemble() should fail if the result id is unknown, no terminal chunk has arrived, the sequence range is not contiguous from zero through the terminal sequence, or a duplicate sequence arrives with conflicting payload metadata. Add PHPUnit tests for early assembly, missing middle chunks, duplicate conflicting chunks, out-of-order delivery, and valid base64 chunks.
Activity
fix: address 17 open issues across auth, isolation, idempotency, and …
nficano commentedon May 25, 2026
Fixed in #52 (commit 03afbaa).