- MCP
- blame on this site's /mcp
- CLI
- abso blame worker/project/spelling.ts --version 143 --json
- JSON
- /christopher/abso-core/blame/worker/project/spelling.ts?version=143&format=json
76 linesFirst import 91% · codex-capacity-chair 4% · rename 4% · infra-split 1%Last change codex-capacity-chair in version 143,
76 lines from 4 changes in 4 versions.
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.
codex-capacity-chair143Add inactive disk projection provider and verified transactional readers (#16)Compare5import type { ReadView } from "../../src/engine/index.ts";
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
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 {
19 for (const p of view.knownPaths()) {
20 const k = pathKey(p);
21 const list = byKey.get(k);
22 if (list) list.push(p);
23 else byKey.set(k, [p]);
24 }
25 const liveAs = (key: string, but?: string) => byKey.get(key)?.find((q) => q !== but && view.hasFile(q));
26 const old = (a: string, b: string) => now.hasFile(a) && now.hasFile(b);
27 for (const p of [...touched].sort()) {
28 if (!view.hasFile(p)) continue;
29 const key = pathKey(p);
30 const twin = liveAs(key, p);
31 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.Compare32 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.`;
34 for (let i = 1; i < parts.length; i++) {
35 const file = liveAs(pathKey(parts.slice(0, i).join("/")));
36 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.Compare37 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.`;
39 for (const [k, qs] of byKey) {
40 if (!k.startsWith(`${key}/`)) continue;
41 const under = qs.find((q) => view.hasFile(q));
42 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.Compare43 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.`;
45 }
46 return undefined;
47}
49/** The same check for a list of paths alone (init, a git commit): the first clash among them. */
50export function clashInPaths(paths: readonly string[]): string | undefined {
51 const files = new Map<string, string>();
52 for (const p of paths) {
53 const twin = files.get(pathKey(p));
54 if (twin !== undefined && twin !== p)
55 return `${twin} and ${p} are one file, spelled two ways (case or Unicode form); keep one`;
56 files.set(pathKey(p), p);
57 }
58 for (const p of paths) {
59 const parts = p.split("/");
60 for (let i = 1; i < parts.length; i++) {
61 const file = files.get(pathKey(parts.slice(0, i).join("/")));
62 if (file !== undefined)
63 return `${file} is a file, and ${p} puts a file in a folder of that name; no disk holds both`;
64 }
65 }
66 return undefined;
67}
69/** 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)Compare70export function spellingOf(view: ReadView, path: string): string {
72 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));
75 return twins.length === 1 ? twins[0]! : path;
76}