{"draft":null,"from":47,"to":48,"files":[{"path":"client/test/client.test.ts","added":34,"removed":0,"diff":"--- a/client/test/client.test.ts\n+++ b/client/test/client.test.ts\n@@ -2187,6 +2187,40 @@\n \t\tassert.equal((await avcs(folders.bob!, \"status\")).json.version, 1, \"shared stayed at version 1\");\n \t});\n \n+\tit(\"--done takes the start note back only once the queued publish lands\", async () => {\n+\t\tconst { folders } = await project(files, \"alice\");\n+\t\tconst noted = async () =>\n+\t\t\t/Starting on:/.test((await main([\"where\"], { cwd: folders.alice!, env: QENV, write: () => {} })).stdout);\n+\t\tassert.equal((await avcs(folders.alice!, \"start\", \"Two\", \"other.txt\")).exit, 0);\n+\t\tfake.queueHold = true;\n+\t\ttry {\n+\t\t\twrite(folders.alice!, { \"other.txt\": \"two\\n\" });\n+\t\t\tconst queued = await publish(folders.alice!, \"-m\", \"two\", \"--no-wait\", \"--done\");\n+\t\t\tassert.equal(queued.exit, 0, queued.stdout + queued.stderr);\n+\t\t\tassert.match(\n+\t\t\t\tqueued.stdout,\n+\t\t\t\t/\\nYour start note stays \\(--done\\): publish 1 hasn't landed yet\\. Once it has, abso start --done takes the note back and abso issue <N> --done closes the issue it names\\.\\n$/,\n+\t\t\t);\n+\t\t\tassert.equal(await noted(), true, \"a queued publish may yet be pulled\");\n+\t\t\tassert.equal((await main([\"unqueue\"], { cwd: folders.alice!, env: QENV, write: () => {} })).exit, 0);\n+\t\t} finally {\n+\t\t\tfake.queueHold = false;\n+\t\t}\n+\t\twrite(folders.alice!, { \"state.txt\": \"bad\\n\" });\n+\t\tconst pulled = await publish(folders.alice!, \"-m\", \"breaks it\", \"--done\");\n+\t\tassert.equal(pulled.exit, 2, pulled.stdout + pulled.stderr);\n+\t\tassert.doesNotMatch(pulled.stdout, /start note/);\n+\t\tassert.equal(await noted(), true, \"a pulled publish leaves the note\");\n+\t\twrite(folders.alice!, { \"state.txt\": \"ok, fixed\\n\" });\n+\t\tconst landed = await publish(folders.alice!, \"-m\", \"fixed\", \"--done\");\n+\t\tassert.equal(landed.exit, 0, landed.stdout + landed.stderr);\n+\t\tassert.match(\n+\t\t\tlanded.stdout,\n+\t\t\t/\\nPublished version 1: it passed the project's check in the merge queue\\.\\nYour start note is taken back \\(--done\\): this work is finished\\.\\n$/,\n+\t\t);\n+\t\tassert.equal(await noted(), false);\n+\t});\n+\n \tit(\"--no-wait and --wait, status shows the queue, unqueue takes it back, and a collision names the queued publish\", async () => {\n \t\tconst { folders } = await project(files, \"alice\", \"bob\");\n \t\tfake.queueHold = true;"}],"unmatched":[]}