{"draft":null,"from":2,"to":318,"files":[{"path":"worker/project/test/queue-driver.test.ts","added":26,"removed":9,"diff":"--- a/worker/project/test/queue-driver.test.ts\n+++ b/worker/project/test/queue-driver.test.ts\n@@ -51,7 +51,7 @@\n \tassert.equal(c.runs.length, 0);\n });\n \n-test(\"a passing batch lands whole, each publish its own version, in one check\", async () => {\n+test(\"a passing batch lands whole, each push its own version, in one check\", async () => {\n \tconst project = setup();\n \tfor (const a of AGENTS.slice(0, 3)) queue(project, a, \"1\");\n \tconst c = checker();\n@@ -69,18 +69,35 @@\n \tassert.deepEqual(project.queueChecking(0), []);\n });\n \n-test(\"a batch is capped; the rest waits for the next round\", async () => {\n+test(\"a batch is everything waiting, with no cap (Christopher, Oct 14): ten land on one check\", async () => {\n \tconst project = setup();\n \tfor (const a of AGENTS) queue(project, a, \"1\");\n-\tconst r = await queueRound(project, checker(), { cap: 8 });\n-\tassert.equal(r.kind === \"landed\" && r.versions.length, 8);\n+\tconst c = checker();\n+\tconst r = await queueRound(project, c);\n+\tassert.equal(r.kind === \"landed\" && r.versions.length, AGENTS.length);\n \tassert.deepEqual(\n+\t\tc.runs.map((x) => x.ids.length),\n+\t\t[AGENTS.length],\n+\t);\n+\tassert.deepEqual(project.queue().items, []);\n+});\n+\n+test(\"a failing batch past the old cap of 8 still halves to the push that fails, and the rest waits\", async () => {\n+\tconst project = setup();\n+\tfor (const [i, a] of AGENTS.entries()) queue(project, a, i === 8 ? '\"BAD\"' : \"1\");\n+\tconst c = checker();\n+\tconst r = await queueRound(project, c);\n+\tassert.equal(c.runs[0]!.ids.length, AGENTS.length, \"the first check is the whole queue\");\n+\tassert.ok(r.kind === \"pulled\");\n+\tassert.deepEqual(r.pulled, [9]);\n+\tassert.equal(r.versions.length, 8, \"the eight before it land\");\n+\tassert.deepEqual(\n \t\tproject.queue().items.map((q) => q.id),\n-\t\t[9, 10],\n+\t\t[10],\n \t);\n });\n \n-test(\"a failing batch is halved to the first publish that fails; the prefix before it lands, the rest waits\", async () => {\n+test(\"a failing batch is halved to the first push that fails; the prefix before it lands, the rest waits\", async () => {\n \tconst project = setup();\n \tfor (const [i, a] of AGENTS.slice(0, 8).entries()) queue(project, a, i === 5 ? '\"BAD\"' : \"1\");\n \tconst c = checker();\n@@ -113,7 +130,7 @@\n \t});\n });\n \n-test(\"a lone failing publish is pulled after failing twice\", async () => {\n+test(\"a lone failing push is turned back after failing twice\", async () => {\n \tconst project = setup();\n \tqueue(project, \"b1\", '\"BAD\"');\n \tconst c = checker();\n@@ -153,7 +170,7 @@\n \t);\n });\n \n-test(\"while shared is red, prefixes grow one publish at a time; the first that passes lands, nobody is pulled\", async () => {\n+test(\"while shared is red, prefixes grow one push at a time; the first that passes lands, nobody is turned back\", async () => {\n \tconst project = setup();\n \tqueue(project, \"b1\", \"1\");\n \tqueue(project, \"b2\", \"2\");\n@@ -189,6 +206,6 @@\n \tassert.deepEqual(\n \t\tproject.queue().items.map((q) => q.id),\n \t\t[1, 2],\n-\t\t\"nobody pulled\",\n+\t\t\"nobody turned back\",\n \t);\n });"}],"unmatched":[]}