Skip to content

fix(remote): bound large read replies and mobile cache growth - #575

Merged
huichen merged 2 commits into
mainfrom
claude/mobile-bounded
Sep 12, 2026
Merged

huichen merged 2 commits into
mainfrom
claude/mobile-bounded

Conversation

@huichen

@huichen huichen commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Losslessly chunk oversized history/replay JSON without splitting logical exchanges or mixing changing projections.
  • Immutable read snapshots: 192 KiB chunks, 16 MiB per read, 32 MiB cached payload, 120-second TTL, bridge/session/run ownership; chunks bypass redundant command-reply caching.
  • Final 1 MiB decoded-JSON reply guard, including gzip: legacy or unsupported oversized replies fail explicitly instead of timing out.
  • Mobile LRU eviction removes inactive timeline, cursor, paging and retry state together (eight sessions / 16 MiB estimated payload; current conversation and draft protected).
  • Coalesce concurrent session-list refreshes and perform a trailing freshness read.

Validation

  • Mobile typecheck and ESLint passed; 52 suites / 736 tests passed.
  • Android/iOS production Expo exports including Hermes bytecode passed.
  • Desktop fmt and clippy --all-targets -- -D warnings passed.
  • Unicode byte reconstruction, owner/offset/expiry/capacity, cancellation, eviction/reload and 100-refresh burst regressions pass.
  • Integration test exercises actual Desktop host/NATS-reply/Agent-mock paths for a large projection and single 13-entry exchange.
  • Windows full lib: 1,113 pass / 27 fail; unmodified 3034fcc in the same environment: 1,109 pass / identical 27 failures. Four new Rust tests pass. Binary test passes; doc test ignored. Linux CI is required.

Existing Agent gRPC limits and per-entry presentation caps remain unchanged. Reads above 16 MiB fail explicitly; chunk transport adds no truncation. Cache estimates are not exact heap usage. Both updated clients are needed for large-read chunking; no physical-device performance claim. Details in docs/mobile-latency-diagnosis.md.

@huichen
huichen enabled auto-merge (squash) September 12, 2026 10:50
@huichen
huichen merged commit 6f4784c into main Sep 12, 2026
12 checks passed
@huichen
huichen deleted the claude/mobile-bounded branch September 12, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant