{"id":3942,"agent":"capacity","title":"The writer's row cache survives projection scratch and big rows (abso Capacity, issue 664).\n\n- CachedStateStorage dropped its whole cache whenever a transaction rolled back. Every projection scratch scope ends in a rollback on purpose, so the cache emptied many times within a call and at every call of a kept reader. A rollback now drops only the keys written or removed in that transaction (and any read back after), and a scope's own scratch rows; a nested commit's keys go with an outer rollback.\n- A row bigger than a per-row limit is read but not kept (the writer passes 16 KB). abso's 109 agents, each with all the news it was told, are 4.3 MB of rows read on every call, and they pushed every small page out of the 4 MB cache.\n\nOn a fresh abso adoption (my machine), asked again: where 229 to 237 ms after its second ask (was 0.32 to 0.46 s), drafts 198 ms (0.31 s), collisions 207 ms. A full run matches 33 of 33 answers; held heap at most 39.8 MB.\n\nTests: state-cache (new: a rollback drops only what its transaction wrote, a nested commit's writes go with an outer rollback; a row over the limit isn't kept and pushes nothing out). projection-scratch's check now expects the canonical value written before a scratch scope to stay cached. All of src/engine/test (294) and worker/project/test (349) pass.\n\ncodex-capacity-policy has older unpushed changes in lines 1 to 25 of state-source.ts (and a new test file); this touches the class body only.","kind":"publish","note":null,"issue":null,"draft":null,"time":1792089883079,"timeIso":"2026-10-15T18:44:43.079Z","open":false,"versions":[{"version":253,"draft":null,"message":"The writer's row cache survives projection scratch and big rows (abso Capacity, issue 664).\n\n- CachedStateStorage dropped its whole cache whenever a transaction rolled back. Every projection scratch scope ends in a rollback on purpose, so the cache emptied many times within a call and at every call of a kept reader. A rollback now drops only the keys written or removed in that transaction (and any read back after), and a scope's own scratch rows; a nested commit's keys go with an outer rollback.\n- A row bigger than a per-row limit is read but not kept (the writer passes 16 KB). abso's 109 agents, each with all the news it was told, are 4.3 MB of rows read on every call, and they pushed every small page out of the 4 MB cache.\n\nOn a fresh abso adoption (my machine), asked again: where 229 to 237 ms after its second ask (was 0.32 to 0.46 s), drafts 198 ms (0.31 s), collisions 207 ms. A full run matches 33 of 33 answers; held heap at most 39.8 MB.\n\nTests: state-cache (new: a rollback drops only what its transaction wrote, a nested commit's writes go with an outer rollback; a row over the limit isn't kept and pushes nothing out). projection-scratch's check now expects the canonical value written before a scratch scope to stay cached. All of src/engine/test (294) and worker/project/test (349) pass.\n\ncodex-capacity-policy has older unpushed changes in lines 1 to 25 of state-source.ts (and a new test file); this touches the class body only.","time":1792089883079,"timeIso":"2026-10-15T18:44:43.079Z","files":["src/engine/state-source.ts","src/engine/test/projection-scratch.test.ts","src/engine/test/state-cache.test.ts","worker/project/project.ts"]}],"files":["src/engine/state-source.ts","src/engine/test/projection-scratch.test.ts","src/engine/test/state-cache.test.ts","worker/project/project.ts"],"settled":[],"refusals":[],"notes":[],"reviewers":[]}