{"draft":null,"from":175,"to":318,"files":[{"path":"client/test/client.test.ts","added":64,"removed":1,"diff":"--- a/client/test/client.test.ts\n+++ b/client/test/client.test.ts\n@@ -824,6 +824,46 @@\n \t\t);\n \t});\n \n+\tit(\"shows and exports a version without earlier ones, refuses one a kept version builds on, and leaves shared alone\", async () => {\n+\t\tconst { name, folders } = await project({ \"a.txt\": \"a\\n\", \"b.txt\": \"b\\n\" }, \"alice\", \"bob\");\n+\t\tconst [alice, bob] = [folders.alice!, folders.bob!];\n+\t\twrite(alice, { \"a.txt\": \"a, changed\\n\" });\n+\t\tassert.equal((await avcs(alice, \"push\", \"-m\", \"change a\")).exit, 0);\n+\t\twrite(alice, { \"b.txt\": \"b, changed\\n\" });\n+\t\tassert.equal((await avcs(alice, \"push\", \"-m\", \"change b\")).exit, 0);\n+\t\twrite(alice, { \"a.txt\": \"a, changed again\\n\" });\n+\t\tassert.equal((await avcs(alice, \"push\", \"-m\", \"change a again\")).exit, 0);\n+\t\tconst before = shared(name);\n+\n+\t\tconst shown = await text(bob, \"show\", \"2\", \"--without\", \"1\");\n+\t\tassert.equal(shown.exit, 0, shown.stderr);\n+\t\tassert.match(\n+\t\t\tshown.stdout,\n+\t\t\t/^Version 2 of shared without version 1:\\n {2}version 1 by alice: change a\\nCompared with version 2: 1 file, 1 line added, 1 removed\\.\\nThe files hash to [0-9a-f]{64}; the same ask gives the same hash\\. Shared doesn't change\\./,\n+\t\t);\n+\t\tassert.match(shown.stdout, /-a, changed\\n\\+a\\n/);\n+\t\tassert.equal((await text(bob, \"show\", \"2:a.txt\", \"--without\", \"1\")).stdout, \"a\\n\");\n+\t\tassert.equal((await text(bob, \"show\", \"2:b.txt\", \"--without\", \"1\")).stdout, \"b, changed\\n\");\n+\n+\t\tconst refused = await text(bob, \"show\", \"3\", \"--without\", \"1\");\n+\t\tassert.equal(refused.exit, 2);\n+\t\tassert.equal(\n+\t\t\trefused.stdout,\n+\t\t\t\"Version 3 of shared can't leave out version 1: versions it keeps build on it.\\n  version 3 by alice: change a again\\n    builds on version 1 (a.txt)\\nLeaving those out too works: abso show 3 --without 1,3\\n\",\n+\t\t);\n+\t\tconst out = join(temp(), \"without\");\n+\t\tconst blocked = await avcs(bob, \"export\", out, \"--version\", \"3\", \"--without\", \"1\");\n+\t\tassert.equal(blocked.exit, 2);\n+\t\tassert.deepEqual(blocked.json.suggestion, [1, 3]);\n+\t\tconst exported = await avcs(bob, \"export\", out, \"--version\", \"3\", \"--without\", \"1,3\");\n+\t\tassert.equal(exported.exit, 0, exported.out);\n+\t\tassert.deepEqual(exported.json.without, [1, 3]);\n+\t\tassert.equal(readFileSync(join(out, \"a.txt\"), \"utf8\"), \"a\\n\");\n+\t\tassert.equal(readFileSync(join(out, \"b.txt\"), \"utf8\"), \"b, changed\\n\");\n+\t\tassert.deepEqual(shared(name), before, \"shared doesn't change\");\n+\t\tassert.equal((await text(bob, \"show\", \"3\", \"--without\", \"x\")).exit, 1);\n+\t});\n+\n \tit(\"refuses a push that builds on lines a drop took out, plainly, with exit 2\", async () => {\n \t\tconst { folders } = await project({ \"a.txt\": \"one\\ntwo\\n\" }, \"alice\", \"bob\");\n \t\tconst [alice, bob] = [folders.alice!, folders.bob!];\n@@ -3196,7 +3236,7 @@\n \t\t\t\"Not checked yet. Version 4 is being checked (35 s so far).\",\n \t\t]);\n \t\tassert.deepEqual(ciText({ ...base, checked: { version: 2, result: \"none\" }, running: null }, 3, now), [\n-\t\t\t\"CI couldn't check version 2 (the box failed twice, or abso.json has nothing to run). Versions after 2 aren't checked yet.\",\n+\t\t\t\"CI couldn't check version 2 (the box failed twice, or the pipeline file has nothing to run). Versions after 2 aren't checked yet.\",\n \t\t]);\n \t\tassert.deepEqual(\n \t\t\tciText({ ...base, running: null, red: { version: 1, agent: null, message: null, lastGood: null } }, 1, now),\n@@ -3708,6 +3748,29 @@\n \t\tassert.equal((await avcs(dir, \"push\", \"-m\", \"rep writes\")).exit, 0);\n \t});\n \n+\tit(\"a reader talks: it announces, notes lines and closes notes, but still can't start or push (abso 682)\", async () => {\n+\t\tconst { name, folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n+\t\tconst dir = temp();\n+\t\tconst joined = await main([\"join\", name, \"--agent\", \"rep\", \"--server\", fake.url, \"--reader\"], {\n+\t\t\tcwd: dir,\n+\t\t\tenv: ENV,\n+\t\t\twrite: () => {},\n+\t\t});\n+\t\tassert.equal(joined.exit, 0, joined.stdout + joined.stderr);\n+\t\t// Talking: news to the other agents, and notes on lines, made and closed.\n+\t\tconst said = await avcs(dir, \"announce\", \"reader here\");\n+\t\tassert.equal(said.exit, 0, said.out);\n+\t\tassert.deepEqual(said.json.to, [\"alice\"]);\n+\t\tconst noted = await avcs(dir, \"note\", \"a.txt:1\", \"why this line?\");\n+\t\tassert.equal(noted.exit, 0, noted.out);\n+\t\tassert.equal((await avcs(dir, \"note\", \"--close\", String(noted.json.id), \"--withdrawn\")).exit, 0);\n+\t\t// Code: still refused.\n+\t\tconst started = await main([\"start\", \"reader work\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.match(started.stdout + started.stderr, /agent rep is a reader: it records nothing/);\n+\t\tassert.equal((await main([\"push\", \"-m\", \"x\"], { cwd: dir, env: ENV, write: () => {} })).exit, 1);\n+\t\tassert.equal((await avcs(folders.alice!, \"news\")).json.news.length > 0, true, \"alice heard the reader\");\n+\t});\n+\n \tit(\"reader on is refused while the agent has unpushed work, and changes nothing here\", async () => {\n \t\tconst { folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n \t\twrite(folders.alice!, { \"a.txt\": \"a, unpushed\\n\" });"}],"unmatched":[]}