{"version":25,"agent":"engine","message":"Read abso.json first, then avcs.json (abso 224, ask 238): one helper (projectFileIn) for the queue, files kept whole, reviewers and init; publish, init and git intake check both files the same way; when shared has both, abso.json counts and status says avcs.json is ignored (status answer projectFile, printed by abso status). .abso/ is kept out of projects like .avcs/. Old projects with only avcs.json work as before.","time":1791531874263,"timeIso":"2026-10-09T07:44:34.263Z","changes":13,"change":279,"files":["client/src/api-answers.ts","client/src/status-commands.ts","worker/project/check-clash.ts","worker/project/ingest.ts","worker/project/init.ts","worker/project/path-rules.ts","worker/project/project-helpers.ts","worker/project/project-status.ts","worker/project/project-types.ts","worker/project/project.ts","worker/project/queue.ts","worker/project/test/project-file.test.ts","worker/project/whole-files.ts"],"draft":null,"diff":[{"path":"client/src/api-answers.ts","added":2,"removed":0,"diff":"--- a/client/src/api-answers.ts\n+++ b/client/src/api-answers.ts\n@@ -187,6 +187,8 @@\n \treadonly ci?: CiStatus;\n \t/** The merge queue (#39), while anything waits or it's paused. */\n \treadonly queue?: QueueState | null;\n+\t/** Only when shared has both project files: abso.json counts, avcs.json is ignored. */\n+\treadonly projectFile?: { readonly used: string; readonly ignored: string };\n }\n /** `POST /a/:agent/draft` answers like a sync, naming the space the agent is now in. */\n export interface SwitchAnswer extends SyncAnswer {"},{"path":"client/src/status-commands.ts","added":5,"removed":0,"diff":"--- a/client/src/status-commands.ts\n+++ b/client/src/status-commands.ts\n@@ -301,6 +301,11 @@\n \t\t// Is shared green (#39)? Right under the first line, since it decides what to do next.\n \t\t...ciText(status.ci, status.version),\n \t\t...queueText(status.queue, config.agent),\n+\t\t...(status.projectFile\n+\t\t\t? [\n+\t\t\t\t\t`Shared has both ${status.projectFile.used} and ${status.projectFile.ignored}: ${status.projectFile.used} counts and ${status.projectFile.ignored} is ignored. Move anything you need into ${status.projectFile.used} and delete ${status.projectFile.ignored}.`,\n+\t\t\t\t]\n+\t\t\t: []),\n \t\tlocal.size === 0\n \t\t\t? \"Everything in this folder is recorded.\"\n \t\t\t: `Not yet recorded (abso record sends them): ${[...local.keys()].join(\", \")}`,"},{"path":"worker/project/check-clash.ts","added":6,"removed":5,"diff":"--- a/worker/project/check-clash.ts\n+++ b/worker/project/check-clash.ts\n@@ -3,7 +3,7 @@\n \n import type { AtomId, View } from \"../../src/engine/index.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { configProblem } from \"./project-helpers.ts\";\n+import { configProblem, PROJECT_FILES } from \"./project-helpers.ts\";\n import type { Space } from \"./spaces.ts\";\n import { clashIn } from \"./spelling.ts\";\n \n@@ -38,10 +38,11 @@\n \tconst touched = host.touchedFiles(changes, [view]);\n \tconst why = clashIn(view, touched, now);\n \tif (why) throw new ProjectError(\"conflict\", why);\n-\t// A broken avcs.json would quietly switch off files kept whole, the queue and reviewers (Git Lessons' review, batch 4).\n-\tif (touched.has(\"avcs.json\") && view.hasFile(\"avcs.json\")) {\n-\t\tconst bad = configProblem(view.text(\"avcs.json\"));\n+\t// A broken project file would quietly switch off files kept whole, the queue and reviewers (Git Lessons' review, batch 4).\n+\tfor (const name of PROJECT_FILES) {\n+\t\tif (!touched.has(name) || !view.hasFile(name)) continue;\n+\t\tconst bad = configProblem(view.text(name));\n \t\tif (bad)\n-\t\t\tthrow new ProjectError(\"conflict\", `avcs.json ${bad}. Shared keeps the one it has; fix yours and publish again.`);\n+\t\t\tthrow new ProjectError(\"conflict\", `${name} ${bad}. Shared keeps the one it has; fix yours and publish again.`);\n \t}\n }"},{"path":"worker/project/ingest.ts","added":6,"removed":4,"diff":"--- a/worker/project/ingest.ts\n+++ b/worker/project/ingest.ts\n@@ -3,7 +3,7 @@\n import { type AtomId, canonicalText, type Hunk, type View } from \"../../src/engine/index.ts\";\n import { checkPath } from \"./path-rules.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { configProblem } from \"./project-helpers.ts\";\n+import { configProblem, PROJECT_FILES } from \"./project-helpers.ts\";\n import type { AgentState, Entry, IngestAnswer, LandAnswer, Meta, Mode, Modes, PublishAnswer } from \"./project-types.ts\";\n import type { Space } from \"./spaces.ts\";\n import { clashInPaths } from \"./spelling.ts\";\n@@ -103,9 +103,11 @@\n \t\t\t\t\"conflict\",\n \t\t\t\t`commit ${c.sha.slice(0, 12)}: ${clash} (#49); rename one with git mv and push again`,\n \t\t\t);\n-\t\tconst config = typeof c.files[\"avcs.json\"] === \"string\" ? configProblem(c.files[\"avcs.json\"]) : undefined;\n-\t\tif (config)\n-\t\t\tthrow new ProjectError(\"conflict\", `commit ${c.sha.slice(0, 12)}: avcs.json ${config}; fix it and push again`);\n+\t\tfor (const name of PROJECT_FILES) {\n+\t\t\tconst config = typeof c.files[name] === \"string\" ? configProblem(c.files[name]) : undefined;\n+\t\t\tif (config)\n+\t\t\t\tthrow new ProjectError(\"conflict\", `commit ${c.sha.slice(0, 12)}: ${name} ${config}; fix it and push again`);\n+\t\t}\n \t}\n \tconst name = `git-${input.commits[0]!.sha.slice(0, 12)}`;\n \tif (host.agents.has(name) || host.spaces.has(name)) {"},{"path":"worker/project/init.ts","added":6,"removed":4,"diff":"--- a/worker/project/init.ts\n+++ b/worker/project/init.ts\n@@ -4,7 +4,7 @@\n import { type AttrSet, buildBase, canonicalText, type View } from \"../../src/engine/index.ts\";\n import { checkPath } from \"./path-rules.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { configProblem } from \"./project-helpers.ts\";\n+import { configProblem, PROJECT_FILES, projectFileOf } from \"./project-helpers.ts\";\n import type { Entry, Modes, ProjectOptions } from \"./project-types.ts\";\n import { clashInPaths } from \"./spelling.ts\";\n import { checkModes } from \"./view-changes.ts\";\n@@ -35,11 +35,13 @@\n \tif (typeof files !== \"object\" || files === null) throw new ProjectError(\"bad-request\", \"init needs {files}\");\n \tconst clash = clashInPaths([...new Set([...Object.keys(files), ...Object.keys(blobs)])].toSorted());\n \tif (clash) throw new ProjectError(\"bad-request\", `init: ${clash} (#49)`);\n-\tconst config = typeof files[\"avcs.json\"] === \"string\" ? configProblem(files[\"avcs.json\"]) : undefined;\n-\tif (config) throw new ProjectError(\"bad-request\", `init: avcs.json ${config}`);\n+\tfor (const name of PROJECT_FILES) {\n+\t\tconst config = typeof files[name] === \"string\" ? configProblem(files[name]) : undefined;\n+\t\tif (config) throw new ProjectError(\"bad-request\", `init: ${name} ${config}`);\n+\t}\n \tif (host.whole) {\n \t\t// The project file being created says which paths are whole (#46).\n-\t\tconst config = typeof files[\"avcs.json\"] === \"string\" ? files[\"avcs.json\"] : undefined;\n+\t\tconst config = projectFileOf(files)?.text;\n \t\t({ files, blobs } = host.wholeOut(files, blobs, undefined, config) as {\n \t\t\tfiles: Record<string, string>;\n \t\t\tblobs: Record<string, string>;"},{"path":"worker/project/path-rules.ts","added":7,"removed":4,"diff":"--- a/worker/project/path-rules.ts\n+++ b/worker/project/path-rules.ts\n@@ -46,15 +46,18 @@\n function reservedKey(seg: string): string {\n \treturn pathKey(seg.replace(/[\\u200C-\\u200F\\u202A-\\u202E\\u206A-\\u206F\\uFEFF]/g, \"\"));\n }\n-const AVCS_KEY = pathKey(\".avcs\");\n+/** The client's folder: .abso, and .avcs from before the rename (224). */\n+const SETTINGS_KEYS = new Set([pathKey(\".abso\"), pathKey(\".avcs\")]);\n \n-/** For writes: the path must be canonical, and not under .avcs/ in any spelling, at any depth. */\n+/** For writes: the path must be canonical, and not under .abso/ or .avcs/ in any spelling, at any depth. */\n export function checkPath(path: string): void {\n \tconst problem = pathProblem(path);\n \tif (problem) throw new ProjectError(\"bad-request\", `bad file path ${JSON.stringify(path)}: ${problem}`);\n \t// The client's settings stay in the agent's folder and are never published.\n-\tif (path.split(\"/\").some((seg) => reservedKey(seg) === AVCS_KEY)) {\n-\t\tthrow new ProjectError(\"bad-request\", `${path} is under .avcs/, which stays in the agent's folder`);\n+\tconst settings = path.split(\"/\").find((seg) => SETTINGS_KEYS.has(reservedKey(seg)));\n+\tif (settings !== undefined) {\n+\t\tconst folder = reservedKey(settings) === pathKey(\".abso\") ? \".abso\" : \".avcs\";\n+\t\tthrow new ProjectError(\"bad-request\", `${path} is under ${folder}/, which stays in the agent's folder`);\n \t}\n }\n "},{"path":"worker/project/project-helpers.ts","added":23,"removed":1,"diff":"--- a/worker/project/project-helpers.ts\n+++ b/worker/project/project-helpers.ts\n@@ -32,8 +32,30 @@\n \treturn counts;\n }\n \n+/** The project file's names, the one read first first (224): abso.json, then avcs.json from before the rename. */\n+export const PROJECT_FILES = [\"abso.json\", \"avcs.json\"] as const;\n+\n /**\n- * What's wrong with an avcs.json, or undefined (Git Lessons' review, batch 4):\n+ * The project file a set of files holds: abso.json when it has one, else\n+ * avcs.json. `ignored` names avcs.json when both are there, so status can say\n+ * which one counts.\n+ */\n+export function projectFileIn(files: {\n+\thasFile(path: string): boolean;\n+\ttext(path: string): string;\n+}): { name: (typeof PROJECT_FILES)[number]; text: string; ignored?: \"avcs.json\" } | undefined {\n+\tconst [name, other] = PROJECT_FILES.filter((n) => files.hasFile(n));\n+\tif (!name) return undefined;\n+\treturn { name, text: files.text(name), ...(other ? { ignored: \"avcs.json\" as const } : {}) };\n+}\n+\n+/** projectFileIn for a plain path -> text record (init, git intake). */\n+export function projectFileOf(files: Readonly<Record<string, unknown>>): ReturnType<typeof projectFileIn> {\n+\treturn projectFileIn({ hasFile: (p) => typeof files[p] === \"string\", text: (p) => files[p] as string });\n+}\n+\n+/**\n+ * What's wrong with a project file (abso.json or avcs.json), or undefined (Git Lessons' review, batch 4):\n  * it must be a JSON object, and the keys abso reads must have their types:\n  * \"whole\" a list of globs, \"queue\" true or false, \"review\" a list of\n  * {paths, reviewer}, and CI's \"setup\", \"build\", \"check\" and \"out\" strings."},{"path":"worker/project/project-status.ts","added":13,"removed":2,"diff":"--- a/worker/project/project-status.ts\n+++ b/worker/project/project-status.ts\n@@ -3,7 +3,7 @@\n \n import type { AtomId, View } from \"../../src/engine/index.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { countRefusals } from \"./project-helpers.ts\";\n+import { countRefusals, type projectFileIn } from \"./project-helpers.ts\";\n import type { AgentState, AgentStatus, EditsVia, Refusal, Starting, StatusAnswer } from \"./project-types.ts\";\n import { last, SHARED, type Space, sharedBaseOf } from \"./spaces.ts\";\n \n@@ -32,6 +32,8 @@\n \tviewAt(space: Space, version: number): View;\n \tagentView(agent: AgentState): View;\n \tversion(): number;\n+\t/** Shared's project file (224), or undefined before init or without one. */\n+\tprojectFile(): ReturnType<typeof projectFileIn>;\n }\n \n /**\n@@ -143,5 +145,14 @@\n \t\t}\n \t}\n \tconst announcements = [...waiting].map(([text, names]) => ({ text, waiting: names }));\n-\treturn { version: host.version(), agents, drafts, refusals: countRefusals(host.refusals), announcements };\n+\t// Both project files in shared (224): say which one counts, never quietly.\n+\tconst file = host.projectFile();\n+\treturn {\n+\t\tversion: host.version(),\n+\t\tagents,\n+\t\tdrafts,\n+\t\trefusals: countRefusals(host.refusals),\n+\t\tannouncements,\n+\t\t...(file?.ignored ? { projectFile: { used: \"abso.json\" as const, ignored: file.ignored } } : {}),\n+\t};\n }"},{"path":"worker/project/project-types.ts","added":2,"removed":0,"diff":"--- a/worker/project/project-types.ts\n+++ b/worker/project/project-types.ts\n@@ -511,6 +511,8 @@\n \trefusals: RefusalCounts;\n \t/** Announcements some agent hasn't received yet, oldest first. */\n \tannouncements: { text: string; waiting: string[] }[];\n+\t/** Only when shared has both abso.json and avcs.json (224): abso.json counts and avcs.json is ignored. */\n+\tprojectFile?: { used: \"abso.json\"; ignored: \"avcs.json\" };\n };\n \n /** Refused publishes and lands, counted by collision kind (a refusal can have several kinds). */"},{"path":"worker/project/project.ts","added":3,"removed":3,"diff":"--- a/worker/project/project.ts\n+++ b/worker/project/project.ts\n@@ -118,7 +118,7 @@\n import { pathKey } from \"./pathkey.ts\";\n import { pluck as hostedPluck, type PluckHost } from \"./pluck.ts\";\n import { ProjectError } from \"./project-error.ts\";\n-import { checkDraftName, checkPerson, NAME } from \"./project-helpers.ts\";\n+import { checkDraftName, checkPerson, NAME, projectFileIn } from \"./project-helpers.ts\";\n import {\n \ttype SnapshotHost,\n \tagentPaths as snapshotAgentPaths,\n@@ -668,8 +668,7 @@\n \n \t/** The project's reviewers per area (#44): avcs.json's `\"review\": [{\"paths\": [...], \"reviewer\": \"...\"}]` in shared. */\n \t#reviewRules(): ReviewRule[] {\n-\t\tconst view = this.#sharedView();\n-\t\treturn reviewRulesIn(view.hasFile(\"avcs.json\") ? view.text(\"avcs.json\") : undefined);\n+\t\treturn reviewRulesIn(projectFileIn(this.#sharedView())?.text);\n \t}\n \n \t/** Each reviewer whose area these files fall in, the files that do, and whether it has noted change `id`. */\n@@ -2151,6 +2150,7 @@\n \t\t\tviewAt: (space, version) => this.#viewAt(space, version),\n \t\t\tagentView: (agent) => this.#agentView(agent),\n \t\t\tversion: () => this.version,\n+\t\t\tprojectFile: () => (this.initialized ? projectFileIn(this.#sharedView()) : undefined),\n \t\t};\n \t\treturn this.#snapshotHost;\n \t}"},{"path":"worker/project/queue.ts","added":5,"removed":4,"diff":"--- a/worker/project/queue.ts\n+++ b/worker/project/queue.ts\n@@ -7,6 +7,7 @@\n import { keptOf, lostLines } from \"./markers.ts\";\n import { clip } from \"./news.ts\";\n import { ProjectError } from \"./project-error.ts\";\n+import { projectFileIn } from \"./project-helpers.ts\";\n import type {\n \tAgentState,\n \tBlobs,\n@@ -62,13 +63,13 @@\n \tflush(entries: Entry[]): void;\n }\n \n-/** Whether shared's avcs.json turns the merge queue on (`\"queue\": true`). */\n+/** Whether shared's project file (abso.json, else avcs.json) turns the merge queue on (`\"queue\": true`). */\n export function queueOn(host: QueueHost): boolean {\n \tif (!host.checkerReady()) return false;\n-\tconst view = host.sharedView();\n-\tif (!view.hasFile(\"avcs.json\")) return false;\n+\tconst file = projectFileIn(host.sharedView());\n+\tif (!file) return false;\n \ttry {\n-\t\treturn (JSON.parse(view.text(\"avcs.json\")) as { queue?: unknown }).queue === true;\n+\t\treturn (JSON.parse(file.text) as { queue?: unknown }).queue === true;\n \t} catch {\n \t\treturn false;\n \t}"},{"path":"worker/project/test/project-file.test.ts","added":71,"removed":0,"diff":"--- /dev/null\n+++ b/worker/project/test/project-file.test.ts\n@@ -0,0 +1,71 @@\n+// The project file's new name (224): abso.json is read first, then avcs.json\n+// from before the rename. Both are checked the same way, and when shared has\n+// both, abso.json counts and status says avcs.json is ignored.\n+\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { MemoryStore, Project } from \"../project.ts\";\n+\n+const review = (reviewer: string) => JSON.stringify({ review: [{ paths: [\"src/**\"], reviewer }] }) + \"\\n\";\n+\n+function touchSrc(project: Project, time: number): void {\n+\tproject.sync(\"builder\");\n+\tconst a = project.edit(\"builder\", { file: \"src/a.ts\", old: `${time - 1}`, new: `${time}` }, time);\n+\tif (!a.ok) throw new Error(\"edit out of step\");\n+\tproject.publish(\"builder\", `a ${time}`, time + 1);\n+}\n+\n+test(\"abso.json alone is the project file: its reviewers are told\", () => {\n+\tconst project = new Project(new MemoryStore(), { now: () => 100 });\n+\tproject.init({ \"abso.json\": review(\"security\"), \"src/a.ts\": \"export const a = 0;\\n\" }, 0);\n+\tproject.sync(\"security\");\n+\ttouchSrc(project, 1);\n+\tassert.equal(project.news(\"security\").news.length, 1);\n+\tassert.equal(project.status().projectFile, undefined, \"one file: nothing to say\");\n+});\n+\n+test(\"avcs.json alone still works\", () => {\n+\tconst project = new Project(new MemoryStore(), { now: () => 100 });\n+\tproject.init({ \"avcs.json\": review(\"security\"), \"src/a.ts\": \"export const a = 0;\\n\" }, 0);\n+\tproject.sync(\"security\");\n+\ttouchSrc(project, 1);\n+\tassert.equal(project.news(\"security\").news.length, 1);\n+});\n+\n+test(\"with both, abso.json counts and status says avcs.json is ignored\", () => {\n+\tconst project = new Project(new MemoryStore(), { now: () => 100 });\n+\tproject.init(\n+\t\t{ \"abso.json\": review(\"security\"), \"avcs.json\": review(\"writer\"), \"src/a.ts\": \"export const a = 0;\\n\" },\n+\t\t0,\n+\t);\n+\tfor (const a of [\"security\", \"writer\"]) project.sync(a);\n+\ttouchSrc(project, 1);\n+\tassert.equal(project.news(\"security\").news.length, 1);\n+\tassert.equal(project.news(\"writer\").news.length, 0, \"avcs.json is ignored\");\n+\tassert.deepEqual(project.status().projectFile, { used: \"abso.json\", ignored: \"avcs.json\" });\n+});\n+\n+test(\"a broken abso.json is refused like a broken avcs.json, at publish and at init\", () => {\n+\tconst project = new Project(new MemoryStore());\n+\tproject.init({ \"abso.json\": '{\"queue\": false}\\n' }, 0);\n+\tproject.sync(\"alice\");\n+\tproject.record(\"alice\", { \"abso.json\": '{\"queue\": \"yes\"}\\n' }, 1);\n+\tassert.throws(() => project.publish(\"alice\", \"queue as text\", 2), /abso\\.json has \"queue\" that isn't true or false/);\n+\tassert.equal(project.files()[\"abso.json\"], '{\"queue\": false}\\n', \"shared keeps the good one\");\n+\t// A broken avcs.json is still refused when abso.json is there too: it may be read again once abso.json goes.\n+\tproject.record(\"alice\", { \"abso.json\": '{\"queue\": false}\\n', \"avcs.json\": \"[1]\\n\" }, 3);\n+\tassert.throws(() => project.publish(\"alice\", \"old file broken\", 4), /avcs\\.json must be a JSON object/);\n+\tassert.throws(\n+\t\t() => new Project(new MemoryStore()).init({ \"abso.json\": \"[1]\\n\" }, 0),\n+\t\t/init: abso\\.json must be a JSON object/,\n+\t);\n+});\n+\n+test(\".abso/ stays in the agent's folder, like .avcs/\", () => {\n+\tconst project = new Project(new MemoryStore());\n+\tproject.init({ \"a.txt\": \"a\\n\" }, 0);\n+\tfor (const p of [\".abso/config.json\", \"sub/.ABSO/x\", \".avcs/config.json\"]) {\n+\t\tassert.throws(() => project.record(\"ann\", { [p]: \"x\\n\" }, 1), /is under \\.(abso|avcs)\\//, p);\n+\t}\n+\tassert.equal(project.record(\"ann\", { \".absolutely.txt\": \"x\\n\" }, 1) !== undefined, true);\n+});"},{"path":"worker/project/whole-files.ts","added":4,"removed":4,"diff":"--- a/worker/project/whole-files.ts\n+++ b/worker/project/whole-files.ts\n@@ -3,6 +3,7 @@\n \n import { canonicalText, type View } from \"../../src/engine/index.ts\";\n import { matchesPattern } from \"./globs.ts\";\n+import { projectFileIn } from \"./project-helpers.ts\";\n import type { ProjectOptions } from \"./project-types.ts\";\n \n /**\n@@ -18,14 +19,13 @@\n \twhole: ProjectOptions[\"whole\"];\n }\n \n-/** avcs.json's `\"whole\": [globs]`: paths kept whole. From `config` when given (init), else shared's. */\n+/** The project file's `\"whole\": [globs]`: paths kept whole. From `config` when given (init), else shared's. */\n export function wholeRules(host: WholeHost, config?: string): string[] {\n \tlet text = config;\n \tif (text === undefined) {\n \t\tif (!host.initialized()) return [];\n-\t\tconst view = host.sharedView();\n-\t\tif (!view.hasFile(\"avcs.json\")) return [];\n-\t\ttext = view.text(\"avcs.json\");\n+\t\ttext = projectFileIn(host.sharedView())?.text;\n+\t\tif (text === undefined) return [];\n \t}\n \ttry {\n \t\tconst whole = (JSON.parse(text) as { whole?: unknown }).whole;"}],"ci":null}