Versions 307 to 318
Lines 1524–1562 at 318 (were 1524–1566 at 307)
1527− const floor = this.#lamportAt(this.#seq(target));
1528− if (this.#storage) {
1529− return this.withProjectionScratch((scratch) => {
1530− let length = 0;
1531− const push = (id: AtomId): void => {
1532− if (scratch.read("seen", id)) return;
1533− scratch.write("seen", id, true);
1534− scratch.write("stack", String(length++), id);
1535− };
1536− for (const id of from) {
1537− if (id === target) return true;
1538− if (this.#lamportAt(this.#seq(id)) > floor) push(id);
1539− }
1540− while (length > 0) {
1541− const key = String(--length);
1542− const current = scratch.read("stack", key) as AtomId;
1543− scratch.remove("stack", key);
1544− if (this.#lamportAt(this.#seq(current)) <= floor) continue;
1545− for (const dependency of this.atom(current).deps) {
1546− if (dependency === target) return true;
1547− push(dependency);
1548− }
1549− }
1550− return false;
1551− });
1529+
1531+ * Which of `targets` are reachable along deps from any of `from` (themselves included), in one walk: it never
1532+ * descends below the lowest target's lamport, and stops once every target is found (abso 714, piece 4: record
1534+ * The walk's seen marks and stack are in memory, by atom number: one byte and four bytes an atom at most, so about
1535+ * 62 KB on abso's 12,454 atoms and 50 MB at 10 million, under a Worker's 128 MB. They were scratch rows in storage
1536+ * (abso-core 139, bounding memory with the graph), which cost a read and a write per atom visited: on abso's Oct 14
1553− const seen = new Set<AtomId>();
1554− const stack = [...from];
1555− while (stack.length > 0) {
1556− const cur = stack.pop()!;
1557− if (cur === target) return true;
1558− if (seen.has(cur)) continue;
1559− seen.add(cur);
1560− if (this.#lamportAt(this.#seq(cur)) <= floor) continue;
1561− for (const d of this.atom(cur).deps) if (!seen.has(d)) stack.push(d);
1562− }
1563− return false;
15651561
Lines 1606–1633 at 318 (were 1610–1632 at 307)
16101606 for (const r of atom.reasons) if (!this.has(r.to)) bad(`reason points at unknown atom ${r.to}`);
16111607
1613− // writers directly, so this is usually one lookup per writer.
1614− const memoryBelow = scratch ? undefined : new Map<AtomId, boolean>();
1615− const below = {
1616− get: (key: AtomId) => (scratch ? (scratch.read("below", key) as boolean | undefined) : memoryBelow!.get(key)),
1617− set: (key: AtomId, value: boolean) => {
1618− if (scratch) scratch.write("below", key, value);
1619− else memoryBelow!.set(key, value);
1620− },
1621− };
1622− const inClosure = (writer: AtomId): boolean => {
1623− let hit = below.get(writer);
1624− if (hit === undefined) {
1625− hit = deps.has(writer) || this.#reaches(atom.deps, writer);
1626− below.set(writer, hit);
1621+ if (parsed.kind === "line" || ((parsed.kind === "gap" || parsed.kind === "pos") && !isStartNode(parsed.node)))
1628− return hit;
1629− };
Lines 10–16 at 318 (were 10–16 at 307)
1111
13−import { isStartNode, lineId, seqOf } from "./keys.ts";
Lines 1095–1108 at 318 (were 1095–1101 at 307)
10961096
1098− for (const n of this.#file(path).vis) yield () => this.graph.textChunks(n);
1098+ // The texts the packed layout already holds, read a page at a time (abso Capacity, 714): a record's diff read each
1099+ // line's own row, 11,873 statements for abso's index.ts. Only a line too long to pack is read in chunks.
11001107
Lines 1112–1118 at 318 (were 1105–1111 at 307)
1108− atom: graph.idOfSeq(graph.writerSeqOf(n)),
11111118
Lines 1126–1137 at 318 (were 1119–1130 at 307)
1122− id: visWriter && visK ? lineId(graph.idOfSeq(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),
1127− atom: graph.idOfSeq(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),
Lines 1143–1156 at 318 (were 1136–1147 at 307)
1146+ // Writer seqs come from the graph's own layout, so they're named with atomId, not checked by idOfSeq (abso 738):
1147+ // on a stored graph its check read the atom count once a line, about 0.9 s of a warm draft-state on abso.
1142− id: visWriter && visK ? lineId(graph.idOfSeq(visWriter[i]!), visK[i]!) : graph.lineIdOf(n),
1144− atom: graph.idOfSeq(visWriter ? visWriter[i]! : graph.writerSeqOf(n)),
Lines 1172–1184 at 318 (were 1163–1175 at 307)
1166− id: seqWriter && seqK ? lineId(graph.idOfSeq(writer), seqK[i]!) : graph.lineIdOf(n),
1171− atom: graph.idOfSeq(writer),
1172− deletedBy: by ? by.map((s) => graph.idOfSeq(s)) : NONE,
Lines 68–74 at 318 (were 68–74 at 307)
71− for (const id of orderedClaimants(g, streams)) if (against.has(id)) theirs.push(id);
Lines 136–142 at 318 (were 136–142 at 307)
136136
139−function* orderedClaimants(g: Graph, streams: IterableIterator<AtomId>[]): IterableIterator<AtomId> {
Lines 152–162 at 318 (were 152–160 at 307)
155+ // Each claimant's seq from its id, as the graph reads it (abso 738): loading the stored atom for it read a row a
157− if (!next.done) push({ id: next.value, seq: g.atom(next.value).seq, stream });
Lines 192–199 at 318 (were 190–197 at 307)
193− const x = g.atom(a.value).seq;
194− const y = g.atom(b.value).seq;
Lines 7–13 at 318 (were 7–13 at 307)
77import { type AtomId, type Graph, joinLines, type LineId, type ReadView } from "../../src/engine/index.ts";
10−import { definitionsBytes, type KeptParts, usesBytes } from "./kept-parts.ts";
Lines 37–43 at 318 (were 37–43 at 307)
3939
40−/** Definitions in the files newer work touched, before it and with it. */
Lines 52–62 at 318 (were 52–59 at 307)
5353 /** A draft's uses, kept while it is asked about with the same views: draft collisions ask once per other agent. */
5454 readonly #usesCache = new WeakMap<ReadonlySet<AtomId>, { view: ReadView; base: ReadView; uses: Uses }>();
55− /** The newer work's definitions before and after, kept while it is asked about with the same views. */
56− readonly #changedCache = new WeakMap<ReadonlySet<AtomId>, { base: ReadView; now: ReadView; defs: Changed }>();
5760
Lines 125–135 at 318 (were 122–127 at 307)
129+ * The files the newer work changed, when the caller knows them without placing its lines (land and draft-state:
130+ * shared's kept version files, abso 738); undefined, or one that answers undefined, and they're worked out here.
Lines 139–194 at 318 (were 131–161 at 307)
131139 // Only these names can collide (a publish's news, news.ts): a draft that uses none of them has none, and the
134− const nowOf = () => (typeof nowView === "function" ? nowView() : nowView);
135− const { baseDefs, nowDefs } = kept
136− ? kept.parts.get(
137− `changed ${kept.changed}`,
138− () => this.#changed(newer, baseView, nowOf()),
139− (c) => definitionsBytes(c.baseDefs) + definitionsBytes(c.nowDefs),
140− )
141− : this.#changedFor(newer, baseView, nowOf());
142− const out: DefinitionCollision[] = [];
143− for (const [name, where] of [...uses].sort(([a], [b]) => (a < b ? -1 : 1))) {
144− // Which definitions the uses mean: the file each use imports the name
145− // from, or its own file when it defines the name at the top level. A
146− // use with neither (a local, a parameter, a global, a name another
147− // language brings in some other way) means none: the rule only speaks
148− // when it knows which definition a use means.
151151 const from = importsOf(view, w).get(name) ?? (definitionsIn(view, [w]).has(name) ? w : undefined);
154− if (scope.size === 0) continue;
155− const inScope = (d: Definition): boolean => scope.has(d.file);
156− const before = baseDefs.get(name)?.filter(inScope);
157− if (!before?.length) continue; // not defined in what the drafter saw: nothing it relies on
158− const after = (nowDefs.get(name) ?? []).filter(inScope);
158+ // Only a file the newer work touched can hold a changed definition, and only one a use means can matter: just those
159+ // files are laid out, before and with the newer work (abso 738). Laying out every file the newer work touched cost
164+ ? kept.parts.get(`touched ${kept.changed}`, () => this.#touched(newer, baseView, nowOf()), filesBytes)
160193 // Who changed it: newer writers of the new definition's lines, or newer deleters of the old one's.
Lines 199–205 at 318 (were 166–171 at 307)
Lines 239–257 at 318 (were 205–224 at 307)
207241
208− /** The newer work's definitions before and after, kept while it is asked about with the same views. */
209− #changedFor(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): Changed {
210− let changed = this.#changedCache.get(newer);
211− if (!changed || changed.base !== baseView || changed.now !== now) {
212− changed = { base: baseView, now, defs: this.#changed(newer, baseView, now) };
213− this.#changedCache.set(newer, changed);
243+ #touchedFor(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): ReadonlySet<string> {
215− return changed.defs;
217251
218− /** Definitions in the files the newer work touched, before it and with it: only there can one have changed. */
219− #changed(newer: ReadonlySet<AtomId>, baseView: ReadView, now: ReadView): Changed {
220− const touched = touchedFiles(this.#graph, newer, [baseView, now]);
221− return { baseDefs: definitionsIn(baseView, touched), nowDefs: definitionsIn(now, touched) };
252+ /** The files the newer work touched, before it and with it: only there can a definition have changed. */
223256
224257 /** The names the draft's lines use and don't declare, less those the lines they replaced already used. */
Lines 62–90 at 318 (were 62–67 at 307)
65+ // The draft's own lines first, before laying out any file (abso 714, piece 3): a move needs a written line with
66+ // real content whose text the draft also deleted. An edit that only changes lines has none, and laying out its
Lines 104–111 at 318 (were 81–87 at 307)
84− if (g.deletersOf(l.id).some((d) => mine.has(d))) {
107+ // Deleted by the draft: one of its atoms' deleted lines, with no lookup of each line's deleters.
Lines 1–8 at 318 (were 1–8 at 307)
11// What draft collisions work out about each draft and each pair of drafts, kept between calls under a hard byte budget
2−// (abso Capacity, issue 664): the names a draft's new lines use, the definitions a draft's changes touch before and
3−// after, and the names a pair of drafts both define in a file. Keys name everything an entry depends on (shared's
4−// 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
5−// leaves and shared moving on all drop theirs at once.
2+// (abso Capacity, issue 664): the names a draft's new lines use, the files a draft's changes touch and the definitions
3+// in each before and after, and the names a pair of drafts both define in a file. Keys name everything an entry depends
4+// 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,
66
Lines 100–109 at 318 (were 100–102 at 307)
100100 n += MAP_ENTRY_BYTES + stringBytes(name) + ARRAY_HEADER_BYTES + where.length * (REFERENCE_BYTES + OBJECT_BYTES);
103+
Lines 29–36 at 318 (were 29–34 at 307)
2929 pairs(draft: readonly AtomId[], against: ReadonlySet<AtomId>, settled: ReadonlySet<AtomId>): Pair[];
32+ /** The files a space's versions after `from`, up to `to`, changed, when each one's are kept; else undefined. */
Lines 95–118 at 318 (were 93–103 at 307)
9597 const describeLand = (p: Pair): Collision => host.describe(p, draftView, host.sharedView(), SHARED);
98+ // Where shared changed since the draft's base, from the files each version since kept as it landed (abso 738): working
99+ // it out from the newer atoms placed every line they wrote or deleted, about 30% of a warm draft-state read.
100− .collisions(own, draftView, host.viewAt(shared, sharedBaseOf(space)), host.sharedView(), newer, SHARED)
Lines 273–297 at 318 (were 273–287 at 307)
278+ /** collision, with theirs described from the agent's space at `version`, not its newest (owed news). */
277281
278−/** A publish's definition news for other agents, not yet worked out: the version it made, and the names it changed. */
279−export interface OwedDefinitionNews {
283+ * A publish's news for other agents, not yet worked out: the version it made, and who made it. `all`: everything the
284+ * publish would have told them (same lines, definitions, moves; abso 714). Without it, as owed before 714, only the
285+ * definition news. `names`: the names its definitions changed, once worked out (owedNewsNames).
283− readonly names: readonly string[];
285295
Lines 312–319 at 318 (were 302–307 at 307)
315+ /** The space's version the moved lines' files are read at: its newest, or an owed publish's own. */
Lines 326–332 at 318 (were 314–320 at 307)
317− const now = host.viewAt(space, last(space));
Lines 335–341 at 318 (were 323–329 at 307)
326− out.push(moveItem(id, host.origin(id, space.name), was.fileOf(moved[0]!), now.fileOf(moved[0]!)));
338+ out.push(moveItem(id, host.origin(id, space.name), was.fileOf(moved[0]!), after.fileOf(moved[0]!)));
Lines 372–401 at 318 (were 360–396 at 307)
360372 // For the host's logs (abso 702): a line as the work starts, written before it, and one as it ends, so work that
361373 // outlives its request still shows. No time in them: a Durable Object's clock stands still in synchronous code.
363− let files = 0;
365− const compareDefinitions = (): ReadonlySet<string> => {
366− const touched = touchedFiles(host.graph, just, [host.viewAt(space, version - 1), host.viewAt(space, last(space))]);
367− files = touched.size;
368− const before = definitionsIn(host.viewAt(space, version - 1), touched);
369− const after = definitionsIn(host.viewAt(space, last(space)), touched);
370− return new Set(
371− [...new Set([...before.keys(), ...after.keys()])].filter(
372− (name) => !before.has(name) || signature(before.get(name)!) !== signature(after.get(name) ?? []),
373− ),
374− );
375− };
376− // Owed (abso Capacity, 2026-10-15): the definition rule over every other draft was most of a publish's write on
377− // 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
378− // and moves are told here as before; the definition news is worked out after the write, against this version.
379− // Asked only once some other agent has a draft (news-lazy.test.ts: no news work at all otherwise).
376+ // Owed (abso 714, Christopher's base fix): on stored tables this news for other agents was most of a publish's one
377+ // write transaction (the same-lines pairs, the definitions, the moves, for every draft: about 10 s for a 30-line
378+ // change to abso's 12k-line index.ts), long enough to time storage out and reset the object (prod abso, 23:32Z
379+ // 2026-10-16). Owing, the publish only notes what it owes, here, once some other agent has a draft; it's worked out
380+ // after the commit, one agent at a time, against this version (newsOwed). Asked only then (news-lazy.test.ts: no
381− let owed = false;
382383 for (const agent of [...host.agents.values()].toSorted((a, b) => (a.name < b.name ? -1 : 1))) {
390+ host.logLine?.({ work: "publishNews", step: "owed", space: space.name, version, publisher: publisher.name });
387394 host.logLine?.({ work: "publishNews", step: "start", space: space.name, version, publisher: publisher.name });
389− changedNames ??= compareDefinitions();
390− owing ??= host.owesDefinitionNews();
391− if (owing && changedNames.size > 0) owed = true;
393− changedNames.size > 0 && !owing
394399 ? host.definitionCollisions(agent, host.newerFor(agent), changedNames).filter((d) => just.has(d.by))
Lines 414–506 at 318 (were 409–443 at 307)
412− files,
415− owed: owed ? 1 : 0,
417− if (owed)
418− host.owe({ version, space: space.name, publisher: publisher.name, names: [...(changedNames ?? [])].sort() });
420421
423+ * The names whose definitions the publish at `version` changed, in the files it touched: before it against its own
424+ * version. Most publishes change none; then only the same-lines rule can bring news. A definition collision the publish
425+ * brings is one of these, so a draft that uses none of them has none (abso Capacity, prod abso 2026-10-15).
429+ const touched = touchedFiles(host.graph, just, [host.viewAt(space, version - 1), host.viewAt(space, version)]);
434+ (name) => !before.has(name) || signature(before.get(name)!) !== signature(after.get(name) ?? []),
438+
439+/** owedNews's names, worked out once for a publish (the host keeps them on its row): changedNamesAt its version. */
445+
422447 * The definition news a publish owes, worked out as newsForOthers would have at that version: the same agents, the
423448 * same rule against the space at `owed.version` and the work published up to it, the same words and keys. Reads only.
424449 * An agent that has synced past the version since is left out (the version is no longer newer for it), and an item
425450 * an agent was already told (from its own edit since, or this run before) is dropped, as queueNews would.
427−export function definitionNewsOwed(host: NewsHost, owed: OwedDefinitionNews): { agent: string; items: NewsItem[] }[] {
455+ /** Only these agents (owedAgents' names), so a host can work the news out one agent at a time (abso 714). */
431− const names = new Set(owed.names);
433463 for (const agent of [...host.agents.values()].toSorted((a, b) => (a.name < b.name ? -1 : 1))) {
434− if (agent.name === owed.publisher || agent.space !== space.name || agent.base >= owed.version) continue;
435− if (host.draft(agent).length === 0) continue;
436− const defs = host
437− .definitionCollisionsAt(agent, host.newerAt(agent, owed.version), names, owed.version)
438− .filter((d) => just.has(d.by));
439− const items = definitionNews(defs).filter((item) => !agent.told.has(item.key));
469+ ? pairsIn(host.graph, draft, just, unionOverlay(host.setAt(space, owed.version), draft)).map((p) => ({
481+ const items = [...lines, ...definitionNews(defs), ...moves].filter((item) => !agent.told.has(item.key));
488+
490+ * The agents a publish's owed news may be for, in the order definitionNewsOwed takes them: every other agent in the
491+ * space, behind the version, with a draft. Cheap (no definition rule), so a host can list them once and then work the
492+ * news out a few at a time, each in its own read (abso 714: one read over every draft reset prod abso's object).
502+
503+function owedTo(host: NewsHost, owed: OwedDefinitionNews, space: Space, agent: AgentState): boolean {
504+ if (agent.name === owed.publisher || agent.space !== space.name || agent.base >= owed.version) return false;
Lines 90–110 at 318 (were 90–95 at 307)
9292
94+ * The files the versions after `from`, up to `to`, changed, from each version's kept row (abso 738): undefined when one
95+ * has none, and the caller works them out from the atoms. Every file whose text differs between the two versions is
107+
93108 /** keptPaths as a set, kept for the newest version asked: never changed once made, so a view can hold it. */
Lines 155–162 at 318 (were 155–160 at 307)
158+ /** fileAt for exactly this spelling, without the version's list of files (version-log.ts fileExactAt). */
159161 compare(from: number, to: number, draft: string | null, agent?: string, summary?: boolean): unknown;
Lines 103–113 at 318 (were 103–111 at 307)
106− definitionNewsOwed as hostedDefinitionNewsOwed,
Lines 222–228 at 318 (were 220–225 at 307)
Lines 1355–1380 at 318 (were 1352–1362 at 307)
13541357
1355− /** What a publish owes, worked out against its version (news.ts definitionNewsOwed). Reads only. */
1356− definitionNewsOwed(owed: OwedDefinitionNews): { agent: string; items: NewsItem[] }[] {
1357− return hostedDefinitionNewsOwed(this.#newsHost, owed);
1358+ /** What a publish owes, worked out against its version (news.ts newsOwed), for `only` these agents if given. Reads only. */
1359+ newsOwed(owed: OwedDefinitionNews, only?: readonly string[]): { agent: string; items: NewsItem[] }[] {
13591362
1364+ definitionNewsOwed(owed: OwedDefinitionNews, only?: readonly string[]): { agent: string; items: NewsItem[] }[] {
1367+
1368+ /** The names a publish's definitions changed (news.ts owedNewsNames), worked out once for its owed news. Reads only. */
1372+
1377+
13601378 /** Tells each agent its owed items, as queueNews does: what an agent was already told adds nothing. */
Lines 2009–2019 at 318 (were 1991–1996 at 307)
19932011
2012+ /** fileAt for exactly this spelling, from the file's own lines: no list of the version's files (version-log.ts). */
2013+ fileExactAt(...args: Tail<Parameters<typeof versionFileExactAt>>): ReturnType<typeof versionFileExactAt> {
2016+
19942017 /** Every file that differs between two versions of shared (or a named draft) (version-log.ts). */
19952018 compare(...args: Tail<Parameters<typeof versionCompare>>): ReturnType<typeof versionCompare> {
Lines 2193–2201 at 318 (were 2170–2175 at 307)
2198+ this.#describe(pair, this.#agentView(agent), this.#viewAt(this.#spaceOf(agent), version), agent.space),
Lines 2499–2507 at 318 (were 2473–2478 at 307)
24742500 describe: (pair, yoursView, theirsView, spaceName) => this.#describe(pair, yoursView, theirsView, spaceName),
2502+ // Only from a stored writer's kept rows, as keptPaths: a project in memory keeps none, and works them out.
Lines 3218–3236 at 318 (were 3189–3203 at 307)
3196− this.#viewAt(space, version ?? last(space)),
3231+ // Where the space changed since the agent's base, from each version's kept files on a stored writer, as land's
3232+ // (abso 714): walking every newer atom for them was 6.5 s of a publish 770 versions behind on abso.
3233+ () => (this.#writerStorage ? this.#paths.keptChangesSince(space, agent.base, to) : undefined),
Lines 73–81 at 318 (were 73–79 at 307)
76− // Known paths first, by key, then only those laid out (#46).
77− const twins = view.knownPaths().filter((p) => pathKey(p) === key && view.hasFile(p));
76+ // 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
77+ // (abso Capacity, 714): those read every atom's membership and file list, 36,360 statements of a record on abso, as
79+ const twins = [...view.graph.knownFiles()].filter((p) => pathKey(p) === key && view.hasFile(p));
new file, 55 lines
1+// Moves before laying out files (abso 714, piece 3): expressMoves looks at the draft's own written and deleted lines
2+// first, and lays out no file when none of its written lines with real content has a deleted line's text. moves.test.ts
4+
10+
11+/** A draft of two atoms: "del" deletes one line, "add" writes the others. Any view laid out throws. */
39+
41+
45+
46+test("a deleted text written again with only brackets or blanks in common lays out no file", () => {
49+
50+test("a written line with real content that the draft also deleted goes on to the files", () => {
new file, 49 lines
1+// fileExactAt (version-log.ts, abso Capacity, 2026-10-17): the same answer as fileAt for exactly that spelling, at
2+// every version, read from the file's own lines without the version's list of files. abso's worker/test/
4+
8+
13+ p.record("ann", { "abso.yml": "pipelines:\n ci:\n on: [push]\n", "docs/abso.yml": "not this one\n" }, 1);
15+ p.record("ann", { "abso.json": '{ "check": "false" }\n', "empty.txt": "" }, 3, {}, { "abso.yaml": "b".repeat(64) });
21+
33+
39+ for (const path of PATHS) assert.deepEqual(p.fileExactAt(path, v), p.fileAt(path, v), `${path} at ${v}`);
41+
42+test("a name nothing ever wrote is null, and another spelling is that spelling, not the stored one", () => {
45+ assert.deepEqual(p.fileExactAt("never.txt", last), { path: "never.txt", version: last, text: null });
46+ // fileAt reads the stored spelling for any spelling (#41); fileExactAt reads only the one asked.
47+ assert.equal((p.fileAt("ABSO.json", last) as { text: string | null }).text, '{ "check": "false" }\n');
48+ assert.deepEqual(p.fileExactAt("ABSO.json", last), { path: "ABSO.json", version: last, text: null });
Lines 37–42 at 318 (were 37–43 at 307)
40− assert.equal(news[1]!.files, 1);
Lines 65–71 at 318 (were 65–73 at 307)
6666 assert.deepEqual(owing.publish("ann", "parsePattern takes flags", 4), toldAnswer, "the publisher's answer");
68− assert.deepEqual(owed, [
69− { version: owing.version, space: owed[0]!.space, publisher: "ann", names: ["parsePattern"] },
70− ]);
68+ assert.deepEqual(owed, [{ version: owing.version, space: owed[0]!.space, publisher: "ann", all: true }]);
Lines 126–190 at 318 (were 128–130 at 307)
129+
130+test("owedAgents lists who may be owed, and the news one agent at a time adds up to the whole (abso 714)", () => {
136+ assert.deepEqual(owing.owedAgents(owed!), ["bob", "cat"], "every other agent behind it with a draft");
146+
147+test("everything a publish tells other agents is owed and told after it, the same news (abso 714)", () => {
148+ // bob's draft calls parsePattern (definition news), dee's changes the line ann's publish changes (same-lines news),
155+ { file: "src/parse.ts", old: "parsePattern(text: string): Node", new: "parsePattern(input: string): Node" },
162+ const expected = Object.fromEntries(["bob", "cat", "dee"].map((a) => [a, told.news(a).news.toSorted()]));
163+ assert.ok(expected.bob!.length > 0 && expected.dee!.length > 0, "the scenario has both kinds of news");
164+
168+ assert.deepEqual(owing.publish("ann", "parsePattern takes flags", 6), toldAnswer, "the publisher's answer");
176+ for (const agent of owing.owedAgents(owed!)) owing.deliverOwedNews(owing.newsOwed({ ...owed!, names }, [agent]));
177+ for (const a of ["bob", "cat", "dee"]) assert.deepEqual(owing.news(a).news.toSorted(), expected[a], a);
181+
Lines 244–278 at 318 (were 244–249 at 307)
246246
248+ * fileAt for exactly this spelling, from the file's own lines (abso Capacity, 2026-10-17): no spelling lookup and no
249+ * list of the version's files. fileAt's hasFile answers from the version's whole path list, folded from version 0
250+ * when nothing's kept, and a spelling it doesn't find reads every known path. A name nothing ever wrote is one read.
266+ // hasFile's own test, without its path list: kept while empty, a link, a binary, or a visible line.
267+ const exists = attrs.exists || attrs.link !== null || attrs.blob !== null || view.lines(path).length > 0;
275+
247276/** The files that may differ between two versions, and both views: compare's and compareSummary's ground. */
- MCP
- compare on this site's /mcp
- CLI
- abso diff 307 318 --json
- JSON
- /christopher/abso-core/compare/307..318?format=json