{"draft":null,"from":175,"to":318,"files":[{"path":"client/test/autosettle-command.test.ts","added":58,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/autosettle-command.test.ts\n@@ -0,0 +1,58 @@\n+// abso autosettle's words (abso-core 23): each choice said plainly, the gate when stopped, and who changed it.\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { autosettleWords, holdWords } from \"../src/autosettle-commands.ts\";\n+\n+test(\"each choice is said plainly, with the gate when it's stopped and who changed it last\", () => {\n+\tassert.match(\n+\t\tautosettleWords({ project: \"p\", mode: \"off\", at: 0.5 }),\n+\t\t/^p is on Off: held pushes come back as they always have\\.$/,\n+\t);\n+\tassert.match(autosettleWords({ project: \"p\", mode: \"advise\", at: 0.5 }), /The agent still settles\\./);\n+\tconst settle = autosettleWords({\n+\t\tproject: \"p\",\n+\t\tmode: \"settle\",\n+\t\tat: 0.6,\n+\t\tgate: \"stopped\",\n+\t\tchangedBy: \"christopher\",\n+\t\tchangedAt: \"2026-10-15T07:00:00.000Z\",\n+\t});\n+\tassert.match(settle, /^p is on Settle at 0\\.60: /);\n+\tassert.match(settle, /Stopped by abso for now/);\n+\tassert.match(settle, /Last changed by christopher, 2026-10-15T07:00:00\\.000Z\\.$/);\n+});\n+\n+test(\"a held push in the history: what the model said, whether abso was told to settle it, and what was then kept\", () => {\n+\tconst words = holdWords({\n+\t\tid: 2,\n+\t\ttime: \"2026-10-15T07:03:19.030Z\",\n+\t\tagent: \"docs\",\n+\t\tmessage: \"Fix the jion typo, and say to pull after joining\\n\\nSettled automatically (abso 19):\",\n+\t\tmode: \"settle\",\n+\t\tat: 0.5,\n+\t\tcollisions: [\n+\t\t\t{\n+\t\t\t\tfile: \"docs/start.md\",\n+\t\t\t\ttheirs: { agent: \"client\", version: 2 },\n+\t\t\t\tadvice: { pick: \"yours\", confidence: 0.81, by: \"model\", reason: \"r\" },\n+\t\t\t\tsettled: true,\n+\t\t\t\toutcome: { kept: \"yours\", auto: true, version: 3 },\n+\t\t\t},\n+\t\t\t{\n+\t\t\t\tfile: \"src/network.ts\",\n+\t\t\t\ttheirs: { agent: \"client\" },\n+\t\t\t\tadvice: { pick: \"theirs\", confidence: 1, by: \"rule\", reason: \"r\" },\n+\t\t\t\tsettled: false,\n+\t\t\t\toutcome: null,\n+\t\t\t},\n+\t\t],\n+\t});\n+\tassert.equal(\n+\t\twords,\n+\t\t[\n+\t\t\t'2: docs, 2026-10-15T07:03:19.030Z, under settle at 0.50: \"Fix the jion typo, and say to pull after joining\"',\n+\t\t\t\"  docs/start.md, against client's version 2: advised keep yours (model, 0.81), told to settle; kept yours automatically in version 3.\",\n+\t\t\t\"  src/network.ts, against client: advised keep theirs (a check in code); not settled yet.\",\n+\t\t].join(\"\\n\"),\n+\t);\n+});"}],"unmatched":[]}