{"version":260,"agent":"capacity","message":"The writer cache stops reading layout pages straight through (abso Capacity, issue 664).\n\n258 read file-lines, file-texts and file-deletes pages straight through the writer cache. A kept reader didn't gain from it (an agent's tree's time was elsewhere: counting authors line by line, fixed in the same version), and adoption, which lays the same files out in a fresh view for each version, lost the cache it relied on: a fresh abso adoption took 17.4 min with it against 11.6 min without (my machine). The option, its wiring and its test are gone; 258's told buckets and author counting stay.\n\nTests: all of src/engine/test and worker/project/test pass.","time":1792093563687,"timeIso":"2026-10-15T19:46:03.687Z","changes":3,"change":4009,"files":["src/engine/state-source.ts","src/engine/test/state-cache.test.ts","worker/project/project.ts"],"draft":null,"diff":[{"path":"src/engine/state-source.ts","added":1,"removed":15,"diff":"--- a/src/engine/state-source.ts\n+++ b/src/engine/state-source.ts\n@@ -41,19 +41,7 @@\n \t * all the news it was told: 4.3 MB for abso's 109 agents) otherwise push every small page out of the cache.\n \t */\n \treadonly #maxEntryBytes: number;\n-\t/**\n-\t * Collections read straight through, never kept (abso Capacity): a file's packed line pages are read only to lay the\n-\t * file out, and the view keeps the layout, so keeping the pages too held them twice and pushed out the small rows\n-\t * read on every call (an agent's tree re-read 3,500 of them each time).\n-\t */\n-\treadonly #passThrough: (collection: string) => boolean;\n-\tconstructor(\n-\t\tsource: GraphStateStorage,\n-\t\tmaxBytes = 1_048_576,\n-\t\tmaxEntries = 4096,\n-\t\tmaxEntryBytes = maxBytes,\n-\t\tpassThrough: (collection: string) => boolean = () => false,\n-\t) {\n+\tconstructor(source: GraphStateStorage, maxBytes = 1_048_576, maxEntries = 4096, maxEntryBytes = maxBytes) {\n \t\tif (\n \t\t\t!Number.isSafeInteger(maxBytes) ||\n \t\t\tmaxBytes < 0 ||\n@@ -67,7 +55,6 @@\n \t\tthis.#maxBytes = maxBytes;\n \t\tthis.#maxEntries = maxEntries;\n \t\tthis.#maxEntryBytes = Math.min(maxEntryBytes, maxBytes);\n-\t\tthis.#passThrough = passThrough;\n \t}\n \tget retainedBytes(): number {\n \t\treturn this.#bytes;\n@@ -87,7 +74,6 @@\n \t\t}\n \t}\n \tread(collection: string, key: string): unknown {\n-\t\tif (this.#passThrough(collection)) return this.#source.read(collection, key);\n \t\tconst cacheKey = JSON.stringify([collection, key]);\n \t\tconst hit = this.#cache.get(cacheKey);\n \t\tif (hit) {"},{"path":"src/engine/test/state-cache.test.ts","added":0,"removed":21,"diff":"--- a/src/engine/test/state-cache.test.ts\n+++ b/src/engine/test/state-cache.test.ts\n@@ -163,24 +163,3 @@\n \t\tsource.db.close();\n \t}\n });\n-\n-test(\"a collection read straight through is never kept, and pushes nothing out (abso Capacity)\", () => {\n-\tconst source = new SqlState();\n-\ttry {\n-\t\tconst cache = new CachedStateStorage(source, 8192, 2, 8192, (collection) => collection === \"pages\");\n-\t\tsource.write(\"rows\", \"a\", \"A\");\n-\t\tsource.write(\"rows\", \"b\", \"B\");\n-\t\tfor (let i = 0; i < 10; i++) source.write(\"pages\", String(i), [i]);\n-\t\tcache.read(\"rows\", \"a\");\n-\t\tcache.read(\"rows\", \"b\");\n-\t\tconst reads = source.reads;\n-\t\tfor (let i = 0; i < 10; i++) assert.deepEqual(cache.read(\"pages\", String(i)), [i]);\n-\t\tassert.equal(source.reads, reads + 10);\n-\t\tassert.equal(cache.read(\"rows\", \"a\"), \"A\");\n-\t\tassert.equal(cache.read(\"rows\", \"b\"), \"B\");\n-\t\tassert.equal(source.reads, reads + 10, \"the two kept rows were not pushed out by the pages\");\n-\t\tassert.equal(cache.retainedEntries, 2);\n-\t} finally {\n-\t\tsource.db.close();\n-\t}\n-});"},{"path":"worker/project/project.ts","added":1,"removed":9,"diff":"--- a/worker/project/project.ts\n+++ b/worker/project/project.ts\n@@ -255,8 +255,6 @@\n const WRITER_CACHE_ROWS = 16_384;\n /** The biggest row the writer cache keeps (abso Capacity): an agent and all the news it was told can be 100 KB. */\n const WRITER_CACHE_ROW_BYTES = 16_384;\n-/** A file's packed line pages: read only to lay it out, and the view keeps the layout (abso Capacity). */\n-const LAYOUT_PAGES: ReadonlySet<string> = new Set([\"file-lines:pages\", \"file-texts:pages\", \"file-deletes:pages\"]);\n export interface WriterSource {\n \treadonly generation: number;\n \treadonly logLength: number;\n@@ -407,13 +405,7 @@\n \t\t\tthrow Error(\"accepted atom indexing requires writer storage\");\n \t\tthis.#store = store;\n \t\tthis.#writerStorage = options.writerStorage\n-\t\t\t? new CachedStateStorage(\n-\t\t\t\t\toptions.writerStorage,\n-\t\t\t\t\tWRITER_CACHE_BYTES,\n-\t\t\t\t\tWRITER_CACHE_ROWS,\n-\t\t\t\t\tWRITER_CACHE_ROW_BYTES,\n-\t\t\t\t\t(collection) => LAYOUT_PAGES.has(collection),\n-\t\t\t\t)\n+\t\t\t? new CachedStateStorage(options.writerStorage, WRITER_CACHE_BYTES, WRITER_CACHE_ROWS, WRITER_CACHE_ROW_BYTES)\n \t\t\t: undefined;\n \t\tif (this.#writerStorage) {\n \t\t\tconst storage = this.#writerStorage;"}],"ci":null}