Aggregate compaction fragments before reactive SDK reduction while advancing
revision fences immediately and preserving native terminal and snapshot
authority. Keep task-tool shells keyed across payload updates and rescan bounded
membership so removals and replacements cannot leave phantom tools.
Isolate SSE callbacks and decode/dispatch diagnostics. Subscriber-local teardown
no longer destroys the healthy shared native client. Install HTTP cancellation
before preflight and fence late continuations without replaying or interrupting
already-admitted mutations. Preserve ownership and environment admission checks.
Move HTTP password derivation to async scrypt with serialized password changes
and login-authority fencing. Yield cooperatively in both structural-index phases
without changing snapshot/digest protocols; an individual SQLite step stays sync.
Add isolated red/green regressions, bounded browser/native qualification scripts,
independent reviews, source fingerprints and performance evidence for issue #824.
Synchronize the Git focus assertion with its async contract and make the opt-in
trace self-contained instead of serializing a tsx helper into the browser.
Validation includes 793 passing server tests and 6 skips after replay, UI/server/
Electron typechecks, UI/server/plugin builds, and private Windows native 2.0.21
fixtures. Renderer fixture median main-thread cost is 324.57 to 16.94 ms.
The latest full browser run remains 358 pass, 1 fail, 1 skip: its trace failure
was subsequently reproduced and corrected with a minimal Chromium check, but
the full suite has not been rerun. Store assertions use force-exit; natural
cleanup and Linux Electron to Windows LAN/HTTP with 2.0.19 remain unqualified.
Publish as a draft for review, not a universal resolution or issue-closing fix.
Refs #824.
## Summary
Live transcript events were measured arriving 139–160 seconds late
through CodeNomad while the direct native stream arrived in 22–55 ms.
Serial event routing awaited ownership checks across every logical
workspace before accepting the next SDK event.
- Buffer before slow routing I/O, preserving per-session/PTY/Shell
ordering and independent per-recipient FIFO delivery.
- Share validated ownership checks by recipient and complete native
location; fence inventory invalidation, disconnected generations and
stopped/reopened workspace incarnations.
- Bound retained jobs, payload size and routing age; reconnect through
normal authoritative recovery on overflow instead of silently dropping
deltas.
- Cancel pending session lookups and add rate-limited stage-specific lag
diagnostics without event contents.
## Base
Rebased onto upstream/dev at 7312ac22, including #717 and #718.
## Validation
- 43 targeted server routing/worktree regressions passed.
- Server TypeScript compilation and diff whitespace check passed.
- Isolated native OpenCode 2.0.9 fixture passed, including a
deliberately blocked recipient and another subscriber on the same SDK
client.
## Desktop testing
A Windows Tauri build of this PR is being prepared for manual testing
with the existing profile. Live before/after measurements will be added
after installation.