{"draft":null,"from":116,"to":318,"files":[{"path":"worker/project/test/queue-driver.test.ts","added":21,"removed":4,"diff":"--- a/worker/project/test/queue-driver.test.ts\n+++ b/worker/project/test/queue-driver.test.ts\n@@ -69,14 +69,31 @@\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 "}],"unmatched":[]}