Status: Accepted (2026-11-28). Amends the load path of 0010 (“immutable caching”) and applies 0706 to docker-compose.prod.yml.
A user on the prod-like stack saw every reload “sync again”: the Layers count climbed to about 6,000 while the pill said “Syncing…”, then dropped to 1. The count is the Layers panel’s row count (top-level layers while collapsed). It came from the doc as it was rebuilt: an old snapshot with thousands of generated frames, then a journal replay that ended with “Clear canvas” and one new page. Nothing was unsent. Every open repeated the replay, for two reasons:
GET .../snapshot names the page, not a seq, so its content changes with each compaction. It was served Cache-Control: private, max-age=31536000, immutable. A browser keeps the first copy it gets for a year and never asks again. The client then loads that old seq and replays the whole journal since it on every open. On the throwaway stack the first copy was the empty page (38 B), so each reload replayed 27 MB over the socket. Once retention prunes the journal, the client loops: realtime answers SNAPSHOT_STALE, and the client refetches the same cached copy.LINORA_COMPACTOR_MAX_BYTES = 256 MiB, so it never claims pages above 335,544 nodes, and the stack had no large-memory compactor. The page’s last compaction took it from 308,532 nodes to 463,465, and everything after that (78 rows, 10.6 MB) stayed in the tail for good. pages.node_count changes only on compaction, so the page stayed listed at 463,465 nodes even after it shrank to 310.Cache-Control: private, no-cache. The ETag "pageId:seq" stays, so an unchanged snapshot costs a 304 with no body.cache: 'no-cache' (RemoteSyncClient.loadSnapshot, used for opens and SNAPSHOT_STALE reloads). Browsers that still hold an immutable copy from an older server revalidate it instead of using it.docker-compose.prod.yml adds compactor-large: LINORA_COMPACTOR_MAX_BYTES 3.5 GiB, which covers MAX_NODES_PER_PAGE, and LINORA_COMPACTOR_MIN_NODES 300,000, below the regular ceiling, so no page size is left between the two. Its memory limit is 4 GiB, and idle RSS is about 75 MiB.?seq=N), immutable: the client would need the seq first (one more round trip on every open). Revalidation costs a 304, and only when the copy is current.packages/sync-client/test/connection.test.ts reopens a page after a compaction and a journal trim, through a browser cache that serves its stored copy unless the request asks to revalidate. It fails without the client change. apps/api/test/resources.test.ts asserts the header. apps/docworker/test/compose-compactors.test.ts checks that the compose compactors cover every page size up to MAX_NODES_PER_PAGE and that each mem_limit is above its cap.LINORA_COMPACTOR_TAIL_AGE_S would make such a gap visible in other deployments.