- MCP
- show on this site's /mcp
- CLI
- abso show 32 --json
- JSON
- /christopher/abso-core/versions/32?format=json
Client: tests no longer read this machine's Claude folder (setup.ts), a mod folder with no readable install record counts as old, import-git keeps .abso (Pinch's review of 28, abso 253)
of shared·review··Not checked
Version 31 · Files at version 32
5 files, 34 lines added, 6 removed.
--- a/client/scripts/import-git.ts
+++ b/client/scripts/import-git.ts
@@ -60,7 +60,11 @@
63−if (after !== undefined && !existsSync(join(dir, ".avcs", "config.json")))
6569
@@ -140,15 +144,16 @@
142146
143−/** The commit's tree in `dir`, replacing everything but .avcs; its files, folder-relative. */
147+/** The commit's tree in `dir`, replacing everything but .avcs and .abso; its files, folder-relative. */
145− for (const e of readdirSync(into)) if (e !== ".avcs") rmSync(join(into, e), { recursive: true, force: true });
146151 // Piped, with tar in the folder: no path for tar to misread (GNU tar takes "C:" for a remote host).
149154 const untar = spawnSync("tar", ["-xf", "-"], { cwd: into, input: archive.stdout, encoding: "utf8" });
151− return walk(into).filter((rel) => !rel.startsWith(".avcs/"));
153158
154159/** Why abso would store these bytes differently from git, or undefined. Binary files (NUL, or not UTF-8) go up byte for byte. */
--- a/client/src/state-dir.ts
+++ b/client/src/state-dir.ts
@@ -39,12 +39,13 @@
3939export function newFolderDir(env: Readonly<Record<string, string | undefined>> = process.env): string {
4445 version = (JSON.parse(readFileSync(join(skills, name, ".avcs-install.json"), "utf8")) as { version?: unknown })
47− continue; // not installed, or no readable record
4950 if (typeof version !== "string" || !versionAtLeast(version, MOD_KNOWS_ABSO)) return OLD_STATE_DIR;
--- a/client/test/new-folder-dir.test.ts
+++ b/client/test/new-folder-dir.test.ts
@@ -27,3 +27,12 @@
30+
--- /dev/null
+++ b/client/test/setup.ts
@@ -0,0 +1,13 @@
1+// Loaded before every test file (npm test: node --import). New folders are made as .abso or .avcs by what mods
2+// are installed (state-dir.ts newFolderDir), so a test must not read this machine's ~/.claude: it gets a Claude
3+// folder with one mod from before the rename installed, which keeps new folders on .avcs. The tests of that
8+
12+writeFileSync(join(mod, ".avcs-install.json"), JSON.stringify({ mod: "avcs", version: "0.1.0+0000000" }));
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
12− "test": "node --test \"src/**/*.test.ts\" \"worker/project/**/*.test.ts\" \"client/test/**/*.test.ts\"",
12+ "test": "node --import ./client/test/setup.ts --test \"src/**/*.test.ts\" \"worker/project/**/*.test.ts\" \"client/test/**/*.test.ts\"",