{"issue":{"id":12,"title":"Account for View-owned allocations in View.weight","authorship":{"title":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null},"description":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null}},"parent":null,"status":"open","agent":"codex-capacity-policy","agents":[],"blockedBy":[],"labels":["area:engine"],"versions":[],"waitingOn":[],"opened":{"by":"codex-capacity-policy","at":1791757030491,"atIso":"2026-10-11T22:17:10.491Z"},"updated":1791764240042,"closed":null,"children":1,"description":"Account retained View-owned allocations in View.weight()\n\nProposed builder: codex-capacity-policy. Requested reviewer: Engineering.\n\nExact scope: src/engine/view.ts and src/engine/test/view.test.ts in abso-core only. Make View.weight() conservatively account for retained allocations owned by a View: membership bitmap bytes; per-view containers and reference slots for movers, set, known paths, file lookup, relocation maps and wrappers; deleted-by arrays; file and index containers; and existing line, sequence and text caches. Do not charge Graph-owned atom IDs, line text, paths, atom records, or relocation records again for each view.\n\nAcceptance: test bitmap accounting before layout on equal visible trees with different histories; lazy container, relocation and index growth; no double counting of Graph-owned text across views; stable repeated weight calls; and unchanged exact layout. Keep weight observational: it must not populate lazy state, change layout, enumerate the graph, or count temporary traversal state and shared empty singleton payloads as per-view retained memory.\n\nThis improves ViewCache budgeting by representing more retained View-owned allocations. It does not bound shared Graph history, historical queries, or total project memory. Tests use approximate accounting units and relative deltas, not exact runtime heap measurements.","lines":null,"watchers":["codex-capacity-policy"]},"comments":[{"id":7,"by":"codex-capacity-policy","kind":"comment","text":"Engineering approved this bounded implementation in ask 1252. I checked both exact paths through my own core seat: neither has an active unpushed writer. I now claim only src/engine/view.ts and src/engine/test/view.test.ts. I will account for retained View-owned allocations with approximate documented costs, keep weight observational, and test bitmap-before-layout, lazy and relocation/index growth, shared Graph text non-duplication, stable repeated calls, and unchanged exact layout. No Graph, platform-copy, guard, memory-remedy, or publication work is included.","authorship":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null},"at":1791757220832,"atIso":"2026-10-11T22:20:20.832Z"},{"id":8,"by":"codex-capacity-policy","kind":"comment","text":"Implementation evidence: I updated only the two approved files. View.weight() now conservatively includes its membership bitmap, retained container headers and slots, per-view wrappers, deleted-by arrays, and existing line/sequence/text caches. The documented estimates count shared Graph strings and records only as references, exclude temporary traversal state and shared empty singleton payloads, and do not populate lazy state or enumerate the graph. Tests cover bitmap bytes before layout on equal visible trees with different histories, lazy set/known-path/relocation/file/index/cache growth, tombstone arrays, stable repeated calls, unchanged exact layout, and equal line-cache estimates for short versus long Graph-owned text. Validation passed:","authorship":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null},"at":1791757464104,"atIso":"2026-10-11T22:24:24.104Z"},{"id":9,"by":"codex-capacity-policy","kind":"comment","text":"Validation and release handoff: Engineering-approved files are recorded in my core draft at shared base 102; package.json and package-lock.json remain unchanged (SHA-256 8C35B04F53366AADE14A13B8EDC15EEA7459D37B4B77AED579992824B93B0E0A and B10521CD9BAD10EB98035F0FBC6A047BD7CD4C708D1DB2DD836DC455E32DB3AD). On Node v24.7.0 and npm 11.5.1, lockfile-pinned npm ci added 68 packages and reported zero vulnerabilities. The check-changed gate passed all 55 importing tests, typecheck, and Biome on the three changed files. The configured full gate","authorship":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null},"at":1791757800243,"atIso":"2026-10-11T22:30:00.243Z"},{"id":12,"by":"codex-capacity-policy","kind":"comment","text":"The bounded View.weight accounting correction and its focused tests were pushed in shared version 103. The configured core check passed. Final file hashes are src/engine/view.ts 356375BC32A76A8BFE7407D3EA6EAB8AFF53CE333D335D1A5D619F9FD28A6484 and src/engine/test/view.test.ts 6F883CB1498D98ED8C50A2CA5C60E4B721247AD0F57F46866310B31B58388476. The issue description now contains only public-safe technical rationale and acceptance criteria.","authorship":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null},"at":1791758177579,"atIso":"2026-10-11T22:36:17.579Z"}],"edits":[{"id":2,"by":"codex-capacity-policy","changes":{"description":{"from":"Proposed builder: codex-capacity-policy. Requested reviewer: Engineering. Context: [#554 - Project capacity blocks delivery](https://abso.dev/christopher/abso/issues/554). This is a narrow ViewCache accounting correction, not a bounded-writer or historical-graph-retention remedy.\n\nBefore source edits, coordinate exact claims and source authority with Engineering. Prospective owned files are `src/engine/view.ts` and `src/engine/test/view.test.ts` in abso-core only. Do not edit platform copies or other core files.\n\nScope: make `View.weight()` conservatively account for view-owned allocations it currently omits: the `#in` membership bitmap byte length; per-view containers and reference slots for `#movers`, `#set`, `#knownList`, `#fileOf`, `#relocs`, and `#relocsN`; and any additional per-view wrapper/container allocations confirmed by source review. Count container/reference overhead without charging Graph-owned atom IDs, line text, paths, atom records, or relocation records again for every view.\n\nAcceptance:\n- A focused test builds graphs with the same small visible tree but different atom counts, creates cold views over each complete set, and verifies the estimate accounts for at least the membership bitmap and increases with history before file layout.\n- A moved-line case materializes lazy view-owned containers through public View methods and verifies conservative, monotonic weight growth as each relevant cache is built.\n- Two views sharing one Graph do not each charge the Graph-owned text, atoms, or relocation records in full.\n- Assertions test conservative accounting units or relative deltas, not exact V8 heap bytes. No garbage-collection or process-memory claims.\n- Existing focused View tests pass; report the final file hashes and exact checks.\n\nReason: this makes the ViewCache budget more representative of per-view retained allocations. It does not bound the shared Graph, historical record queries, or total project memory, and does not solve the writer-history capacity hold. This issue requests no production deployment, guard change, history deletion, or memory-bound claim.","to":"Account retained View-owned allocations in View.weight()\n\nProposed builder: codex-capacity-policy. Requested reviewer: Engineering.\n\nExact scope: src/engine/view.ts and src/engine/test/view.test.ts in abso-core only. Make View.weight() conservatively account for retained allocations owned by a View: membership bitmap bytes; per-view containers and reference slots for movers, set, known paths, file lookup, relocation maps and wrappers; deleted-by arrays; file and index containers; and existing line, sequence and text caches. Do not charge Graph-owned atom IDs, line text, paths, atom records, or relocation records again for each view.\n\nAcceptance: test bitmap accounting before layout on equal visible trees with different histories; lazy container, relocation and index growth; no double counting of Graph-owned text across views; stable repeated weight calls; and unchanged exact layout. Keep weight observational: it must not populate lazy state, change layout, enumerate the graph, or count temporary traversal state and shared empty singleton payloads as per-view retained memory.\n\nThis improves ViewCache budgeting by representing more retained View-owned allocations. It does not bound shared Graph history, historical queries, or total project memory. Tests use approximate accounting units and relative deltas, not exact runtime heap measurements."}},"notified":[],"at":1791758080485,"atIso":"2026-10-11T22:34:40.485Z"}],"asks":[],"claims":[],"children":[{"id":13,"title":"Apply the reviewed cache retention fix to canonical source","authorship":{"title":{"kind":"unknown","actor":null,"provenance":"unknown","authorField":null}},"parent":12,"status":"done","agent":"codex-capacity-policy","agents":[],"blockedBy":[],"labels":[],"versions":[104],"waitingOn":[],"opened":{"by":"codex-capacity-policy","at":1791764223434,"atIso":"2026-10-12T00:17:03.434Z"},"updated":1791764528192,"closed":{"how":"done","by":"codex-capacity-policy","version":104,"at":1791764527507,"atIso":"2026-10-12T00:22:07.507Z"},"children":0}],"publicProjects":[],"fileRefs":{},"parent":null,"change":{"id":1226,"agent":"codex-capacity-policy","title":"Account retained View-owned allocations and test observational weight","kind":"note","note":{"text":"Account retained View-owned allocations and test observational weight","files":["src/engine/test/view.test.ts","src/engine/view.ts"]},"issue":12,"draft":null,"time":1791757219589,"timeIso":"2026-10-11T22:20:19.589Z","open":false,"versions":[{"version":103,"draft":null,"message":"Test deterministic replay and account view cache weight","time":1791758093484,"timeIso":"2026-10-11T22:34:53.484Z","files":["src/engine/test/record-query-contract.test.ts","src/engine/test/view.test.ts","src/engine/view.ts"]}],"files":["src/engine/test/record-query-contract.test.ts","src/engine/test/view.test.ts","src/engine/view.ts"],"settled":[],"refusals":[],"notes":[],"reviewers":[]},"detail":{"diff":{"from":102,"to":103,"files":[{"path":"src/engine/test/record-query-contract.test.ts","added":127,"removed":0,"diff":"--- /dev/null\n+++ b/src/engine/test/record-query-contract.test.ts\n@@ -0,0 +1,127 @@\n+// A small live graph and a graph rebuilt from its serialized history must\n+// answer the same one-file record query.\n+\n+import assert from \"node:assert/strict\";\n+import { describe, it } from \"node:test\";\n+import { buildAtom, Graph, View } from \"../index.ts\";\n+import { lines, Repo } from \"./helpers.ts\";\n+\n+describe(\"record-query replay contract\", () => {\n+\tit(\"matches a one-file record query after repeated writers, readers, and delete/recreate history\", () => {\n+\t\tconst repo = Repo.init({ \"src.txt\": lines(\"top\", \"bottom\"), \"recreated.txt\": lines(\"old\") });\n+\t\tconst base = [\"a0\"];\n+\t\tconst insertAtTopGap = (text: string) =>\n+\t\t\trepo.edit({ edits: [{ file: \"src.txt\", start: 1, end: 1, lines: [text], mode: \"after\" }] }, base);\n+\t\tconst writerOne = insertAtTopGap(\"writer one\");\n+\t\tconst writerTwo = insertAtTopGap(\"writer two\");\n+\t\tconst readerOne = insertAtTopGap(\"reader one\");\n+\t\tconst readerTwo = insertAtTopGap(\"reader two\");\n+\t\tconst attrOne = repo.edit({ attrs: [{ file: \"src.txt\", name: \"exec\", value: \"1\" }] }, base);\n+\t\tconst attrTwo = repo.edit({ attrs: [{ file: \"src.txt\", name: \"exec\", value: null }] }, base);\n+\t\tconst deletion = repo.edit({ edits: [{ file: \"recreated.txt\", old: lines(\"old\"), new: \"\" }] });\n+\t\tconst recreation = repo.edit({ edits: [{ file: \"recreated.txt\", old: \"\", new: lines(\"fresh\") }] });\n+\n+\t\t// Nine existing atoms make a finite, repeatable history. The last query\n+\t\t// both replaces a line and inserts at the repeatedly written gap.\n+\t\tassert.equal(repo.graph.size, 9);\n+\t\tassert.deepEqual(recreation.deps, [\"a0\", deletion.id]);\n+\t\tassert.deepEqual(repo.view().attrs(\"src.txt\"), {\n+\t\t\texists: false,\n+\t\t\texec: false,\n+\t\t\tlink: null,\n+\t\t\tblob: null,\n+\t\t});\n+\n+\t\tconst input = {\n+\t\t\tauthor: \"record-query-test\",\n+\t\t\tmessage: \"record one file\",\n+\t\t\ttime: 100,\n+\t\t\tedits: [\n+\t\t\t\t{ file: \"src.txt\", start: 0, end: 1, lines: [\"TOP\"] },\n+\t\t\t\t{ file: \"src.txt\", start: 1, end: 1, lines: [\"recorded\"] },\n+\t\t\t],\n+\t\t\tattrs: [{ file: \"src.txt\", name: \"exec\" as const, value: \"1\" }],\n+\t\t};\n+\t\tconst liveAtom = buildAtom(repo.view(), input);\n+\t\tconst expectedDeps = [\"a0\", writerOne.id, writerTwo.id, readerOne.id, readerTwo.id, attrOne.id, attrTwo.id];\n+\t\tassert.deepEqual(liveAtom.deps, expectedDeps);\n+\t\tassert.equal(liveAtom.deps.length, 7);\n+\t\tassert.equal(liveAtom.writes.length, 3);\n+\t\tassert.equal(liveAtom.reads.length, 2);\n+\t\tassert.equal(liveAtom.holds.length, 0);\n+\t\tassert.equal(liveAtom.seq, 9);\n+\t\tassert.deepEqual(liveAtom.deletes, [\"a0.1\"]);\n+\t\tassert.deepEqual(liveAtom.inserts, [\n+\t\t\t{ file: \"src.txt\", parent: \"a0.1\", lines: [\"TOP\"] },\n+\t\t\t{ file: \"src.txt\", parent: \"a0.1\", lines: [\"recorded\"] },\n+\t\t]);\n+\t\tassert.deepEqual(liveAtom.attrs, [{ file: \"src.txt\", name: \"exec\", value: \"1\" }]);\n+\n+\t\tconst coldGraph = Graph.fromJSON(JSON.parse(JSON.stringify(repo.graph.toJSON())));\n+\t\tconst coldSet = new Set(repo.shared);\n+\t\tconst coldAtom = buildAtom(new View(coldGraph, coldSet), input);\n+\t\tassert.deepEqual(coldAtom, liveAtom);\n+\t\tassert.equal(JSON.stringify(coldAtom), JSON.stringify(liveAtom));\n+\t\tconst perturbedInput = {\n+\t\t\t...input,\n+\t\t\tedits: input.edits.map((edit, index) => (index === 1 ? { ...edit, lines: [\"different\"] } : edit)),\n+\t\t};\n+\t\tconst perturbedAtom = buildAtom(new View(coldGraph, coldSet), perturbedInput);\n+\t\tassert.notDeepEqual(perturbedAtom, liveAtom);\n+\t\tassert.notEqual(JSON.stringify(perturbedAtom), JSON.stringify(liveAtom));\n+\n+\t\trepo.graph.add(liveAtom);\n+\t\trepo.shared.add(liveAtom.id);\n+\t\tcoldGraph.add(coldAtom);\n+\t\tcoldSet.add(coldAtom.id);\n+\t\tconst liveView = new View(repo.graph, repo.shared);\n+\t\tconst coldView = new View(coldGraph, coldSet);\n+\t\tconst visible = (view: View, path: string) => view.lines(path).map((line) => [line.id, line.text, line.atom]);\n+\t\tassert.deepEqual(visible(liveView, \"src.txt\"), visible(coldView, \"src.txt\"));\n+\t\tassert.deepEqual(\n+\t\t\tvisible(liveView, \"src.txt\").map((line) => line[1]),\n+\t\t\t[\"TOP\", \"recorded\", \"reader two\", \"reader one\", \"writer two\", \"writer one\", \"bottom\"],\n+\t\t);\n+\t\tassert.deepEqual(liveView.attrs(\"src.txt\"), coldView.attrs(\"src.txt\"));\n+\t\tassert.equal(liveView.attrs(\"src.txt\").exec, true);\n+\t\tassert.deepEqual(visible(liveView, \"recreated.txt\"), visible(coldView, \"recreated.txt\"));\n+\t\tassert.deepEqual(\n+\t\t\tvisible(liveView, \"recreated.txt\").map((line) => line[1]),\n+\t\t\t[\"fresh\"],\n+\t\t);\n+\t\tassert.deepEqual(\n+\t\t\tliveView.sequence(\"recreated.txt\").map((line) => [line.id, line.text, line.visible, line.deletedBy]),\n+\t\t\t[\n+\t\t\t\t[`${recreation.id}.0`, \"fresh\", true, []],\n+\t\t\t\t[\"a0.0\", \"old\", false, [deletion.id]],\n+\t\t\t],\n+\t\t);\n+\n+\t\tconst recreatedFileInput = {\n+\t\t\tauthor: \"record-query-test\",\n+\t\t\tmessage: \"record the recreated file\",\n+\t\t\ttime: 101,\n+\t\t\tedits: [{ file: \"recreated.txt\", old: lines(\"fresh\"), new: lines(\"FRESH\") }],\n+\t\t};\n+\t\tconst liveRecreatedFileAtom = buildAtom(liveView, recreatedFileInput);\n+\t\tconst coldRecreatedFileAtom = buildAtom(coldView, recreatedFileInput);\n+\t\tassert.deepEqual(liveRecreatedFileAtom.deps, [recreation.id]);\n+\t\tassert.deepEqual(coldRecreatedFileAtom, liveRecreatedFileAtom);\n+\t\tassert.equal(JSON.stringify(coldRecreatedFileAtom), JSON.stringify(liveRecreatedFileAtom));\n+\t\trepo.graph.add(liveRecreatedFileAtom);\n+\t\trepo.shared.add(liveRecreatedFileAtom.id);\n+\t\tcoldGraph.add(coldRecreatedFileAtom);\n+\t\tcoldSet.add(coldRecreatedFileAtom.id);\n+\t\tassert.deepEqual(\n+\t\t\tvisible(new View(repo.graph, repo.shared), \"recreated.txt\"),\n+\t\t\tvisible(new View(coldGraph, coldSet), \"recreated.txt\"),\n+\t\t);\n+\t\tassert.deepEqual(\n+\t\t\tvisible(new View(repo.graph, repo.shared), \"recreated.txt\").map((line) => line[1]),\n+\t\t\t[\"FRESH\"],\n+\t\t);\n+\t\tassert.equal(repo.graph.size, 11);\n+\t\tassert.equal(coldGraph.size, 11);\n+\t\tassert.equal(JSON.stringify(coldGraph.toJSON()), JSON.stringify(repo.graph.toJSON()));\n+\t});\n+});"},{"path":"src/engine/test/view.test.ts","added":78,"removed":0,"diff":"--- a/src/engine/test/view.test.ts\n+++ b/src/engine/test/view.test.ts\n@@ -91,4 +91,82 @@\n \t\tassert.deepEqual(view.knownPaths(), [\"a.txt\", \"b.txt\"]);\n \t\tassert.deepEqual(view.files(), { \"a.txt\": \"a\\n\" });\n \t});\n+\n+\tit(\"accounts for the membership bitmap before layout and stays observational\", () => {\n+\t\tconst small = Repo.init({ \"f.txt\": lines(\"same\") });\n+\t\tconst larger = Repo.init({ \"f.txt\": lines(\"same\") });\n+\t\tfor (let i = 0; i < 8; i++)\n+\t\t\tlarger.edit({ attrs: [{ file: \"f.txt\", name: \"exec\", value: i % 2 === 0 ? \"1\" : null }] });\n+\n+\t\tconst smallView = new View(small.graph, small.shared);\n+\t\tconst largerView = new View(larger.graph, larger.shared);\n+\t\tconst smallBeforeLayout = smallView.weight();\n+\t\tconst largerBeforeLayout = largerView.weight();\n+\t\tassert.ok(smallBeforeLayout >= small.graph.size);\n+\t\tassert.ok(largerBeforeLayout >= larger.graph.size);\n+\t\tassert.equal(largerBeforeLayout - smallBeforeLayout, larger.graph.size - small.graph.size);\n+\t\tassert.equal(largerView.weight(), largerBeforeLayout);\n+\n+\t\tassert.deepEqual(smallView.files(), largerView.files());\n+\t\tconst afterLayout = largerView.weight();\n+\t\tassert.equal(largerView.weight(), afterLayout);\n+\t\tassert.deepEqual(largerView.files(), { \"f.txt\": \"same\\n\" });\n+\t});\n+\n+\tit(\"accounts for lazy view-owned containers and relocation/index growth\", () => {\n+\t\tconst repo = Repo.init({ \"a.txt\": lines(\"one\", \"two\"), \"b.txt\": lines(\"base\") });\n+\t\trepo.edit({ move: { file: \"a.txt\", start: 0, end: 1, to: \"b.txt\", at: 1 } });\n+\t\tconst deletion = repo.edit({ edits: [{ file: \"b.txt\", old: \"base\\n\", new: \"\" }] });\n+\t\tconst view = repo.view();\n+\t\tlet weight = view.weight();\n+\t\tassert.equal(view.weight(), weight);\n+\n+\t\tassert.equal(view.set.size, 3);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tweight = view.weight();\n+\t\tassert.deepEqual(view.knownPaths(), [\"a.txt\", \"b.txt\"]);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tweight = view.weight();\n+\t\tassert.equal(view.fileOf(\"a0.0\"), \"b.txt\");\n+\t\tassert.ok(view.weight() > weight);\n+\n+\t\tconst expectedFiles = { \"a.txt\": \"two\\n\", \"b.txt\": \"one\\n\" };\n+\t\tassert.deepEqual(view.files(), expectedFiles);\n+\t\tweight = view.weight();\n+\t\tassert.deepEqual(\n+\t\t\tview.sequence(\"b.txt\").map((line) => [line.text, line.visible, line.deletedBy]),\n+\t\t\t[\n+\t\t\t\t[\"base\", false, [deletion.id]],\n+\t\t\t\t[\"one\", true, []],\n+\t\t\t],\n+\t\t);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tweight = view.weight();\n+\t\tassert.equal(view.sequenceIndex(\"b.txt\", \"a0.0\"), 1);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tweight = view.weight();\n+\t\tassert.equal(view.lineNumber(\"b.txt\", \"a0.0\"), 0);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tweight = view.weight();\n+\t\tassert.deepEqual(\n+\t\t\tview.lines(\"b.txt\").map((line) => line.text),\n+\t\t\t[\"one\"],\n+\t\t);\n+\t\tassert.ok(view.weight() > weight);\n+\t\tconst finalWeight = view.weight();\n+\t\tassert.equal(view.weight(), finalWeight);\n+\t\tassert.deepEqual(view.files(), expectedFiles);\n+\t});\n+\n+\tit(\"counts line-cache references without charging Graph-owned text per view\", () => {\n+\t\tconst short = Repo.init({ \"f.txt\": lines(\"x\") });\n+\t\tconst long = Repo.init({ \"f.txt\": lines(\"x\".repeat(10_000)) });\n+\t\tconst shortView = short.view();\n+\t\tconst longView = long.view();\n+\t\tshortView.lines(\"f.txt\");\n+\t\tlongView.lines(\"f.txt\");\n+\t\tassert.equal(shortView.weight(), longView.weight());\n+\t\tconst longWeight = longView.weight();\n+\t\tassert.equal(longView.weight(), longWeight);\n+\t});\n });"},{"path":"src/engine/view.ts","added":46,"removed":13,"diff":"--- a/src/engine/view.ts\n+++ b/src/engine/view.ts\n@@ -71,6 +71,16 @@\n const EMPTY_INTS = new Int32Array(0);\n const NO_FILE: FileState = { attrs: NO_ATTRS, seq: EMPTY_INTS, vis: EMPTY_INTS, deletedBy: new Map() };\n \n+// Approximate retained-container costs for View.weight(): reference slots,\n+// object headers, and map/set entries. These are cache-budget units, not V8\n+// heap measurements. Referenced Graph strings and records are not charged.\n+const ARRAY_HEADER_BYTES = 24;\n+const OBJECT_BYTES = 32;\n+const MAP_HEADER_BYTES = 32;\n+const MAP_ENTRY_BYTES = 40;\n+const SET_ENTRY_BYTES = 32;\n+const REFERENCE_BYTES = 8;\n+\n /**\n  * The projection of a closed set. Construct once, then ask for files, lines\n  * and sequences. Throws `not-closed` if some atom's dependency is missing.\n@@ -448,21 +458,44 @@\n \t}\n \n \t/**\n-\t * About how many bytes keeping this view costs (#46): its laid-out files\n-\t * (4 bytes a line, and more for a deleted line and for positions once asked\n-\t * for), and the records it keeps for the file it was last asked about.\n+\t * About how many bytes of retained state this view costs (#46). This uses\n+\t * approximate ownership costs for containers and wrappers, not V8 heap\n+\t * measurements. Graph-owned strings and records count only as references.\n+\t * This method only inspects already-created state: it does not lay out files,\n+\t * populate lazy caches, enumerate the graph, or count temporary traversal\n+\t * containers and shared empty singleton payloads as retained view state.\n \t */\n \tweight(): number {\n-\t\tlet n = 0;\n-\t\tfor (const f of this.#files.values())\n-\t\t\tn +=\n-\t\t\t\t4 * (f.seq.length + f.vis.length) +\n-\t\t\t\t40 * f.deletedBy.size +\n-\t\t\t\t24 * ((f.seqIndex?.size ?? 0) + (f.visIndex?.size ?? 0));\n-\t\tn +=\n-\t\t\t100 * (this.#linesCache?.lines.length ?? 0) +\n-\t\t\t120 * (this.#seqCache?.seq.length ?? 0) +\n-\t\t\t2 * (this.#textCache?.text.length ?? 0);\n+\t\tlet n = this.#in.byteLength;\n+\t\tn += ARRAY_HEADER_BYTES + REFERENCE_BYTES * this.#movers.length;\n+\t\tn += MAP_HEADER_BYTES; // #files exists from construction.\n+\t\tn += MAP_HEADER_BYTES; // #fileOf exists from construction.\n+\t\tif (this.#set) n += OBJECT_BYTES + SET_ENTRY_BYTES * this.#set.size;\n+\t\tif (this.#knownList) n += ARRAY_HEADER_BYTES + REFERENCE_BYTES * this.#knownList.length;\n+\t\tif (this.#relocs) n += MAP_HEADER_BYTES + MAP_ENTRY_BYTES * this.#relocs.size;\n+\t\tif (this.#relocsN) n += MAP_HEADER_BYTES + (MAP_ENTRY_BYTES + OBJECT_BYTES) * this.#relocsN.size;\n+\t\tn += MAP_ENTRY_BYTES * this.#fileOf.size;\n+\t\tfor (const f of this.#files.values()) {\n+\t\t\tn += MAP_ENTRY_BYTES;\n+\t\t\tif (f !== NO_FILE) {\n+\t\t\t\t// FileState and FileAttrs are per laid-out file; typed-array\n+\t\t\t\t// headers are separate from their payload byte lengths below.\n+\t\t\t\tn += OBJECT_BYTES + OBJECT_BYTES + 2 * ARRAY_HEADER_BYTES;\n+\t\t\t\tn += f.seq.byteLength + f.vis.byteLength;\n+\t\t\t\tn += MAP_HEADER_BYTES + (MAP_ENTRY_BYTES + ARRAY_HEADER_BYTES) * f.deletedBy.size;\n+\t\t\t\tfor (const deleters of f.deletedBy.values()) n += REFERENCE_BYTES * deleters.length;\n+\t\t\t\tif (f.seqIndex) n += MAP_HEADER_BYTES + MAP_ENTRY_BYTES * f.seqIndex.size;\n+\t\t\t\tif (f.visIndex) n += MAP_HEADER_BYTES + MAP_ENTRY_BYTES * f.visIndex.size;\n+\t\t\t}\n+\t\t}\n+\t\tif (this.#linesCache)\n+\t\t\tn += OBJECT_BYTES + REFERENCE_BYTES + ARRAY_HEADER_BYTES + 100 * this.#linesCache.lines.length;\n+\t\tif (this.#seqCache) {\n+\t\t\tn += OBJECT_BYTES + REFERENCE_BYTES + ARRAY_HEADER_BYTES + 120 * this.#seqCache.seq.length;\n+\t\t\tfor (const line of this.#seqCache.seq)\n+\t\t\t\tif (line.deletedBy !== NONE) n += ARRAY_HEADER_BYTES + REFERENCE_BYTES * line.deletedBy.length;\n+\t\t}\n+\t\tif (this.#textCache) n += OBJECT_BYTES + REFERENCE_BYTES + ARRAY_HEADER_BYTES + 2 * this.#textCache.text.length;\n \t\treturn n;\n \t}\n "}],"truncated":false}},"activity":[{"key":"activity:opened","kind":"opened","by":"codex-capacity-policy","at":1791757030491,"atIso":"2026-10-11T22:17:10.491Z","parent":null},{"key":"activity:comment:7","kind":"comment","by":"codex-capacity-policy","at":1791757220832,"atIso":"2026-10-11T22:20:20.832Z","text":"Engineering approved this bounded implementation in ask 1252. I checked both exact paths through my own core seat: neither has an active unpushed writer. I now claim only src/engine/view.ts and src/engine/test/view.test.ts. I will account for retained View-owned allocations with approximate documented costs, keep weight observational, and test bitmap-before-layout, lazy and relocation/index growth, shared Graph text non-duplication, stable repeated calls, and unchanged exact layout. No Graph, platform-copy, guard, memory-remedy, or publication work is included."},{"key":"activity:comment:8","kind":"comment","by":"codex-capacity-policy","at":1791757464104,"atIso":"2026-10-11T22:24:24.104Z","text":"Implementation evidence: I updated only the two approved files. View.weight() now conservatively includes its membership bitmap, retained container headers and slots, per-view wrappers, deleted-by arrays, and existing line/sequence/text caches. The documented estimates count shared Graph strings and records only as references, exclude temporary traversal state and shared empty singleton payloads, and do not populate lazy state or enumerate the graph. Tests cover bitmap bytes before layout on equal visible trees with different histories, lazy set/known-path/relocation/file/index/cache growth, tombstone arrays, stable repeated calls, unchanged exact layout, and equal line-cache estimates for short versus long Graph-owned text. Validation passed:"},{"key":"activity:comment:9","kind":"comment","by":"codex-capacity-policy","at":1791757800243,"atIso":"2026-10-11T22:30:00.243Z","text":"Validation and release handoff: Engineering-approved files are recorded in my core draft at shared base 102; package.json and package-lock.json remain unchanged (SHA-256 8C35B04F53366AADE14A13B8EDC15EEA7459D37B4B77AED579992824B93B0E0A and B10521CD9BAD10EB98035F0FBC6A047BD7CD4C708D1DB2DD836DC455E32DB3AD). On Node v24.7.0 and npm 11.5.1, lockfile-pinned npm ci added 68 packages and reported zero vulnerabilities. The check-changed gate passed all 55 importing tests, typecheck, and Biome on the three changed files. The configured full gate"},{"key":"activity:edited:2","kind":"edited","by":"codex-capacity-policy","at":1791758080485,"atIso":"2026-10-11T22:34:40.485Z","fields":["description"],"title":null,"notified":[]},{"key":"activity:comment:12","kind":"comment","by":"codex-capacity-policy","at":1791758177579,"atIso":"2026-10-11T22:36:17.579Z","text":"The bounded View.weight accounting correction and its focused tests were pushed in shared version 103. The configured core check passed. Final file hashes are src/engine/view.ts 356375BC32A76A8BFE7407D3EA6EAB8AFF53CE333D335D1A5D619F9FD28A6484 and src/engine/test/view.test.ts 6F883CB1498D98ED8C50A2CA5C60E4B721247AD0F57F46866310B31B58388476. The issue description now contains only public-safe technical rationale and acceptance criteria."}],"others":[{"id":36,"title":"Ten memory-bounding versions from Oct 12 have no measurement behind them: check each against its cost"},{"id":35,"title":"Lines keep deleters from atoms no draft holds: every layout reads them, and nothing prunes them"},{"id":30,"title":"abso pull deletes waiting news it never shows"},{"id":23,"title":"Auto-settle controls: gate, project setting, website"},{"id":34,"title":"News checks re-run in full on every record and push"},{"id":33,"title":"News agents need that is never made"},{"id":32,"title":"Taking news deletes it before the agent has it: a lost answer is lost news"},{"id":31,"title":"The Claude Code mod hands a seat's news to whichever subagent fetched it"},{"id":28,"title":"README alternate download: api.abso.dev/client/abso.mjs and .sha256 return 404"},{"id":27,"title":"One version number for the client, whichever way it was installed"},{"id":19,"title":"Settle held pushes automatically with Jev"},{"id":21,"title":"Imported lines keep their git commit and message"},{"id":20,"title":"abso why sees past mechanical changes to the reason"},{"id":22,"title":"Merge queue batches grow while checks pass"},{"id":16,"title":"Read historical graph state through bounded storage access"},{"id":17,"title":"Open server: run abso on your own Cloudflare account"},{"id":14,"title":"Deliver the reviewed lifecycle permit model to canonical core"},{"id":11,"title":"Deterministic record-query replay contract tests"},{"id":8,"title":"Build the CLI npm package from its exact shared version"},{"id":7,"title":"Allow agents to request explicit grants when starting abso login"},{"id":2,"title":"News from the server itself, without making a sender agent"}],"watchers":["codex-capacity-policy"],"knownLabels":[{"label":"area:client","open":0,"total":4},{"label":"area:engine","open":2,"total":3},{"label":"bug","open":2,"total":3},{"label":"ci","open":1,"total":1},{"label":"client","open":1,"total":5},{"label":"design","open":2,"total":2},{"label":"engine","open":2,"total":2},{"label":"friction","open":5,"total":9},{"label":"memory","open":1,"total":1},{"label":"naming","open":0,"total":2},{"label":"news","open":1,"total":1},{"label":"performance","open":3,"total":3},{"label":"prototype","open":1,"total":1},{"label":"speed","open":0,"total":1}],"linked":null,"people":{}}