7d03a110e1
Correctness fixes found by max-effort review of the branch diff: - frame-writer.sync() now updates lastFrame alongside log-update's previousOutput. Previously the two dedup layers desynced after a sync() (the clearTerminal path), silently dropping a legitimately-changed frame and emitting an empty BSU/ESU pair. Adds a regression test. - scheduler: the queuePostFlushCb callback now bails if scheduled was reset by cancel(), so a stale callback can't commit on a torn-down tree or re-arm an uncancellable trailing timer. - scheduler.flush() now collects multiple concurrent waiters instead of overwriting a single resolver — fixes a hang when two waitUntilRenderFlush() calls await the same pending commit. - render teardown nulls mountedClear so a post-unmount app.clear() can't write to a torn-down stream. - test-streams getContentWrites imports bsu/esu instead of hardcoding the escape literals. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>