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
MCP
blame on this site's /mcp
CLI
abso blame worker/project/spelling.ts --json
JSON
/christopher/abso-core/blame/worker/project/spelling.ts?format=json
81 linesFirst import 81% · capacity 10% · codex-capacity-chair 4% · rename 4% · infra-split 1%Last change capacity in version 315,

81 lines from 6 changes in 6 versions.

init0Start the project1// Spellings (#49), moved out of project.ts (abso issue 46): whether paths
2// would make two spellings of one name live at once, and which spelling a
3// path has in a view. Plain functions of views; the project calls them.
4
codex-capacity-chair143Add inactive disk projection provider and verified transactional readers (#16)Compare5import type { ReadView } from "../../src/engine/index.ts";
init0Start the project6import { pathKey } from "./pathkey.ts";
7
8/**
9 * Whether paths entering shared would make two spellings of one name live
infra-split37Comments and test names give each reason in plain words, without naming who raised it Notes like "(#37, Builder 5)" or "(AVCS - Security)" become "(#37)" or go, and a private commit hash after a name goes with it. Issue numbers and references such as git's CVE-2019-1353 stay. Only comments and test names change; no behavior changes.Compare10 * at once (#49): two
init0Start the project11 * files whose names differ only in case or Unicode form, or a file and a
12 * folder with one name. No disk holds both, and the git copy can't either.
13 * `touched` are the paths the work changes; `now` is shared as it is, so a
14 * clash shared already holds isn't charged to this work. The answer is the
15 * refusal's reason, or undefined.
16 */
codex-capacity-chair143Add inactive disk projection provider and verified transactional readers (#16)Compare17export function clashIn(view: ReadView, touched: Iterable<string>, now: ReadView): string | undefined {
init0Start the project18 const byKey = new Map<string, string[]>();
capacity278Publish's spelling clash check lists the graph's paths, not the view's known paths (abso Capacity, prod abso 2026-10-15) On prod abso, publishes failed with "storage operation exceeded timeout": one publish ran past the storage limit. On a copy of abso's tables, a publish of a one-line change took 2.7 s and 49,000 statements on a kept engine, and the clash check's view.knownPaths(), which reads every atom's file list, was 1.4 s of it. clashIn now groups every path the graph has ever had (graph.knownFiles(), sorted, so a list keeps the order it had). Each use keeps only paths the view has a file at, and a path the view never had has none, so the answers are the same. On the same copy: a publish 2.7 s to 1.45 s, 49,000 statements to 15,000. tsc and Biome clean; the 30 worker/project tests on clashes, spelling and publish: 146 pass.Compare19 // 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()) {
init0Start the project23 const k = pathKey(p);
24 const list = byKey.get(k);
25 if (list) list.push(p);
26 else byKey.set(k, [p]);
27 }
28 const liveAs = (key: string, but?: string) => byKey.get(key)?.find((q) => q !== but && view.hasFile(q));
29 const old = (a: string, b: string) => now.hasFile(a) && now.hasFile(b);
30 for (const p of [...touched].sort()) {
31 if (!view.hasFile(p)) continue;
32 const key = pathKey(p);
33 const twin = liveAs(key, p);
34 if (twin !== undefined && !old(p, twin))
rename100abso publish is now abso push, abso sync is now abso pull (abso 427) Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing. push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch. Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare35 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.`;
init0Start the project36 const parts = p.split("/");
37 for (let i = 1; i < parts.length; i++) {
38 const file = liveAs(pathKey(parts.slice(0, i).join("/")));
39 if (file !== undefined && !old(p, file))
rename100abso publish is now abso push, abso sync is now abso pull (abso 427) Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing. push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch. Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare40 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.`;
init0Start the project41 }
42 for (const [k, qs] of byKey) {
43 if (!k.startsWith(`${key}/`)) continue;
44 const under = qs.find((q) => view.hasFile(q));
45 if (under !== undefined && !old(p, under))
rename100abso publish is now abso push, abso sync is now abso pull (abso 427) Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing. push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch. Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare46 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.`;
init0Start the project47 }
48 }
49 return undefined;
52/** The same check for a list of paths alone (init, a git commit): the first clash among them. */
53export function clashInPaths(paths: readonly string[]): string | undefined {
54 const files = new Map<string, string>();
55 for (const p of paths) {
56 const twin = files.get(pathKey(p));
57 if (twin !== undefined && twin !== p)
58 return `${twin} and ${p} are one file, spelled two ways (case or Unicode form); keep one`;
59 files.set(pathKey(p), p);
60 }
61 for (const p of paths) {
62 const parts = p.split("/");
63 for (let i = 1; i < parts.length; i++) {
64 const file = files.get(pathKey(parts.slice(0, i).join("/")));
65 if (file !== undefined)
66 return `${file} is a file, and ${p} puts a file in a folder of that name; no disk holds both`;
67 }
68 }
69 return undefined;
72/** The spelling a path has in this view: itself, or the one existing file it matches by pathKey (case and Unicode form ignored). */
codex-capacity-chair143Add inactive disk projection provider and verified transactional readers (#16)Compare73export function spellingOf(view: ReadView, path: string): string {
init0Start the project74 if (view.hasFile(path)) return path;
75 const key = pathKey(path);
capacity315Record scales with its change (abso 714). spellingOf found a new path's twin among the view's known paths, which read every atom's membership and file list: 36,360 of a 1470-shaped record's 53,664 statements on abso's Oct 14 tables. It now looks among the graph's own known paths, kept only where the view has a file, as clashIn does; same answers. View.lineChunks yields the texts the packed layout already holds, read a page at a time, instead of each line's row (11,873 statements); a line too long to pack is still read in chunks. Record on the tables: 53,664 to 8,078 statements; record, publish and shared's files after are identical by hash.Compare76 // 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));
init0Start the project80 return twins.length === 1 ? twins[0]! : path;