Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 45 to 318

Compare

+14 −9 in 4 places
Lines 2–8 at 318 (were 2–8 at 45)
22// would make two spellings of one name live at once, and which spelling a
33// path has in a view. Plain functions of views; the project calls them.
44
5−import type { View } from "../../src/engine/index.ts";
5+import type { ReadView } from "../../src/engine/index.ts";
66import { pathKey } from "./pathkey.ts";
77
88/**
Lines 14–25 at 318 (were 14–22 at 45)
1414 * clash shared already holds isn't charged to this work. The answer is the
1515 * refusal's reason, or undefined.
1616 */
17−export function clashIn(view: View, touched: Iterable<string>, now: View): string | undefined {
17+export function clashIn(view: ReadView, touched: Iterable<string>, now: ReadView): string | undefined {
1818 const byKey = new Map<string, string[]>();
19− for (const p of view.knownPaths()) {
19+ // Every path the graph has ever had, sorted, not the view's known paths (abso Capacity, prod abso 2026-10-15): those
20+ // read every atom's file list, over half of a publish on abso. Each use below keeps only paths the view has a file
21+ // at, and a path the view never had has none, so the answers are the same.
22+ for (const p of [...view.graph.knownFiles()].sort()) {
2023 const k = pathKey(p);
2124 const list = byKey.get(k);
2225 if (list) list.push(p);
Lines 32–49 at 318 (were 29–46 at 45)
2932 const key = pathKey(p);
3033 const twin = liveAs(key, p);
3134 if (twin !== undefined && !old(p, twin))
32− return `${p} and ${twin} would both be in shared, but they're one file, spelled two ways (case or Unicode form). Keep one: abso mv ${p} ${twin}, or put your change into ${twin}, then publish again.`;
35+ return `${p} and ${twin} would both be in shared, but they're one file, spelled two ways (case or Unicode form). Keep one: abso mv ${p} ${twin}, or put your change into ${twin}, then push again.`;
3336 const parts = p.split("/");
3437 for (let i = 1; i < parts.length; i++) {
3538 const file = liveAs(pathKey(parts.slice(0, i).join("/")));
3639 if (file !== undefined && !old(p, file))
37− return `${p} puts a file in folder ${parts.slice(0, i).join("/")}, but ${file} is a file of that name in shared, and no disk holds both. Move one of them (abso mv), then publish again.`;
40+ return `${p} puts a file in folder ${parts.slice(0, i).join("/")}, but ${file} is a file of that name in shared, and no disk holds both. Move one of them (abso mv), then push again.`;
3841 }
3942 for (const [k, qs] of byKey) {
4043 if (!k.startsWith(`${key}/`)) continue;
4144 const under = qs.find((q) => view.hasFile(q));
4245 if (under !== undefined && !old(p, under))
43− return `${p} is a file, but ${under} makes a folder of that name in shared, and no disk holds both. Move one of them (abso mv), then publish again.`;
46+ return `${p} is a file, but ${under} makes a folder of that name in shared, and no disk holds both. Move one of them (abso mv), then push again.`;
4447 }
4548 }
4649 return undefined;
Lines 70–81 at 318 (were 67–76 at 45)
6770}
6871
6972/** The spelling a path has in this view: itself, or the one existing file it matches by pathKey (case and Unicode form ignored). */
70−export function spellingOf(view: View, path: string): string {
73+export function spellingOf(view: ReadView, path: string): string {
7174 if (view.hasFile(path)) return path;
7275 const key = pathKey(path);
73− // Known paths first, by key, then only those laid out (#46).
74− 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
78+ // clashIn found. A path the view never had has no file in it, so the answers are the same.
79+ const twins = [...view.graph.knownFiles()].filter((p) => pathKey(p) === key && view.hasFile(p));
7580 return twins.length === 1 ? twins[0]! : path;
7681}
MCP
compare on this site's /mcp
CLI
abso diff 45 318 worker/project/spelling.ts --json
JSON
/christopher/abso-core/compare/45..318?file=worker%2Fproject%2Fspelling.ts&format=json