{"version":283,"agent":"capacity","message":"A publish's news for others runs the definition rule only for drafts that use a name the publish changed (abso Capacity; prod abso's publishes ran past the storage limit, 2026-10-15)\n\nWhen a publish changes any definition, newsForOthers ran the definition rule for every agent with a draft (about 100 on abso), and the rule compared definitions in every file changed since that agent's own base: worker/src/index.ts was laid out and parsed again for each base. News only reports collisions this publish brings (their by is in just), and each is a name whose definition this publish changed. So compareDefinitions now returns those names, worked out once, and DefinitionRule.collisions takes them: a draft that uses none of them has none, and the definitions changed since its base aren't worked out. Answers are unchanged.\n\nOn a copy of abso's tables, a publish changing about 300 lines of worker/src/index.ts plus 13 other files went from 56 s and 412,000 statements to 22.5 s and 158,000 (the second run on a busier machine; its first step took 18 s instead of 10). tsc and Biome clean; the 70 worker/project tests on news, definitions, publish and collisions: 329 pass.","time":1792117993348,"timeIso":"2026-10-16T02:33:13.348Z","changes":3,"change":4482,"files":["worker/project/definition-rule.ts","worker/project/news.ts","worker/project/project.ts"],"draft":null,"diff":[{"path":"worker/project/definition-rule.ts","added":4,"removed":0,"diff":"--- a/worker/project/definition-rule.ts\n+++ b/worker/project/definition-rule.ts\n@@ -121,12 +121,16 @@\n \t\tnewer: ReadonlySet<AtomId>,\n \t\tspaceName: string,\n \t\tkept?: { parts: KeptParts; uses: string; changed: string },\n+\t\tnames?: ReadonlySet<string>,\n \t): DefinitionCollision[] {\n \t\tif (draft.size === 0 || newer.size === 0) return [];\n \t\tconst uses = kept\n \t\t\t? kept.parts.get(`uses ${kept.uses}`, () => this.#usesOf(draft, view, baseView), usesBytes)\n \t\t\t: this.#usesFor(draft, view, baseView);\n \t\tif (uses.size === 0) return [];\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("},{"path":"worker/project/news.ts","added":22,"removed":10,"diff":"--- a/worker/project/news.ts\n+++ b/worker/project/news.ts\n@@ -248,7 +248,12 @@\n \tviewAt(space: Space, version: number): ReadView;\n \torigin(atom: AtomId, spaceName: string): Origin;\n \tcollision(agent: AgentState, pair: Pair): Collision;\n-\tdefinitionCollisions(agent: AgentState, newer: ReadonlySet<AtomId>): DefinitionCollision[];\n+\t/** `names`: only these can collide; a draft that uses none of them has none (newsForOthers). */\n+\tdefinitionCollisions(\n+\t\tagent: AgentState,\n+\t\tnewer: ReadonlySet<AtomId>,\n+\t\tnames?: ReadonlySet<string>,\n+\t): DefinitionCollision[];\n \tqueueNews(agent: AgentState, items: readonly NewsItem[], entries: Entry[]): void;\n }\n \n@@ -320,14 +325,20 @@\n \tentries: Entry[],\n ): void {\n \tconst just = new Set(space.versions[version]!.atoms);\n-\tlet changedDefinitions: boolean | undefined;\n-\tconst compareDefinitions = () => {\n-\t\t// Most publishes change no definition; then only the same-lines rule can bring news.\n+\t// The names whose definitions this publish changed, worked out once. Most publishes change none; then only the\n+\t// same-lines rule can bring news. A definition collision this publish brings (its `by` in `just`) is one of\n+\t// these, so a draft that uses none of them has none, and the rule isn't run for it (abso Capacity, prod abso\n+\t// 2026-10-15): it compared definitions in every file changed since each agent's base, for every agent with a draft,\n+\t// and a publish touching abso's worker/src/index.ts took 48 s of it.\n+\tlet changedNames: ReadonlySet<string> | undefined;\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\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([...before.keys(), ...after.keys()])].some(\n-\t\t\t(name) => !before.has(name) || signature(before.get(name)!) !== signature(after.get(name) ?? []),\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 \tfor (const agent of [...host.agents.values()].toSorted((a, b) => (a.name < b.name ? -1 : 1))) {\n@@ -335,10 +346,11 @@\n \t\tconst draft = host.draft(agent);\n \t\tif (draft.length === 0) continue;\n \t\tconst lines = pairsIn(host.graph, draft, just, unionOverlay(host.setOf(space), draft));\n-\t\tchangedDefinitions ??= compareDefinitions();\n-\t\tconst defs = changedDefinitions\n-\t\t\t? host.definitionCollisions(agent, host.newerFor(agent)).filter((d) => just.has(d.by))\n-\t\t\t: [];\n+\t\tchangedNames ??= compareDefinitions();\n+\t\tconst defs =\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\thost.queueNews(\n \t\t\tagent,\n \t\t\t[...lineNews(host, agent, lines), ...definitionNews(defs), ...moveNews(host, draft, just, space, version)],"},{"path":"worker/project/project.ts","added":8,"removed":2,"diff":"--- a/worker/project/project.ts\n+++ b/worker/project/project.ts\n@@ -2105,7 +2105,7 @@\n \t\t\tviewAt: (space, version) => this.#viewAt(space, version),\n \t\t\torigin: (atom, spaceName) => this.#origin(atom, spaceName),\n \t\t\tcollision: (agent, pair) => this.#collision(agent, pair),\n-\t\t\tdefinitionCollisions: (agent, newer) => this.#definitionCollisions(agent, newer),\n+\t\t\tdefinitionCollisions: (agent, newer, names) => this.#definitionCollisions(agent, newer, names),\n \t\t\tqueueNews: (agent, items, entries) => this.#queueNews(agent, items, entries),\n \t\t};\n \t\treturn this.#news;\n@@ -3111,7 +3111,11 @@\n \t// The changed-definition rule (#11) -------------------------------------------\n \n \t/** The rule for an agent's draft in its space. */\n-\t#definitionCollisions(agent: AgentState, newer: ReadonlySet<AtomId>): DefinitionCollision[] {\n+\t#definitionCollisions(\n+\t\tagent: AgentState,\n+\t\tnewer: ReadonlySet<AtomId>,\n+\t\tnames?: ReadonlySet<string>,\n+\t): DefinitionCollision[] {\n \t\tconst draft = new Set(this.#draft(agent));\n \t\tif (draft.size === 0 || newer.size === 0) return [];\n \t\tconst space = this.#spaceOf(agent);\n@@ -3126,6 +3130,8 @@\n \t\t\tthis.#viewAt(space, last(space)),\n \t\t\tnewer,\n \t\t\tspace.name,\n+\t\t\tundefined,\n+\t\t\tnames,\n \t\t);\n \t}\n }"}],"ci":null}