Repository navigation
Conversation
…bles and sparse ShellStream deltas
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Optimizes shell snapshots and live updates through compact encoding and sparse patches while preserving legacy responses for clients that do not opt in. The changes remain confined to transport and client state, with full-row fallback and snapshot recovery safeguards. You can add or adjust custom eligibility rules. Learn more. |
|
Found 2 test failures on Blacksmith runners: Failures
|
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenarios4 of 64 scenario measurements changed or failed.
All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-v2-3x.png)
Shell snapshots send ~55 fields per thread row including dozens of
null/false/[]defaults and repeated IDs/paths (~1.5 KB/row, 43.4 KB decoded for 27 rows), initial WebSocket shell snapshots emit all projects twice when repository identities are already resolved, and liveShellStreamupdates broadcast the full ~1.5 KB thread shell row on every tool tick,thread.visit, and 5s cursor-floor heartbeat.This adds opt-in compact shell wire encoding and sparse
ShellStreamdeltas transparently at theclient-runtimeboundary across web, desktop, and mobile while keeping legacy clients 100% compatible:withCompactShellWire): Omits null/scalar/empty-array defaults and derived fields (providerInstanceId,visibleItemCount,updatedAt, defaultlineage), and applies 2-pass frequency-gated string interning (ids) across shell snapshots,getOlderSettledThreads,getThreadFamily, andgetArchivedShellSnapshot.ShellStreamdeltas (cursor+thread.patched): Replaces 5s cursor-floor resends with a ~30 Bcursorframe and small per-thread updates with sparsethread.patcheddiffs (bounded 2,048-entry LRU, safe snapshot reload on missing target), and fixes duplicate initial WSprojectsemission.Measured
transferBudgetV2Wire Reductionsmain)nbr/shell-opt)fleet shell snapshot(27 rows)fleet shell snapshot(27 rows)measured turn, shellreconnect, shell (replay)Verification
vp run check:changed: pass (format,lint,knip,graphql,typecheckacross 39 packages, 10 test files / 147 tests includingorchestrationV2ShellWire.test.ts,ShellStream.test.ts,http.test.ts,shellReducer.test.ts, andtransferBudgetV2.integration.test.ts).Created with Gemini 4 Neon in Antigravity.