compare keeps its own answer type; the summary is compareSummary (abso issue 680; abso Capacity). Version 244 of shared· capacity· Oct 15 (2026-10-15 15:46 UTC) · Not checked
243 gave compare one answer type for both shapes, full and summary. abso's own callers read compare(...).files as file changes (worker/src/engine-project.ts, scripts/versions-check.ts, test/versions.test.ts), and the union broke their types, which showed when I pinned 243 into abso. Core's own tests didn't catch it.
version-log.ts: compared() works out the files and both views; compare answers {from, to, files: FileChange[]} as before 243, and compareSummary answers {from, to, summary: true, files}. Project.compareSummary calls it. server/src/engine-project.ts: compare(..., summary) calls compareSummary when summary is set. http.ts and ProjectHistory are unchanged from 243 (?summary=1, a fifth argument). compare-summary.test.ts calls compareSummary. Answers are the same as 243's. Every engine test (292 of 292), every worker/project test (342 of 342); tsc (worker and server) and biome clean.
Version 243 · Files at version 244
4 files, 37 lines added, 15 removed.
--- a/server/src/engine-project.ts
+++ b/server/src/engine-project.ts
@@ -524,7 +524,8 @@
524 524 return this.project.fileAt(path, version, { draft, ...(agent ? { agent } : {}) }); 526 526 compare(from: number, to: number, draft: string | null, agent?: string, summary?: boolean) { 527 − return this.project.compare(from, to, { draft, ...(agent ? { agent } : {}), ...(summary ? { summary } : {}) });
527 + const where = { draft, ...(agent ? { agent } : {}) }; 528 + return summary ? this.project.compareSummary(from, to, where) : this.project.compare(from, to, where); 529 530 without(version: number, versions: readonly number[]) { 530 531 return this.project.without(version, versions); --- a/worker/project/project.ts
+++ b/worker/project/project.ts
@@ -203,6 +203,7 @@
205 205 compare as versionCompare, 206 + compareSummary as versionCompareSummary, 206 207 fileAt as versionFileAt, 207 208 log as versionLog, 208 209 ribbon as versionRibbon, @@ -1861,6 +1862,11 @@
1861 1862 return versionCompare(this.#logHost, ...args); 1865 + /** compare as each file's size and SHA-256, not its texts (version-log.ts, abso issue 680). */ 1866 + compareSummary(...args: Tail<Parameters<typeof versionCompareSummary>>): ReturnType<typeof versionCompareSummary> { 1867 + return versionCompareSummary(this.#logHost, ...args); 1864 1870 /** A version of shared without some earlier versions, or the refusal naming what builds on them (without.ts). */ 1865 1871 without(version: number, versions: readonly number[]): ReturnType<typeof hostedWithout> { 1866 1872 const host: WithoutHost = { --- a/worker/project/test/compare-summary.test.ts
+++ b/worker/project/test/compare-summary.test.ts
@@ -48,7 +48,7 @@
48 48 for (const project of [new Project(new MemoryStore(), { hasBlob: held }), writer()]) { 50 50 const full = project.compare(0, 1); 51 − const summary = project.compare(0, 1, { summary: true });
51 + const summary = project.compareSummary(0, 1); 52 52 if ("summary" in full || !("summary" in summary)) throw Error("compare answered the wrong shape"); 54 54 summary.files.map((f) => f.path), --- a/worker/project/version-log.ts
+++ b/worker/project/version-log.ts
@@ -238,15 +238,13 @@
241 − /** Every file that differs between two versions of shared (or a named draft), before (at `from`) and after (at `to`). */
242 − export function compare(
241 + /** The files that may differ between two versions, and both views: compare's and compareSummary's ground. */ 246 − options: { draft?: string | null; agent?: string; summary?: boolean } = {},
247 − ):
248 − | { from: number; to: number; files: FileChange[] }
249 − | { from: number; to: number; summary: true; files: ReturnType<typeof summariesBetween> } {
246 + options: { draft?: string | null; agent?: string }, 247 + ): { before: ReadView; after: ReadView; files: Set<string> } { 251 249 const space = host.spaceFor(options); 252 250 host.checkVersion(space, from); @@ -254,18 +252,13 @@
254 252 const before = host.viewAt(space, from); 255 253 const after = host.viewAt(space, to); 256 254 const files = new Set<string>(); 257 − // With summary, each file's size and SHA-256 instead of its texts (abso issue 680).
258 − const answer = (paths: Iterable<string>) =>
259 − options.summary
260 − ? { from, to, summary: true as const, files: summariesBetween(before, after, paths) }
261 − : { from, to, files: changesBetween(before, after, paths) };
262 255 // A stored writer keeps each shared version's changed files (version-files.ts, abso Capacity): every file that 263 256 // differs between two versions changed in one between them, so those lists are the candidates, not every atom 264 257 // either set holds. 265 258 if (space.name === SHARED && host.graph.packedFiles) { 266 259 for (let v = Math.min(from, to) + 1; v <= Math.max(from, to); v++) 267 260 for (const file of host.paths.versionFiles(space, v)) files.add(file); 268 − return answer(files);
261 + return { before, after, files }; 270 263 const a = host.at(space, from); 271 264 const b = host.at(space, to); @@ -281,9 +274,31 @@
284 − return answer(files);
277 + return { before, after, files }; 280 + /** Every file that differs between two versions of shared (or a named draft), before (at `from`) and after (at `to`). */ 281 + export function compare( 285 + options: { draft?: string | null; agent?: string } = {}, 286 + ): { from: number; to: number; files: FileChange[] } { 287 + const { before, after, files } = compared(host, from, to, options); 288 + return { from, to, files: changesBetween(before, after, files) }; 291 + /** compare's files as each one's size and SHA-256 before and after, not its texts (abso issue 680). */ 292 + export function compareSummary( 296 + options: { draft?: string | null; agent?: string } = {}, 297 + ): { from: number; to: number; summary: true; files: ReturnType<typeof summariesBetween> } { 298 + const { before, after, files } = compared(host, from, to, options); 299 + return { from, to, summary: true, files: summariesBetween(before, after, files) }; 287 302 /** A version of shared (or of a named draft) as a ReadView, for reading lines (blame at a version). */ 288 303 export function viewAt(