{"draft":null,"from":296,"to":318,"files":[{"path":"worker/project/collisions.ts","added":7,"removed":5,"diff":"--- a/worker/project/collisions.ts\n+++ b/worker/project/collisions.ts\n@@ -68,7 +68,7 @@\n \t\t}\n \t\tfor (const key of claimsOf(atom)) streams.push(g.eachWriterOf(key));\n \t\tconst theirs: AtomId[] = [];\n-\t\tfor (const id of orderedClaimants(g, streams)) if (against.has(id)) theirs.push(id);\n+\t\tfor (const id of orderedClaimants(streams)) if (against.has(id)) theirs.push(id);\n \t\tout.set(yours, theirs);\n \t}\n \treturn out;\n@@ -136,7 +136,7 @@\n \n /** Claim indexes append in canonical seq order. Merge one cursor per current\n  * atom key, retaining no candidate set proportional to historical claims. */\n-function* orderedClaimants(g: Graph, streams: IterableIterator<AtomId>[]): IterableIterator<AtomId> {\n+function* orderedClaimants(streams: IterableIterator<AtomId>[]): IterableIterator<AtomId> {\n \ttry {\n \t\ttype Head = { id: AtomId; seq: number; stream: number };\n \t\tconst heap: Head[] = [];\n@@ -152,9 +152,11 @@\n \t\t\t}\n \t\t\theap[at] = head;\n \t\t};\n+\t\t// Each claimant's seq from its id, as the graph reads it (abso 738): loading the stored atom for it read a row a\n+\t\t// claimant, most of a warm draft-state's pairing on abso.\n \t\tconst advance = (stream: number) => {\n \t\t\tconst next = streams[stream]!.next();\n-\t\t\tif (!next.done) push({ id: next.value, seq: g.atom(next.value).seq, stream });\n+\t\t\tif (!next.done) push({ id: next.value, seq: seqOf(next.value), stream });\n \t\t};\n \t\tfor (let stream = 0; stream < streams.length; stream++) advance(stream);\n \t\tlet previous = -1;\n@@ -190,8 +192,8 @@\n \t\tlet a = left.next();\n \t\tlet b = right.next();\n \t\twhile (!a.done && !b.done) {\n-\t\t\tconst x = g.atom(a.value).seq;\n-\t\t\tconst y = g.atom(b.value).seq;\n+\t\t\tconst x = seqOf(a.value);\n+\t\t\tconst y = seqOf(b.value);\n \t\t\tif (x === y && settled.has(a.value)) return true;\n \t\t\tif (x <= y) a = left.next();\n \t\t\tif (y <= x) b = right.next();"},{"path":"worker/project/definition-rule.ts","added":68,"removed":35,"diff":"--- a/worker/project/definition-rule.ts\n+++ b/worker/project/definition-rule.ts\n@@ -7,7 +7,7 @@\n import { type AtomId, type Graph, joinLines, type LineId, type ReadView } from \"../../src/engine/index.ts\";\n import { type Origin, touchedFiles } from \"./collisions.ts\";\n import { type Definition, definitionsIn, importsOf, usedNames } from \"./definitions.ts\";\n-import { definitionsBytes, type KeptParts, usesBytes } from \"./kept-parts.ts\";\n+import { definitionsBytes, filesBytes, type KeptParts, usesBytes } from \"./kept-parts.ts\";\n import { codeOfLines, declaredIn, holdsNoCode } from \"./names.ts\";\n import { definitionText } from \"./news.ts\";\n import type { Collision } from \"./project.ts\";\n@@ -37,7 +37,7 @@\n \treadonly parent: string;\n }\n \n-/** Definitions in the files newer work touched, before it and with it. */\n+/** Definitions in one file newer work touched, before it and with it. */\n interface Changed {\n \treadonly baseDefs: ReturnType<typeof definitionsIn>;\n \treadonly nowDefs: ReturnType<typeof definitionsIn>;\n@@ -52,8 +52,11 @@\n \treadonly #replacedCache = new Map<string, ReadonlySet<string>>();\n \t/** A draft's uses, kept while it is asked about with the same views: draft collisions ask once per other agent. */\n \treadonly #usesCache = new WeakMap<ReadonlySet<AtomId>, { view: ReadView; base: ReadView; uses: Uses }>();\n-\t/** The newer work's definitions before and after, kept while it is asked about with the same views. */\n-\treadonly #changedCache = new WeakMap<ReadonlySet<AtomId>, { base: ReadView; now: ReadView; defs: Changed }>();\n+\t/** The files the newer work touched, kept while it is asked about with the same views. */\n+\treadonly #touchedCache = new WeakMap<\n+\t\tReadonlySet<AtomId>,\n+\t\t{ base: ReadView; now: ReadView; files: ReadonlySet<string> }\n+\t>();\n \n \tconstructor(graph: Graph, origin: (atom: AtomId, spaceName: string) => Origin) {\n \t\tthis.#graph = graph;\n@@ -122,6 +125,11 @@\n \t\tspaceName: string,\n \t\tkept?: { parts: KeptParts; uses: string; changed: string },\n \t\tnames?: ReadonlySet<string>,\n+\t\t/**\n+\t\t * The files the newer work changed, when the caller knows them without placing its lines (land and draft-state:\n+\t\t * shared's kept version files, abso 738); undefined, or one that answers undefined, and they're worked out here.\n+\t\t */\n+\t\tchangedFiles?: () => ReadonlySet<string> | undefined,\n \t): DefinitionCollision[] {\n \t\tif (draft.size === 0 || newer.size === 0) return [];\n \t\tconst uses = kept\n@@ -131,31 +139,56 @@\n \t\t// Only these names can collide (a publish's news, news.ts): a draft that uses none of them has none, and the\n \t\t// definitions changed since its base needn't be worked out.\n \t\tif (names && ![...uses.keys()].some((name) => names.has(name))) return [];\n-\t\tconst nowOf = () => (typeof nowView === \"function\" ? nowView() : nowView);\n-\t\tconst { baseDefs, nowDefs } = kept\n-\t\t\t? kept.parts.get(\n-\t\t\t\t\t`changed ${kept.changed}`,\n-\t\t\t\t\t() => this.#changed(newer, baseView, nowOf()),\n-\t\t\t\t\t(c) => definitionsBytes(c.baseDefs) + definitionsBytes(c.nowDefs),\n-\t\t\t\t)\n-\t\t\t: this.#changedFor(newer, baseView, nowOf());\n-\t\tconst out: DefinitionCollision[] = [];\n-\t\tfor (const [name, where] of [...uses].sort(([a], [b]) => (a < b ? -1 : 1))) {\n-\t\t\t// Which definitions the uses mean: the file each use imports the name\n-\t\t\t// from, or its own file when it defines the name at the top level. A\n-\t\t\t// use with neither (a local, a parameter, a global, a name another\n-\t\t\t// language brings in some other way) means none: the rule only speaks\n-\t\t\t// when it knows which definition a use means.\n+\t\t// Which definitions the uses mean: the file each use imports the name\n+\t\t// from, or its own file when it defines the name at the top level. A\n+\t\t// use with neither (a local, a parameter, a global, a name another\n+\t\t// language brings in some other way) means none: the rule only speaks\n+\t\t// when it knows which definition a use means.\n+\t\tconst scopes = new Map<string, ReadonlySet<string>>();\n+\t\tfor (const [name, where] of uses) {\n \t\t\tconst scope = new Set<string>();\n \t\t\tfor (const w of new Set(where.map((x) => x.file))) {\n \t\t\t\tconst from = importsOf(view, w).get(name) ?? (definitionsIn(view, [w]).has(name) ? w : undefined);\n \t\t\t\tif (from !== undefined) scope.add(from);\n \t\t\t}\n-\t\t\tif (scope.size === 0) continue;\n-\t\t\tconst inScope = (d: Definition): boolean => scope.has(d.file);\n-\t\t\tconst before = baseDefs.get(name)?.filter(inScope);\n-\t\t\tif (!before?.length) continue; // not defined in what the drafter saw: nothing it relies on\n-\t\t\tconst after = (nowDefs.get(name) ?? []).filter(inScope);\n+\t\t\tif (scope.size > 0) scopes.set(name, scope);\n+\t\t}\n+\t\tif (scopes.size === 0) return [];\n+\t\tconst nowOf = () => (typeof nowView === \"function\" ? nowView() : nowView);\n+\t\t// Only a file the newer work touched can hold a changed definition, and only one a use means can matter: just those\n+\t\t// files are laid out, before and with the newer work (abso 738). Laying out every file the newer work touched cost\n+\t\t// codex-prose-authorship-610's draft-state 494 files a view where its uses reach 7.\n+\t\tconst touched =\n+\t\t\tchangedFiles?.() ??\n+\t\t\t(kept\n+\t\t\t\t? kept.parts.get(`touched ${kept.changed}`, () => this.#touched(newer, baseView, nowOf()), filesBytes)\n+\t\t\t\t: this.#touchedFor(newer, baseView, nowOf()));\n+\t\tconst changed = new Map<string, Changed>();\n+\t\tconst changedIn = (file: string): Changed => {\n+\t\t\tlet c = changed.get(file);\n+\t\t\tif (!c) {\n+\t\t\t\tconst make = (): Changed => ({\n+\t\t\t\t\tbaseDefs: definitionsIn(baseView, [file]),\n+\t\t\t\t\tnowDefs: definitionsIn(nowOf(), [file]),\n+\t\t\t\t});\n+\t\t\t\tc = kept\n+\t\t\t\t\t? kept.parts.get(\n+\t\t\t\t\t\t\t`changed ${kept.changed} ${file}`,\n+\t\t\t\t\t\t\tmake,\n+\t\t\t\t\t\t\t(d) => definitionsBytes(d.baseDefs) + definitionsBytes(d.nowDefs),\n+\t\t\t\t\t\t)\n+\t\t\t\t\t: make();\n+\t\t\t\tchanged.set(file, c);\n+\t\t\t}\n+\t\t\treturn c;\n+\t\t};\n+\t\tconst out: DefinitionCollision[] = [];\n+\t\tfor (const [name, scope] of [...scopes].sort(([a], [b]) => (a < b ? -1 : 1))) {\n+\t\t\t// In the order the newer work touched its files, as when every touched file was laid out.\n+\t\t\tconst files = [...touched].filter((f) => scope.has(f));\n+\t\t\tconst before = files.flatMap((f) => changedIn(f).baseDefs.get(name) ?? []);\n+\t\t\tif (!before.length) continue; // not defined in what the drafter saw: nothing it relies on\n+\t\t\tconst after = files.flatMap((f) => changedIn(f).nowDefs.get(name) ?? []);\n \t\t\tif (signature(before) === signature(after)) continue;\n \t\t\t// Who changed it: newer writers of the new definition's lines, or newer deleters of the old one's.\n \t\t\tconst by = new Set<AtomId>();\n@@ -166,6 +199,7 @@\n \t\t\tconst first = [...by].sort((p, q) => this.#graph.atom(p).seq - this.#graph.atom(q).seq)[0];\n \t\t\tif (first === undefined) continue;\n \t\t\tconst origin = this.#origin(first, spaceName);\n+\t\t\tconst where = uses.get(name)!;\n \t\t\tconst file = where[0]!.file;\n \t\t\tconst indexes = where.filter((w) => w.file === file).map((w) => w.index);\n \t\t\tconst lo = Math.min(...indexes);\n@@ -205,20 +239,19 @@\n \t\treturn kept.uses;\n \t}\n \n-\t/** The newer work's definitions before and after, kept while it is asked about with the same views. */\n-\t#changedFor(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): Changed {\n-\t\tlet changed = this.#changedCache.get(newer);\n-\t\tif (!changed || changed.base !== baseView || changed.now !== now) {\n-\t\t\tchanged = { base: baseView, now, defs: this.#changed(newer, baseView, now) };\n-\t\t\tthis.#changedCache.set(newer, changed);\n+\t/** The files the newer work touched, kept while it is asked about with the same views. */\n+\t#touchedFor(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): ReadonlySet<string> {\n+\t\tlet kept = this.#touchedCache.get(newer);\n+\t\tif (!kept || kept.base !== baseView || kept.now !== now) {\n+\t\t\tkept = { base: baseView, now, files: this.#touched(newer, baseView, now) };\n+\t\t\tthis.#touchedCache.set(newer, kept);\n \t\t}\n-\t\treturn changed.defs;\n+\t\treturn kept.files;\n \t}\n \n-\t/** Definitions in the files the newer work touched, before it and with it: only there can one have changed. */\n-\t#changed(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): Changed {\n-\t\tconst touched = touchedFiles(this.#graph, newer, [baseView, now]);\n-\t\treturn { baseDefs: definitionsIn(baseView, touched), nowDefs: definitionsIn(now, touched) };\n+\t/** The files the newer work touched, before it and with it: only there can a definition have changed. */\n+\t#touched(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): ReadonlySet<string> {\n+\t\treturn touchedFiles(this.#graph, newer, [baseView, now]);\n \t}\n \n \t/** The names the draft's lines use and don't declare, less those the lines they replaced already used. */"},{"path":"worker/project/express-moves.ts","added":25,"removed":1,"diff":"--- a/worker/project/express-moves.ts\n+++ b/worker/project/express-moves.ts\n@@ -62,6 +62,29 @@\n \tconst g = host.graph;\n \tconst mine = new Set(draft);\n \tconst text = new MoveLineText(g);\n+\t// The draft's own lines first, before laying out any file (abso 714, piece 3): a move needs a written line with\n+\t// real content whose text the draft also deleted. An edit that only changes lines has none, and laying out its\n+\t// files (12k lines twice for one changed line of worker/src/index.ts) cost the whole publish.\n+\tconst goneIds = new Set<LineId>();\n+\tconst goneTexts = new Set<number>();\n+\tfor (const id of draft)\n+\t\tfor (const line of g.deletedLines(id)) {\n+\t\t\tgoneIds.add(line);\n+\t\t\tgoneTexts.add(text.intern(line));\n+\t\t}\n+\tif (goneTexts.size === 0) return;\n+\tlet moved = false;\n+\tfor (const id of draft) {\n+\t\tfor (const line of g.eachInsertedLine(id)) {\n+\t\t\tconst t = text.intern(line);\n+\t\t\tif (!text.plain[t] && goneTexts.has(t)) {\n+\t\t\t\tmoved = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\tif (moved) break;\n+\t}\n+\tif (!moved) return;\n \tconst after = host.agentView(agent);\n \tconst before = host.beforeDraft\n \t\t? host.beforeDraft(agent, draft)\n@@ -81,7 +104,8 @@\n \tfor (const file of [...touched].toSorted()) {\n \t\tlet cur: Block | undefined;\n \t\tbefore.buildLines(file).forEach((l, i) => {\n-\t\t\tif (g.deletersOf(l.id).some((d) => mine.has(d))) {\n+\t\t\t// Deleted by the draft: one of its atoms' deleted lines, with no lookup of each line's deleters.\n+\t\t\tif (goneIds.has(l.id)) {\n \t\t\t\tif (!cur) gone.push((cur = { file, start: i, ids: [], texts: [] }));\n \t\t\t\tcur.ids.push(l.id);\n \t\t\t\tcur.texts.push(text.intern(l.id));"},{"path":"worker/project/kept-parts.ts","added":11,"removed":4,"diff":"--- a/worker/project/kept-parts.ts\n+++ b/worker/project/kept-parts.ts\n@@ -1,8 +1,8 @@\n // What draft collisions work out about each draft and each pair of drafts, kept between calls under a hard byte budget\n-// (abso Capacity, issue 664): the names a draft's new lines use, the definitions a draft's changes touch before and\n-// after, and the names a pair of drafts both define in a file. Keys name everything an entry depends on (shared's\n-// version, a draft's base and atoms), and a call drops every entry it didn't use, so a draft that changes, an agent that\n-// leaves and shared moving on all drop theirs at once.\n+// (abso Capacity, issue 664): the names a draft's new lines use, the files a draft's changes touch and the definitions\n+// in each before and after, and the names a pair of drafts both define in a file. Keys name everything an entry depends\n+// on (shared's version, a draft's base and atoms), and a call drops every entry it didn't use, so a draft that changes,\n+// an agent that leaves and shared moving on all drop theirs at once.\n \n import { stringBytes } from \"../../src/engine/view.ts\";\n import type { Definition } from \"./definitions.ts\";\n@@ -100,3 +100,10 @@\n \t\tn += MAP_ENTRY_BYTES + stringBytes(name) + ARRAY_HEADER_BYTES + where.length * (REFERENCE_BYTES + OBJECT_BYTES);\n \treturn n;\n }\n+\n+/** A set of paths (the files some work touched). */\n+export function filesBytes(files: ReadonlySet<string>): number {\n+\tlet n = MAP_HEADER_BYTES;\n+\tfor (const file of files) n += MAP_ENTRY_BYTES + stringBytes(file);\n+\treturn n;\n+}"},{"path":"worker/project/land.ts","added":16,"removed":1,"diff":"--- a/worker/project/land.ts\n+++ b/worker/project/land.ts\n@@ -29,6 +29,8 @@\n \tpairs(draft: readonly AtomId[], against: ReadonlySet<AtomId>, settled: ReadonlySet<AtomId>): Pair[];\n \tdescribe(pair: Pair, yoursView: ReadView, theirsView: ReadView, spaceName: string): Collision;\n \tdefinitionRule(): DefinitionRule;\n+\t/** The files a space's versions after `from`, up to `to`, changed, when each one's are kept; else undefined. */\n+\tchangedSince(space: Space, from: number, to: number): ReadonlySet<string> | undefined;\n \trefuse(\n \t\tagent: AgentState,\n \t\tspace: Space,\n@@ -93,11 +95,24 @@\n \t\t? host.viewAt(shared, sharedBaseOf(space), changes)\n \t\t: host.viewAt(space, space.versions.length - 1);\n \tconst describeLand = (p: Pair): Collision => host.describe(p, draftView, host.sharedView(), SHARED);\n+\t// Where shared changed since the draft's base, from the files each version since kept as it landed (abso 738): working\n+\t// it out from the newer atoms placed every line they wrote or deleted, about 30% of a warm draft-state read.\n+\tconst changed = () => host.changedSince(shared, sharedBaseOf(space), host.version());\n \tconst collisions = [\n \t\t...host.pairs(changes, newer, union).map(describeLand),\n \t\t...host\n \t\t\t.definitionRule()\n-\t\t\t.collisions(own, draftView, host.viewAt(shared, sharedBaseOf(space)), host.sharedView(), newer, SHARED)\n+\t\t\t.collisions(\n+\t\t\t\town,\n+\t\t\t\tdraftView,\n+\t\t\t\thost.viewAt(shared, sharedBaseOf(space)),\n+\t\t\t\thost.sharedView(),\n+\t\t\t\tnewer,\n+\t\t\t\tSHARED,\n+\t\t\t\tundefined,\n+\t\t\t\tundefined,\n+\t\t\t\tchanged,\n+\t\t\t)\n \t\t\t.map((d) => d.collision),\n \t];\n \treturn { collisions, newer, union };"},{"path":"worker/project/news.ts","added":101,"removed":38,"diff":"--- a/worker/project/news.ts\n+++ b/worker/project/news.ts\n@@ -273,15 +273,25 @@\n \t\tnames: ReadonlySet<string>,\n \t\tversion: number,\n \t): DefinitionCollision[];\n+\t/** The space's atoms at `version`: setOf as it was then (owed news). */\n+\tsetAt(space: Space, version: number): ReadonlySet<AtomId>;\n+\t/** collision, with theirs described from the agent's space at `version`, not its newest (owed news). */\n+\tcollisionAt(agent: AgentState, pair: Pair, version: number): Collision;\n }\n \n-/** A publish's definition news for other agents, not yet worked out: the version it made, and the names it changed. */\n-export interface OwedDefinitionNews {\n+/**\n+ * A publish's news for other agents, not yet worked out: the version it made, and who made it. `all`: everything the\n+ * publish would have told them (same lines, definitions, moves; abso 714). Without it, as owed before 714, only the\n+ * definition news. `names`: the names its definitions changed, once worked out (owedNewsNames).\n+ */\n+export interface OwedNews {\n \treadonly version: number;\n \treadonly space: string;\n \treadonly publisher: string;\n-\treadonly names: readonly string[];\n+\treadonly names?: readonly string[];\n+\treadonly all?: boolean;\n }\n+export type OwedDefinitionNews = OwedNews;\n \n function lineNews(host: NewsHost, agent: AgentState, pairs: readonly Pair[]): NewsItem[] {\n \treturn pairs.map((p) => ({ key: pairKey(p), text: linesText(host.collision(agent, p)) }));\n@@ -302,6 +312,8 @@\n \tjust: ReadonlySet<AtomId>,\n \tspace: Space,\n \tversion: number,\n+\t/** The space's version the moved lines' files are read at: its newest, or an owed publish's own. */\n+\tnow = last(space),\n ): NewsItem[] {\n \tconst g = host.graph;\n \tconst movers = [...just].filter((id) => g.atom(id).moves);\n@@ -314,7 +326,7 @@\n \t\t}\n \t}\n \tconst was = host.viewAt(space, version - 1);\n-\tconst now = host.viewAt(space, last(space));\n+\tconst after = host.viewAt(space, now);\n \tconst out: NewsItem[] = [];\n \tfor (const id of movers) {\n \t\tconst moved = g\n@@ -323,7 +335,7 @@\n \t\t\t.filter((k) => k.kind === \"pos\" && claimed.has(k.node))\n \t\t\t.map((k) => k.node);\n \t\tif (moved.length === 0) continue;\n-\t\tout.push(moveItem(id, host.origin(id, space.name), was.fileOf(moved[0]!), now.fileOf(moved[0]!)));\n+\t\tout.push(moveItem(id, host.origin(id, space.name), was.fileOf(moved[0]!), after.fileOf(moved[0]!)));\n \t}\n \treturn out;\n }\n@@ -360,37 +372,30 @@\n \t// For the host's logs (abso 702): a line as the work starts, written before it, and one as it ends, so work that\n \t// outlives its request still shows. No time in them: a Durable Object's clock stands still in synchronous code.\n \tlet drafts = 0;\n-\tlet files = 0;\n \tlet news = 0;\n-\tconst compareDefinitions = (): ReadonlySet<string> => {\n-\t\tconst touched = touchedFiles(host.graph, just, [host.viewAt(space, version - 1), host.viewAt(space, last(space))]);\n-\t\tfiles = touched.size;\n-\t\tconst before = definitionsIn(host.viewAt(space, version - 1), touched);\n-\t\tconst after = definitionsIn(host.viewAt(space, last(space)), touched);\n-\t\treturn new Set(\n-\t\t\t[...new Set([...before.keys(), ...after.keys()])].filter(\n-\t\t\t\t(name) => !before.has(name) || signature(before.get(name)!) !== signature(after.get(name) ?? []),\n-\t\t\t),\n-\t\t);\n-\t};\n-\t// Owed (abso Capacity, 2026-10-15): the definition rule over every other draft was most of a publish's write on\n-\t// stored tables (5.5 of 7.3 s on abso in the lab, about 45 s in prod, long enough to reset the object). Same lines\n-\t// and moves are told here as before; the definition news is worked out after the write, against this version.\n-\t// Asked only once some other agent has a draft (news-lazy.test.ts: no news work at all otherwise).\n+\t// Owed (abso 714, Christopher's base fix): on stored tables this news for other agents was most of a publish's one\n+\t// write transaction (the same-lines pairs, the definitions, the moves, for every draft: about 10 s for a 30-line\n+\t// change to abso's 12k-line index.ts), long enough to time storage out and reset the object (prod abso, 23:32Z\n+\t// 2026-10-16). Owing, the publish only notes what it owes, here, once some other agent has a draft; it's worked out\n+\t// after the commit, one agent at a time, against this version (newsOwed). Asked only then (news-lazy.test.ts: no\n+\t// news work at all otherwise).\n \tlet owing: boolean | undefined;\n-\tlet owed = false;\n \tfor (const agent of [...host.agents.values()].toSorted((a, b) => (a.name < b.name ? -1 : 1))) {\n \t\tif (agent === publisher || agent.space !== space.name) continue;\n \t\tconst draft = host.draft(agent);\n \t\tif (draft.length === 0) continue;\n+\t\towing ??= host.owesDefinitionNews();\n+\t\tif (owing) {\n+\t\t\thost.owe({ version, space: space.name, publisher: publisher.name, all: true });\n+\t\t\thost.logLine?.({ work: \"publishNews\", step: \"owed\", space: space.name, version, publisher: publisher.name });\n+\t\t\treturn;\n+\t\t}\n \t\tif (drafts++ === 0)\n \t\t\thost.logLine?.({ work: \"publishNews\", step: \"start\", space: space.name, version, publisher: publisher.name });\n \t\tconst lines = pairsIn(host.graph, draft, just, unionOverlay(host.setOf(space), draft));\n-\t\tchangedNames ??= compareDefinitions();\n-\t\towing ??= host.owesDefinitionNews();\n-\t\tif (owing && changedNames.size > 0) owed = true;\n+\t\tchangedNames ??= changedNamesAt(host, space, version);\n \t\tconst defs =\n-\t\t\tchangedNames.size > 0 && !owing\n+\t\t\tchangedNames.size > 0\n \t\t\t\t? host.definitionCollisions(agent, host.newerFor(agent), changedNames).filter((d) => just.has(d.by))\n \t\t\t\t: [];\n \t\tconst items = [\n@@ -409,35 +414,93 @@\n \t\t\tversion,\n \t\t\tpublisher: publisher.name,\n \t\t\tdrafts,\n-\t\t\tfiles,\n \t\t\tchangedNames: changedNames?.size ?? 0,\n \t\t\tnews,\n-\t\t\towed: owed ? 1 : 0,\n \t\t});\n-\tif (owed)\n-\t\thost.owe({ version, space: space.name, publisher: publisher.name, names: [...(changedNames ?? [])].sort() });\n }\n \n /**\n+ * The names whose definitions the publish at `version` changed, in the files it touched: before it against its own\n+ * version. Most publishes change none; then only the same-lines rule can bring news. A definition collision the publish\n+ * brings is one of these, so a draft that uses none of them has none (abso Capacity, prod abso 2026-10-15).\n+ */\n+function changedNamesAt(host: NewsHost, space: Space, version: number): ReadonlySet<string> {\n+\tconst just = new Set(space.versions[version]!.atoms);\n+\tconst touched = touchedFiles(host.graph, just, [host.viewAt(space, version - 1), host.viewAt(space, version)]);\n+\tconst before = definitionsIn(host.viewAt(space, version - 1), touched);\n+\tconst after = definitionsIn(host.viewAt(space, version), touched);\n+\treturn new Set(\n+\t\t[...new Set([...before.keys(), ...after.keys()])].filter(\n+\t\t\t(name) => !before.has(name) || signature(before.get(name)!) !== signature(after.get(name) ?? []),\n+\t\t),\n+\t);\n+}\n+\n+/** owedNews's names, worked out once for a publish (the host keeps them on its row): changedNamesAt its version. */\n+export function owedNewsNames(host: NewsHost, owed: OwedNews): string[] {\n+\tconst space = host.spaceNamed(owed.space);\n+\tif (!space || owed.version > last(space) || !space.versions[owed.version]) return [];\n+\treturn [...changedNamesAt(host, space, owed.version)].sort();\n+}\n+\n+/**\n  * The definition news a publish owes, worked out as newsForOthers would have at that version: the same agents, the\n  * same rule against the space at `owed.version` and the work published up to it, the same words and keys. Reads only.\n  * An agent that has synced past the version since is left out (the version is no longer newer for it), and an item\n  * an agent was already told (from its own edit since, or this run before) is dropped, as queueNews would.\n  */\n-export function definitionNewsOwed(host: NewsHost, owed: OwedDefinitionNews): { agent: string; items: NewsItem[] }[] {\n+export function newsOwed(\n+\thost: NewsHost,\n+\towed: OwedNews,\n+\t/** Only these agents (owedAgents' names), so a host can work the news out one agent at a time (abso 714). */\n+\tonly?: readonly string[],\n+): { agent: string; items: NewsItem[] }[] {\n \tconst space = host.spaceNamed(owed.space);\n \tif (!space || owed.version > last(space) || !space.versions[owed.version]) return [];\n \tconst just = new Set(space.versions[owed.version]!.atoms);\n-\tconst names = new Set(owed.names);\n+\tlet names: ReadonlySet<string> | undefined = owed.names ? new Set(owed.names) : undefined;\n \tconst out: { agent: string; items: NewsItem[] }[] = [];\n \tfor (const agent of [...host.agents.values()].toSorted((a, b) => (a.name < b.name ? -1 : 1))) {\n-\t\tif (agent.name === owed.publisher || agent.space !== space.name || agent.base >= owed.version) continue;\n-\t\tif (host.draft(agent).length === 0) continue;\n-\t\tconst defs = host\n-\t\t\t.definitionCollisionsAt(agent, host.newerAt(agent, owed.version), names, owed.version)\n-\t\t\t.filter((d) => just.has(d.by));\n-\t\tconst items = definitionNews(defs).filter((item) => !agent.told.has(item.key));\n+\t\tif (only && !only.includes(agent.name)) continue;\n+\t\tif (!owedTo(host, owed, space, agent)) continue;\n+\t\tconst draft = host.draft(agent);\n+\t\tnames ??= changedNamesAt(host, space, owed.version);\n+\t\tconst lines = owed.all\n+\t\t\t? pairsIn(host.graph, draft, just, unionOverlay(host.setAt(space, owed.version), draft)).map((p) => ({\n+\t\t\t\t\tkey: pairKey(p),\n+\t\t\t\t\ttext: linesText(host.collisionAt(agent, p, owed.version)),\n+\t\t\t\t}))\n+\t\t\t: [];\n+\t\tconst defs =\n+\t\t\tnames.size > 0\n+\t\t\t\t? host\n+\t\t\t\t\t\t.definitionCollisionsAt(agent, host.newerAt(agent, owed.version), names, owed.version)\n+\t\t\t\t\t\t.filter((d) => just.has(d.by))\n+\t\t\t\t: [];\n+\t\tconst moves = owed.all ? moveNews(host, draft, just, space, owed.version, owed.version) : [];\n+\t\tconst items = [...lines, ...definitionNews(defs), ...moves].filter((item) => !agent.told.has(item.key));\n \t\tif (items.length > 0) out.push({ agent: agent.name, items });\n \t}\n \treturn out;\n }\n+/** newsOwed, under the name tonight's owed definition news had (abso 2341e805). */\n+export const definitionNewsOwed = newsOwed;\n+\n+/**\n+ * The agents a publish's owed news may be for, in the order definitionNewsOwed takes them: every other agent in the\n+ * space, behind the version, with a draft. Cheap (no definition rule), so a host can list them once and then work the\n+ * news out a few at a time, each in its own read (abso 714: one read over every draft reset prod abso's object).\n+ */\n+export function owedAgents(host: NewsHost, owed: OwedDefinitionNews): string[] {\n+\tconst space = host.spaceNamed(owed.space);\n+\tif (!space || owed.version > last(space) || !space.versions[owed.version]) return [];\n+\treturn [...host.agents.values()]\n+\t\t.toSorted((a, b) => (a.name < b.name ? -1 : 1))\n+\t\t.filter((agent) => owedTo(host, owed, space, agent))\n+\t\t.map((agent) => agent.name);\n+}\n+\n+function owedTo(host: NewsHost, owed: OwedDefinitionNews, space: Space, agent: AgentState): boolean {\n+\tif (agent.name === owed.publisher || agent.space !== space.name || agent.base >= owed.version) return false;\n+\treturn host.draft(agent).length > 0;\n+}"},{"path":"worker/project/pathindex.ts","added":15,"removed":0,"diff":"--- a/worker/project/pathindex.ts\n+++ b/worker/project/pathindex.ts\n@@ -90,6 +90,21 @@\n \t\treturn files && [...files].sort();\n \t}\n \n+\t/**\n+\t * The files the versions after `from`, up to `to`, changed, from each version's kept row (abso 738): undefined when one\n+\t * has none, and the caller works them out from the atoms. Every file whose text differs between the two versions is\n+\t * in it, since some version between changed it.\n+\t */\n+\tkeptChangesSince(space: Space, from: number, to: number): ReadonlySet<string> | undefined {\n+\t\tconst out = new Set<string>();\n+\t\tfor (let v = from + 1; v <= to; v++) {\n+\t\t\tconst files = this.#keptFiles(space, v);\n+\t\t\tif (!files) return undefined;\n+\t\t\tfor (const f of files) out.add(f);\n+\t\t}\n+\t\treturn out;\n+\t}\n+\n \t/** keptPaths as a set, kept for the newest version asked: never changed once made, so a view can hold it. */\n \tkeptPathSet(space: Space, version: number): ReadonlySet<string> | undefined {\n \t\tlet fold = this.#keptPaths.get(space);"},{"path":"worker/project/project-api.ts","added":2,"removed":0,"diff":"--- a/worker/project/project-api.ts\n+++ b/worker/project/project-api.ts\n@@ -155,6 +155,8 @@\n \trefusals(agent?: string, limit?: number): unknown;\n \t/** A file as it was at a version (#27). */\n \tfileAt(path: string, version: number, draft: string | null, agent?: string): unknown;\n+\t/** fileAt for exactly this spelling, without the version's list of files (version-log.ts fileExactAt). */\n+\tfileExactAt?(path: string, version: number, draft: string | null): unknown;\n \t/** Every file that differs between two versions (#27). */\n \tcompare(from: number, to: number, draft: string | null, agent?: string, summary?: boolean): unknown;\n \t/** Version `version` of shared without the versions in `versions` (without.ts). */"},{"path":"worker/project/project-status.ts","added":14,"removed":2,"diff":"--- a/worker/project/project-status.ts\n+++ b/worker/project/project-status.ts\n@@ -49,6 +49,18 @@\n }\n \n /**\n+ * An agent with nothing of its own sees exactly its base version, so its paths are that version's kept file list\n+ * (pathindex.ts), when there is one: no layout of every known file (abso - Performance, abso 711).\n+ */\n+function viewPaths(host: SnapshotHost, agent: AgentState): string[] {\n+\tconst kept =\n+\t\tagent.mine.length === 0\n+\t\t\t? host.keptPaths?.(host.spaceNamed(agent.space === SHARED ? null : agent.space), agent.base)\n+\t\t\t: undefined;\n+\treturn kept ?? host.agentView(agent).paths();\n+}\n+\n+/**\n  * The paths in an agent's view now (#37): what its folder should hold.\n  * Reading it changes nothing. Binary files are included.\n  */\n@@ -62,7 +74,7 @@\n \treturn {\n \t\tversion: agent.base,\n \t\tdraft: agent.space === SHARED ? null : agent.space,\n-\t\tfiles: host.agentView(agent).paths(),\n+\t\tfiles: viewPaths(host, agent),\n \t};\n }\n \n@@ -94,7 +106,7 @@\n \t\tagent: agent.name,\n \t\tversion: agent.base,\n \t\tdraft: agent.space === SHARED ? null : agent.space,\n-\t\tfiles: host.agentView(agent).paths(),\n+\t\tfiles: viewPaths(host, agent),\n \t};\n }\n "},{"path":"worker/project/project.ts","added":38,"removed":5,"diff":"--- a/worker/project/project.ts\n+++ b/worker/project/project.ts\n@@ -103,9 +103,11 @@\n import { move as hostedMove, type MoveHost } from \"./move.ts\";\n import {\n \taddressedItem,\n-\tdefinitionNewsOwed as hostedDefinitionNewsOwed,\n \tnewsAboutOwnDraft as hostedNewsAboutOwnDraft,\n \tnewsForOthers as hostedNewsForOthers,\n+\tnewsOwed as hostedNewsOwed,\n+\towedAgents as hostedOwedAgents,\n+\towedNewsNames as hostedOwedNewsNames,\n \tmarkedItem,\n \ttype NewsHost,\n \ttype NewsItem,\n@@ -220,6 +222,7 @@\n \tcompare as versionCompare,\n \tcompareSummary as versionCompareSummary,\n \tfileAt as versionFileAt,\n+\tfileExactAt as versionFileExactAt,\n \tlog as versionLog,\n \tribbon as versionRibbon,\n \tshow as versionShow,\n@@ -1352,11 +1355,26 @@\n \t\treturn owed;\n \t}\n \n-\t/** What a publish owes, worked out against its version (news.ts definitionNewsOwed). Reads only. */\n-\tdefinitionNewsOwed(owed: OwedDefinitionNews): { agent: string; items: NewsItem[] }[] {\n-\t\treturn hostedDefinitionNewsOwed(this.#newsHost, owed);\n+\t/** What a publish owes, worked out against its version (news.ts newsOwed), for `only` these agents if given. Reads only. */\n+\tnewsOwed(owed: OwedDefinitionNews, only?: readonly string[]): { agent: string; items: NewsItem[] }[] {\n+\t\treturn hostedNewsOwed(this.#newsHost, owed, only);\n \t}\n \n+\t/** newsOwed, under the name owed definition news had before abso 714. */\n+\tdefinitionNewsOwed(owed: OwedDefinitionNews, only?: readonly string[]): { agent: string; items: NewsItem[] }[] {\n+\t\treturn this.newsOwed(owed, only);\n+\t}\n+\n+\t/** The names a publish's definitions changed (news.ts owedNewsNames), worked out once for its owed news. Reads only. */\n+\towedNewsNames(owed: OwedDefinitionNews): string[] {\n+\t\treturn hostedOwedNewsNames(this.#newsHost, owed);\n+\t}\n+\n+\t/** The agents a publish's owed news may be for (news.ts owedAgents). Reads only. */\n+\towedAgents(owed: OwedDefinitionNews): string[] {\n+\t\treturn hostedOwedAgents(this.#newsHost, owed);\n+\t}\n+\n \t/** Tells each agent its owed items, as queueNews does: what an agent was already told adds nothing. */\n \tdeliverOwedNews(found: readonly { agent: string; items: readonly NewsItem[] }[]): number {\n \t\tconst entries: Entry[] = [];\n@@ -1991,6 +2009,11 @@\n \t\treturn versionFileAt(this.#logHost, ...args);\n \t}\n \n+\t/** fileAt for exactly this spelling, from the file's own lines: no list of the version's files (version-log.ts). */\n+\tfileExactAt(...args: Tail<Parameters<typeof versionFileExactAt>>): ReturnType<typeof versionFileExactAt> {\n+\t\treturn versionFileExactAt(this.#logHost, ...args);\n+\t}\n+\n \t/** Every file that differs between two versions of shared (or a named draft) (version-log.ts). */\n \tcompare(...args: Tail<Parameters<typeof versionCompare>>): ReturnType<typeof versionCompare> {\n \t\treturn versionCompare(this.#logHost, ...args);\n@@ -2170,6 +2193,9 @@\n \t\t\tnewerAt: (agent, version) => this.#newerFor(agent, version),\n \t\t\tdefinitionCollisionsAt: (agent, newer, names, version) =>\n \t\t\t\tthis.#definitionCollisions(agent, newer, names, version),\n+\t\t\tsetAt: (space, version) => this.#at(space, version),\n+\t\t\tcollisionAt: (agent, pair, version) =>\n+\t\t\t\tthis.#describe(pair, this.#agentView(agent), this.#viewAt(this.#spaceOf(agent), version), agent.space),\n \t\t};\n \t\treturn this.#news;\n \t}\n@@ -2473,6 +2499,9 @@\n \t\t\tpairs: (draft, against, settled) => this.#pairs(draft, against, settled),\n \t\t\tdescribe: (pair, yoursView, theirsView, spaceName) => this.#describe(pair, yoursView, theirsView, spaceName),\n \t\t\tdefinitionRule: () => this.#definitionRule,\n+\t\t\t// Only from a stored writer's kept rows, as keptPaths: a project in memory keeps none, and works them out.\n+\t\t\tchangedSince: (space, from, to) =>\n+\t\t\t\tthis.#writerStorage ? this.#paths.keptChangesSince(space, from, to) : undefined,\n \t\t\trefuse: (agent, space, via, time, collisions, entries) =>\n \t\t\t\tthis.#refuse(agent, space, via, time, collisions, entries),\n \t\t\trequireClosed: (tie, union) => this.#requireClosed(tie, union),\n@@ -3189,15 +3218,19 @@\n \t\tconst base = agent.mine.some((id) => at.has(id))\n \t\t\t? this.#view(differenceSet(at, new StableOverlaySet(agent.mine)))\n \t\t\t: this.#viewAt(space, agent.base);\n+\t\tconst to = version ?? last(space);\n \t\treturn this.#definitionRule.collisions(\n \t\t\tdraft,\n \t\t\tthis.#agentView(agent),\n \t\t\tbase,\n-\t\t\tthis.#viewAt(space, version ?? last(space)),\n+\t\t\tthis.#viewAt(space, to),\n \t\t\tnewer,\n \t\t\tspace.name,\n \t\t\tundefined,\n \t\t\tnames,\n+\t\t\t// Where the space changed since the agent's base, from each version's kept files on a stored writer, as land's\n+\t\t\t// (abso 714): walking every newer atom for them was 6.5 s of a publish 770 versions behind on abso.\n+\t\t\t() => (this.#writerStorage ? this.#paths.keptChangesSince(space, agent.base, to) : undefined),\n \t\t);\n \t}\n }"},{"path":"worker/project/spaces.ts","added":28,"removed":5,"diff":"--- a/worker/project/spaces.ts\n+++ b/worker/project/spaces.ts\n@@ -40,6 +40,11 @@\n \tindexVersion?: (version: Published) => void;\n \t/** Version of the selected membership event, independent of later publishes. */\n \tmembershipVersion?: (atom: AtomId, version: number) => number | undefined;\n+\t/**\n+\t * membershipVersion reading the membership pages first, each page once (abso - Performance, 714): for a walk over\n+\t * many atoms, such as SharedAdditions. Most atoms have one event, and the page says its version.\n+\t */\n+\tmembershipVersions?: () => (atom: AtomId, version: number) => number | undefined;\n \treadonly name: string;\n \treadonly versions: Published[];\n \t/** Every atom published into this space (for shared, everything in it). */\n@@ -58,6 +63,13 @@\n \t\t\tname,\n \t\t\tindexVersion: (version) => indexMembership(storage, prefix, version),\n \t\t\tmembershipVersion: (atom, version) => membershipEvent(storage, prefix, atom, version)?.version,\n+\t\t\tmembershipVersions: () => {\n+\t\t\t\tconst pages = new PageReader(storage, prefix);\n+\t\t\t\treturn (atom, version) => {\n+\t\t\t\t\tconst known = pages.versionAt(atom, version);\n+\t\t\t\t\treturn known === null ? membershipEvent(storage, prefix, atom, version)?.version : known;\n+\t\t\t\t};\n+\t\t\t},\n \t\t\tversions: storedArray(storage, `${prefix}:versions`),\n \t\t\town: new StoredSet(storage, `${prefix}:own`),\n \t\t\tpublishedIn: new StoredMap(storage, `${prefix}:published`),\n@@ -124,6 +136,19 @@\n \t}\n \t/** Whether atom is present at version, or undefined when its events must be read. */\n \tpresentAt(atom: AtomId, version: number): boolean | undefined {\n+\t\tconst code = this.#code(atom);\n+\t\tif (code === undefined || code === MIXED) return undefined;\n+\t\tif (code === NONE) return false;\n+\t\treturn version >= code;\n+\t}\n+\t/** membershipVersion from the page: the version of its only event, or undefined; null when its events must be read. */\n+\tversionAt(atom: AtomId, version: number): number | undefined | null {\n+\t\tconst code = this.#code(atom);\n+\t\tif (code === undefined || code === MIXED) return null;\n+\t\tif (code === NONE) return undefined;\n+\t\treturn version >= code ? code : undefined;\n+\t}\n+\t#code(atom: AtomId): number | undefined {\n \t\tthis.#kept ??= this.#storage.read(`${this.#prefix}:pages:meta`, \"kept\") === 1;\n \t\tif (!this.#kept) return undefined;\n \t\tconst seq = seqOf(atom);\n@@ -135,10 +160,7 @@\n \t\t\tif (this.#pages.size >= 64) this.#pages.delete(this.#pages.keys().next().value!);\n \t\t\tthis.#pages.set(index, page);\n \t\t}\n-\t\tconst code = page[seq % PAGE] ?? NONE;\n-\t\tif (code === NONE) return false;\n-\t\tif (code === MIXED) return undefined;\n-\t\treturn version >= code;\n+\t\treturn page[seq % PAGE] ?? NONE;\n \t}\n }\n \n@@ -381,9 +403,10 @@\n \t\treturn this.current.has(id) && !this.base.has(id);\n \t}\n \t*values(): SetIterator<AtomId> {\n+\t\tconst versionOf = this.space.membershipVersions?.() ?? this.space.membershipVersion!;\n \t\tfor (let version = this.baseVersion + 1; version <= this.endVersion; version++) {\n \t\t\tfor (const id of this.space.versions[version]!.atoms) {\n-\t\t\t\tif (this.space.membershipVersion!(id, this.endVersion) === version && this.has(id)) yield id;\n+\t\t\t\tif (versionOf(id, this.endVersion) === version && this.has(id)) yield id;\n \t\t\t}\n \t\t}\n \t}"},{"path":"worker/project/spelling.ts","added":4,"removed":2,"diff":"--- a/worker/project/spelling.ts\n+++ b/worker/project/spelling.ts\n@@ -73,7 +73,9 @@\n export function spellingOf(view: ReadView, path: string): string {\n \tif (view.hasFile(path)) return path;\n \tconst key = pathKey(path);\n-\t// Known paths first, by key, then only those laid out (#46).\n-\tconst twins = view.knownPaths().filter((p) => pathKey(p) === key && view.hasFile(p));\n+\t// Every path the graph has ever had, by key, then only those the view has a file at (#46). Not the view's known paths\n+\t// (abso Capacity, 714): those read every atom's membership and file list, 36,360 statements of a record on abso, as\n+\t// clashIn found. A path the view never had has no file in it, so the answers are the same.\n+\tconst twins = [...view.graph.knownFiles()].filter((p) => pathKey(p) === key && view.hasFile(p));\n \treturn twins.length === 1 ? twins[0]! : path;\n }"},{"path":"worker/project/test/express-moves-early.test.ts","added":55,"removed":0,"diff":"--- /dev/null\n+++ b/worker/project/test/express-moves-early.test.ts\n@@ -0,0 +1,55 @@\n+// Moves before laying out files (abso 714, piece 3): expressMoves looks at the draft's own written and deleted lines\n+// first, and lays out no file when none of its written lines with real content has a deleted line's text. moves.test.ts\n+// covers the moves themselves.\n+\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import type { Graph } from \"../../../src/engine/index.ts\";\n+import { type ExpressMovesHost, expressMoves } from \"../express-moves.ts\";\n+import type { AgentState } from \"../project-types.ts\";\n+\n+/** A draft of two atoms: \"del\" deletes one line, \"add\" writes the others. Any view laid out throws. */\n+function host(deleted: string, written: string[]): ExpressMovesHost {\n+\tconst texts = [deleted, ...written];\n+\tconst graph = {\n+\t\tdeletedLines: (id: string) => (id === \"del\" ? [\"line-0\"] : []),\n+\t\t*eachInsertedLine(id: string) {\n+\t\t\tif (id === \"add\") for (let k = 1; k < texts.length; k++) yield `line-${k}`;\n+\t\t},\n+\t\tlineN: (line: string) => Number(line.slice(\"line-\".length)),\n+\t\t*textChunks(n: number) {\n+\t\t\tyield texts[n]!;\n+\t\t},\n+\t\ttextOf: (n: number) => texts[n]!,\n+\t} as unknown as Graph;\n+\tconst laidOut = (): never => {\n+\t\tthrow new Error(\"laid out\");\n+\t};\n+\treturn {\n+\t\tgraph,\n+\t\tdraft: () => [\"del\", \"add\"],\n+\t\tagentView: laidOut,\n+\t\tbeforeDraft: laidOut,\n+\t\tview: laidOut,\n+\t\tapply: laidOut,\n+\t\taddDraft: laidOut,\n+\t\trecordFile: laidOut,\n+\t};\n+}\n+\n+const agent = { name: \"ann\" } as AgentState;\n+\n+test(\"an edit that only changes lines lays out no file\", () => {\n+\texpressMoves(host(\"  return pi * r * r;\", [\"  return Math.PI * r * r;\"]), agent, 1, []);\n+});\n+\n+test(\"a deleted text written again with only brackets or blanks in common lays out no file\", () => {\n+\texpressMoves(host(\"}\", [\"  const tree = parse(p);\", \"}\", \"\"]), agent, 1, []);\n+});\n+\n+test(\"a written line with real content that the draft also deleted goes on to the files\", () => {\n+\tassert.throws(\n+\t\t() => expressMoves(host(\"  return pi * r * r;\", [\"\", \"  return pi * r * r;\"]), agent, 1, []),\n+\t\t/laid out/,\n+\t);\n+});"},{"path":"worker/project/test/file-exact-at.test.ts","added":49,"removed":0,"diff":"--- /dev/null\n+++ b/worker/project/test/file-exact-at.test.ts\n@@ -0,0 +1,49 @@\n+// fileExactAt (version-log.ts, abso Capacity, 2026-10-17): the same answer as fileAt for exactly that spelling, at\n+// every version, read from the file's own lines without the version's list of files. abso's worker/test/\n+// project-files.test.ts checks it on the disk engine, where the list is what costs.\n+\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { MemoryStore, Project } from \"../project.ts\";\n+\n+/** Files added, edited, emptied, made binary and taken out, beside others, over six versions. */\n+function history(): Project {\n+\tconst p = new Project(new MemoryStore(), { hasBlob: () => true });\n+\tp.init({ \"README.md\": \"hi\\n\", \"abso.json\": '{ \"check\": \"true\" }\\n', \"src/a.ts\": \"a\\n\" }, 0);\n+\tp.record(\"ann\", { \"abso.yml\": \"pipelines:\\n  ci:\\n    on: [push]\\n\", \"docs/abso.yml\": \"not this one\\n\" }, 1);\n+\tp.publish(\"ann\", \"a pipeline\", 2);\n+\tp.record(\"ann\", { \"abso.json\": '{ \"check\": \"false\" }\\n', \"empty.txt\": \"\" }, 3, {}, { \"abso.yaml\": \"b\".repeat(64) });\n+\tp.publish(\"ann\", \"a binary, and an empty file\", 4);\n+\tp.record(\"ann\", { \"abso.yml\": null, \"avcs.json\": \"{}\\n\", \"src/a.ts\": \"\" }, 5);\n+\tp.publish(\"ann\", \"the pipeline gone, a file emptied\", 6);\n+\treturn p;\n+}\n+\n+const PATHS = [\n+\t\"abso.yml\",\n+\t\"abso.yaml\",\n+\t\"abso.json\",\n+\t\"avcs.json\",\n+\t\"docs/abso.yml\",\n+\t\"empty.txt\",\n+\t\"src/a.ts\",\n+\t\"README.md\",\n+\t\"never.txt\",\n+];\n+\n+test(\"fileExactAt answers what fileAt answers for the same spelling, at every version\", () => {\n+\tconst p = history();\n+\tconst last = p.version;\n+\tassert.ok(last >= 3);\n+\tfor (let v = 0; v <= last; v++)\n+\t\tfor (const path of PATHS) assert.deepEqual(p.fileExactAt(path, v), p.fileAt(path, v), `${path} at ${v}`);\n+});\n+\n+test(\"a name nothing ever wrote is null, and another spelling is that spelling, not the stored one\", () => {\n+\tconst p = history();\n+\tconst last = p.version;\n+\tassert.deepEqual(p.fileExactAt(\"never.txt\", last), { path: \"never.txt\", version: last, text: null });\n+\t// fileAt reads the stored spelling for any spelling (#41); fileExactAt reads only the one asked.\n+\tassert.equal((p.fileAt(\"ABSO.json\", last) as { text: string | null }).text, '{ \"check\": \"false\" }\\n');\n+\tassert.deepEqual(p.fileExactAt(\"ABSO.json\", last), { path: \"ABSO.json\", version: last, text: null });\n+});"},{"path":"worker/project/test/known-paths.test.ts","added":17,"removed":0,"diff":"--- a/worker/project/test/known-paths.test.ts\n+++ b/worker/project/test/known-paths.test.ts\n@@ -105,3 +105,20 @@\n \t] as const)\n \t\tassert.deepEqual(project.pathsAt(version).files, oracle.draftOf(agent)!.view.paths(), `paths at ${version}`);\n });\n+\n+test(\"an agent's files on a writer, from its base version's kept list when it has nothing of its own, as the in-memory project says\", () => {\n+\t// abso - Performance (abso 711): a status for an agent behind shared listed its files by laying out every known file.\n+\tconst oracle = new Project(new MemoryStore());\n+\tconst project = writer();\n+\thistory(oracle);\n+\thistory(project);\n+\t// v0 and v1 are behind shared with nothing of their own, v2 is at shared, and bob, cy, dee and eve have drafts.\n+\tfor (const agent of [\"v0\", \"v1\", \"v2\", \"bob\", \"cy\", \"dee\", \"eve\"]) {\n+\t\tassert.deepEqual(project.agentPaths(agent), oracle.agentPaths(agent), agent);\n+\t\tassert.deepEqual(project.pathsOf(agent), oracle.pathsOf(agent), `${agent} for a reader`);\n+\t}\n+\tassert.deepEqual(project.agentPaths(\"v0\").files, project.pathsAt(0).files);\n+\tassert.equal(project.agentPaths(\"v0\").files.includes(\"src/gone.ts\"), true);\n+\tassert.equal(project.agentPaths(\"v1\").files.includes(\"src/gone.ts\"), false);\n+\tassert.equal(project.agentPaths(\"eve\").files.includes(\"src/draft-new.ts\"), true);\n+});"},{"path":"worker/project/test/news-lines.test.ts","added":0,"removed":1,"diff":"--- a/worker/project/test/news-lines.test.ts\n+++ b/worker/project/test/news-lines.test.ts\n@@ -37,7 +37,6 @@\n \t);\n \tassert.equal(news[0]!.publisher, \"lib\");\n \tassert.equal(news[1]!.drafts, 1);\n-\tassert.equal(news[1]!.files, 1);\n \tassert.equal(news[1]!.changedNames, 1);\n \tassert.equal(news[1]!.news, 1);\n });"},{"path":"worker/project/test/owed-definition-news.test.ts","added":63,"removed":3,"diff":"--- a/worker/project/test/owed-definition-news.test.ts\n+++ b/worker/project/test/owed-definition-news.test.ts\n@@ -65,9 +65,7 @@\n \tdrafts(owing);\n \tassert.deepEqual(owing.publish(\"ann\", \"parsePattern takes flags\", 4), toldAnswer, \"the publisher's answer\");\n \tconst owed = owing.takeOwedDefinitionNews();\n-\tassert.deepEqual(owed, [\n-\t\t{ version: owing.version, space: owed[0]!.space, publisher: \"ann\", names: [\"parsePattern\"] },\n-\t]);\n+\tassert.deepEqual(owed, [{ version: owing.version, space: owed[0]!.space, publisher: \"ann\", all: true }]);\n \tassert.deepEqual(owing.takeOwedDefinitionNews(), [], \"handed over once\");\n \t// Not told yet: bob's news holds no definition news until it's delivered.\n \tassert.deepEqual(definitionNews(owing.news(\"bob\").news), []);\n@@ -128,3 +126,65 @@\n \tassert.deepEqual(told.takeOwedDefinitionNews(), []);\n \tassert.equal(definitionNews(told.news(\"bob\").news).length, 1);\n });\n+\n+test(\"owedAgents lists who may be owed, and the news one agent at a time adds up to the whole (abso 714)\", () => {\n+\tconst owing = new Project(new MemoryStore());\n+\towing.owesDefinitionNews = true;\n+\tdrafts(owing);\n+\towing.publish(\"ann\", \"parsePattern takes flags\", 4);\n+\tconst [owed] = owing.takeOwedDefinitionNews();\n+\tassert.deepEqual(owing.owedAgents(owed!), [\"bob\", \"cat\"], \"every other agent behind it with a draft\");\n+\tconst whole = owing.definitionNewsOwed(owed!);\n+\tassert.equal(whole.length, 1);\n+\tassert.deepEqual(\n+\t\towing.owedAgents(owed!).flatMap((agent) => owing.definitionNewsOwed(owed!, [agent])),\n+\t\twhole,\n+\t);\n+\towing.sync(\"bob\");\n+\tassert.deepEqual(owing.owedAgents(owed!), [\"cat\"], \"synced past it\");\n+});\n+\n+test(\"everything a publish tells other agents is owed and told after it, the same news (abso 714)\", () => {\n+\t// bob's draft calls parsePattern (definition news), dee's changes the line ann's publish changes (same-lines news),\n+\t// and cat's touches nothing of it (no news).\n+\tconst scenario = (project: Project) => {\n+\t\tdrafts(project);\n+\t\tproject.sync(\"dee\");\n+\t\tproject.edit(\n+\t\t\t\"dee\",\n+\t\t\t{ file: \"src/parse.ts\", old: \"parsePattern(text: string): Node\", new: \"parsePattern(input: string): Node\" },\n+\t\t\t5,\n+\t\t);\n+\t};\n+\tconst told = new Project(new MemoryStore());\n+\tscenario(told);\n+\tconst toldAnswer = told.publish(\"ann\", \"parsePattern takes flags\", 6);\n+\tconst expected = Object.fromEntries([\"bob\", \"cat\", \"dee\"].map((a) => [a, told.news(a).news.toSorted()]));\n+\tassert.ok(expected.bob!.length > 0 && expected.dee!.length > 0, \"the scenario has both kinds of news\");\n+\n+\tconst owing = new Project(new MemoryStore());\n+\towing.owesDefinitionNews = true;\n+\tscenario(owing);\n+\tassert.deepEqual(owing.publish(\"ann\", \"parsePattern takes flags\", 6), toldAnswer, \"the publisher's answer\");\n+\tconst [owed] = owing.takeOwedDefinitionNews();\n+\tassert.equal(owed!.all, true);\n+\tfor (const a of [\"bob\", \"cat\", \"dee\"])\n+\t\tassert.deepEqual(owing.news(a).news, [], `${a} is told nothing in the publish`);\n+\tconst names = owing.owedNewsNames(owed!);\n+\tassert.deepEqual(names, [\"parsePattern\"]);\n+\t// One agent at a time, as the host works it out.\n+\tfor (const agent of owing.owedAgents(owed!)) owing.deliverOwedNews(owing.newsOwed({ ...owed!, names }, [agent]));\n+\tfor (const a of [\"bob\", \"cat\", \"dee\"]) assert.deepEqual(owing.news(a).news.toSorted(), expected[a], a);\n+\t// Twice tells nothing more.\n+\tassert.deepEqual(owing.newsOwed({ ...owed!, names }), []);\n+});\n+\n+test(\"a publish that no other draft can collide with owes nothing\", () => {\n+\tconst owing = new Project(new MemoryStore());\n+\towing.owesDefinitionNews = true;\n+\towing.init({ \"a.txt\": \"one\\n\" }, 0);\n+\towing.sync(\"ann\");\n+\towing.edit(\"ann\", { file: \"a.txt\", old: \"one\", new: \"two\" }, 1);\n+\towing.publish(\"ann\", \"alone\", 2);\n+\tassert.deepEqual(owing.takeOwedDefinitionNews(), []);\n+});"},{"path":"worker/project/test/shared-additions.test.ts","added":49,"removed":0,"diff":"--- a/worker/project/test/shared-additions.test.ts\n+++ b/worker/project/test/shared-additions.test.ts\n@@ -36,3 +36,52 @@\n \t\tstorage.db.close();\n \t}\n });\n+\n+test(\"shared additions read each atom's version from the membership pages, and answer as its events do (abso - Performance, 714)\", (t) => {\n+\tconst storage = new SqlState();\n+\ttry {\n+\t\tconst membership = new Membership(storage),\n+\t\t\tspace = membership.shared;\n+\t\tconst ids = (from: number, to: number) => Array.from({ length: to - from }, (_, i) => `a${from + i}`);\n+\t\tconst add = (atoms: string[], dropped: string[] = []) =>\n+\t\t\taddVersion(space, { version: space.versions.length, agent: \"test\", message: \"version\", time: 0, atoms, dropped });\n+\t\t// Three pages of atoms; a5 and a400 dropped and a5 back, a601 added and dropped: their events are read.\n+\t\tadd(ids(0, 300));\n+\t\tadd(ids(300, 600));\n+\t\tadd([], [\"a5\", \"a400\"]);\n+\t\tadd([\"a5\", \"a600\"]);\n+\t\tadd([\"a601\"]);\n+\t\tadd([], [\"a601\"]);\n+\t\tconst last = space.versions.length - 1;\n+\t\tconst { membershipVersions: _pages, ...eventsOnly } = space;\n+\t\tconst read = storage.read.bind(storage);\n+\t\tlet eventReads = 0;\n+\t\tt.mock.method(storage, \"read\", (collection: string, key: string) => {\n+\t\t\tif (collection.startsWith('membership:\"\":events:')) eventReads++;\n+\t\t\treturn read(collection, key);\n+\t\t});\n+\t\tconst walk = (s: typeof space) => {\n+\t\t\teventReads = 0;\n+\t\t\tconst out: string[][] = [];\n+\t\t\tfor (let from = 0; from < last; from++)\n+\t\t\t\tfor (let to = from + 1; to <= last; to++)\n+\t\t\t\t\tout.push([...new SharedAdditions(s, from, membership.at(s, from), membership.at(s, to), to)]);\n+\t\t\treturn { out, eventReads };\n+\t\t};\n+\t\tconst paged = walk(space);\n+\t\tconst events = walk(eventsOnly);\n+\t\tassert.deepEqual(paged.out, events.out);\n+\t\tassert.ok(\n+\t\t\tpaged.eventReads < events.eventReads / 10,\n+\t\t\t`${paged.eventReads} event reads against ${events.eventReads}`,\n+\t\t);\n+\t\tassert.deepEqual([...new SharedAdditions(space, 1, membership.at(space, 1), membership.at(space, 3), 3)], [\"a600\"]);\n+\t\tassert.deepEqual(\n+\t\t\t[...new SharedAdditions(space, 2, membership.at(space, 2), membership.at(space, 3), 3)],\n+\t\t\t[\"a5\", \"a600\"],\n+\t\t);\n+\t\tassert.deepEqual([...new SharedAdditions(space, 3, membership.at(space, 3), membership.at(space, 5), 5)], []);\n+\t} finally {\n+\t\tstorage.db.close();\n+\t}\n+});"},{"path":"worker/project/version-log.ts","added":29,"removed":0,"diff":"--- a/worker/project/version-log.ts\n+++ b/worker/project/version-log.ts\n@@ -244,6 +244,35 @@\n \t};\n }\n \n+/**\n+ * fileAt for exactly this spelling, from the file's own lines (abso Capacity, 2026-10-17): no spelling lookup and no\n+ * list of the version's files. fileAt's hasFile answers from the version's whole path list, folded from version 0\n+ * when nothing's kept, and a spelling it doesn't find reads every known path. A name nothing ever wrote is one read.\n+ * The pipeline's project files (abso.yml and the like) are read this way on every tick.\n+ */\n+export function fileExactAt(\n+\thost: LogHost,\n+\tpath: string,\n+\tversion: number,\n+\toptions: { draft?: string | null; agent?: string } = {},\n+): { path: string; version: number; text: string | null; blob?: string } {\n+\thost.needInit();\n+\tcheckReadPath(path);\n+\tconst space = host.spaceFor(options);\n+\thost.checkVersion(space, version);\n+\tif (!host.graph.hasAtomsIn(path)) return { path, version, text: null };\n+\tconst view = host.viewAt(space, version);\n+\tconst attrs = view.attrs(path);\n+\t// hasFile's own test, without its path list: kept while empty, a link, a binary, or a visible line.\n+\tconst exists = attrs.exists || attrs.link !== null || attrs.blob !== null || view.lines(path).length > 0;\n+\treturn {\n+\t\tpath,\n+\t\tversion,\n+\t\ttext: exists ? view.text(path) : null,\n+\t\t...(attrs.blob !== null ? { blob: attrs.blob } : {}),\n+\t};\n+}\n+\n /** The files that may differ between two versions, and both views: compare's and compareSummary's ground. */\n function compared(\n \thost: LogHost,"}],"unmatched":[]}