* perf(android): queue fragmented scrcpy video packets
* fix(android): release consumed scrcpy chunk storage
* fix(android): bound queued scrcpy fragment count
- Coalesce pending video fragments once more than MAX_PENDING_CHUNKS
(1024) are queued, so a large frame delivered in tiny socket chunks
cannot retain millions of Buffer objects below the 16 MiB byte guard.
- Add a regression test feeding a 256 KiB frame one byte at a time and
asserting the retained fragment count stays bounded.
---------
Co-authored-by: m4air <m4air@Mac.localdomain>
Co-authored-by: Neil <neil@stably.ai>
* fix(chat): stream journal replay without retaining obsolete revisions
* fix: page journal replay reads so no SQLite snapshot outlives its statement
- iterateJournalEpochRows fetches one completed LIMIT statement per page
instead of a lazily consumed .iterate() cursor, so reduction never runs
inside an open read snapshot and a WAL checkpoint can pass mid-replay.
Regression test: a checkpoint issued from inside the reducer is not busy.
- The retention test now asserts the applyJournalRow spy observed every
row, so the 8 MiB bound cannot pass vacuously if the spy stops
intercepting.
- Reliability gate manifest records the new assertion and the paged
read design.
* perf: avoid rescanning partial Windows desktop responses
* fix: own the retained serve-channel tail and pin the no-newline invariant
- Copy the retained partial line via ownRetainedString after each drain so
a 13+ char tail no longer pins the whole drained response as a V8
SlicedString (measured 23 MB -> 22 KB for 32 pending tails behind 1 Mi
lines); regression test with --expose-gc.
- Add a test asserting the retained buffer never contains a newline after
a drain, which the chunk-only fast path depends on.
- Locate the first delimiter with decoded.indexOf offset by the retained
length instead of rescanning the whole accumulated buffer; test pins
that no indexOf runs over more than the new chunk.
---------
Co-authored-by: Orca Worker <orca-worker@localhost>
Co-authored-by: Neil <neil@stably.ai>
* perf: reuse pending filesystem watcher debounce timers
* fix: cancel watcher batches after terminal errors
* fix: null the cleared batch timer on last-listener unsubscribe
`Timeout.refresh()` is a no-op on a handle already passed to
`clearTimeout`. `unsubscribeLocalWatcher` cleared `root.batch.timer`
without nulling it, so a re-subscribe inside the teardown grace window
reused the root with a dead handle and `scheduleLocalBatchFlush` never
re-armed — fs change events for that root stopped reaching the renderer.
- Null `root.batch.timer` after clearing it in the unsubscribe path.
- Add a real-timer regression test covering unsubscribe + re-subscribe
within the grace window; it fails on the previous PR head.
---------
Co-authored-by: Orca Worker <orca-worker@localhost>
Co-authored-by: Neil <neil@stably.ai>
* perf: reuse shared SHA-256 for renderer fallback
* test: wait for Windows child marker to become removable
---------
Co-authored-by: Orca Worker <orca-worker@localhost>
* perf: collect terminal snapshot replay without wrapper arrays
* test: wait for Windows child marker to become removable
---------
Co-authored-by: Orca Worker <orca-worker@localhost>