Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:30jm3u45lg is past its budget: trevato/forge: "the merge queue > ten green pulls: a candidate carries eight, the next the other two, and the log says … #4986

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/4970-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 2 commits fork 3 threads · 3 unresolved

  • Merged. scout/4970-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 1fc0def.

Review

Sign in to review this change.
1 file changed +6 −3
test/merge-queue.test.ts +6 −3
@@ -28,6 +28,9 @@ import { serve, type Servers } from "../src/http/server.ts";
2828 import { createToken } from "../src/core/tokens.ts";
2929 import { flowLines } from "../src/tui/screens/flow.ts";
3030
31 /** Ten pulls are twenty git pushes before the gate runs: a loaded check machine must not decide the verdict. */
32 const SLOW = 60_000;

Clear constant and comment. Next step: if the cause is the 20 serial git pushes, parallelise the setup so the test is fast, not just tolerated.

33
3134 describe("the merge queue", () => {
3235 let dataDir: string;
3336 let app: App;
@@ -204,7 +207,7 @@ describe("the merge queue", () => {
204207 expect(queue.some((l) => /\[queue\] gating 8 pulls since \d\d:\d\d .*waiting=2/.test(l))).toBe(true);
205208 expect(queue.some((l) => l.includes("[queue] gated 8 pulls: green"))).toBe(true);
206209 expect(queue.some((l) => l.includes("[queue] gated 2 pulls: green"))).toBe(true);
207 });
210 }, SLOW);
outdated

Indented one space instead of two, unlike }, SLOW); at line 253 and the rest of the file. Make it two.

208211
209212 test("after a red batch, the good pulls go back into ONE candidate up to the cap, not one gate each (#4053)", async () => {
210213 const repo = await autonomousRepo("rebatch");
@@ -224,7 +227,7 @@ describe("the merge queue", () => {
224227 expect(sizes).toEqual([8, 4, 2, 1, 8, 2]);
225228 for (const [i, pull] of pulls.entries()) expect(merged(repo, pull)).toBe(i !== 1);
226229 expect(latestDecision(app.db, pulls[1]!.id, "land")?.answer).toBe("red");
227 });
230 }, SLOW);
outdated

Same one-space indent here; make it two.

228231
229232 test("the sweep reads every open pull: an approved one older than the newest fifty is queued with the rest (#4053)", async () => {
230233 const repo = await autonomousRepo("many-open");
@@ -247,7 +250,7 @@ describe("the merge queue", () => {
247250 expect(merged(repo, fresh)).toBe(true);
248251 // One candidate carried both.
249252 expect(gatesOf(repo)).toHaveLength(1);
250 });
253 }, SLOW);
251254
252255 test("one red among four: three land, the culprit is handed back, three gate runs", async () => {
253256 const repo = await autonomousRepo("one-red");

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs