{"version":305,"agent":"pinch","message":"abso init checks the project's name before any call, as join does. A name like .. went out as part of the request's path, where it collapsed, so a local init answered about project calls instead of naming the rule. The test now checks the message for .. and .hidden, and that init leaves the folder as it was.","time":1792178566427,"timeIso":"2026-10-16T19:22:46.427Z","changes":3,"change":5131,"files":["client/src/join-commands.ts","client/test/local.test.ts"],"draft":null,"diff":[{"path":"client/src/join-commands.ts","added":5,"removed":0,"diff":"--- a/client/src/join-commands.ts\n+++ b/client/src/join-commands.ts\n@@ -154,6 +154,11 @@\n \tif (findRoot(root) === root) throw new UsageError(`${root} already has .abso/config.json`);\n \tconst project = str(args, \"project\");\n \tif (!project) throw new UsageError(\"give the project a name with --project <name>\");\n+\t// Checked before any call: a name like \"..\" would otherwise go out as part of the request's path.\n+\tif (!NAME.test(project))\n+\t\tthrow new UsageError(\n+\t\t\t`project names are letters, digits, dot, dash and underscore (got ${JSON.stringify(project)})`,\n+\t\t);\n \tif (bool(args, \"public\") && bool(args, \"private\")) throw new UsageError(\"--public or --private, not both\");\n \tconst local = localFrom(args, env, \"init\");\n \t// A box signed in here, and no other credential asked for: the project is made as the person who approved the box,"},{"path":"client/test/local.test.ts","added":8,"removed":3,"diff":"--- a/client/test/local.test.ts\n+++ b/client/test/local.test.ts\n@@ -4,7 +4,7 @@\n \n import assert from \"node:assert/strict\";\n import { spawnSync } from \"node:child_process\";\n-import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\n+import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\n import { tmpdir } from \"node:os\";\n import { join } from \"node:path\";\n import { after, before, describe, it } from \"node:test\";\n@@ -145,9 +145,14 @@\n \tit(\"a project's name can't start with a dot, so its folder stays inside the store\", async () => {\n \t\tconst dir = temp(\"dots\");\n \t\twriteFileSync(join(dir, \"a.txt\"), \"x\\n\");\n-\t\tconst r = await run(dir, \"init\", \"--local\", \"--project\", \"..\", \"--agent\", \"a\");\n-\t\tassert.notEqual(r.exit, 0);\n+\t\tfor (const name of [\"..\", \".hidden\"]) {\n+\t\t\tconst r = await run(dir, \"init\", \"--local\", \"--project\", name, \"--agent\", \"a\");\n+\t\t\tassert.equal(r.exit, 1, r.out + r.err);\n+\t\t\t// The name rule says why, before any call is made (a \"..\" would collapse the call's path).\n+\t\t\tassert.match(r.err, /project names are letters, digits, dot, dash and underscore/);\n+\t\t}\n \t\tassert.ok(!existsSync(join(store, \"..\", \"project.sqlite\")));\n+\t\tassert.deepEqual(readdirSync(dir), [\"a.txt\"], \"init left nothing behind\");\n \t});\n });\n "}],"ci":null}