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 … #5139

Merged opened this

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

Merged

scout/forge:scout/5129-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork

  • Merged. scout/5129-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 71094f3.

Review

Sign in to review this change.
1 file changed +9 −0
test/merge-queue.test.ts +9
@@ -24,6 +24,7 @@ import { landIfGreen, REGATE_RED_MS, regateDue, sweepGreen } from "../src/crew/a
2424 import { listComments } from "../src/core/issues.ts";
2525 import { readQueues } from "../src/flow/queue.ts";
2626 import { repoDir } from "../src/git/repos.ts";
27 import { logLevel, setLogLevel } from "../src/kernel/log.ts";
2728 import { serve, type Servers } from "../src/http/server.ts";
2829 import { createToken } from "../src/core/tokens.ts";
2930 import { flowLines } from "../src/tui/screens/flow.ts";
@@ -193,11 +194,15 @@ describe("the merge queue", () => {
193194 for (let i = 0; i < 10; i++) pulls.push(await greenPull(repo, `p${i}.ts`));
194195 const said: string[] = [];
195196 const info = console.info;
197 // The log floor is process-wide: the verdict must not hang on what ran before.
198 const floor = logLevel();
199 setLogLevel("info");
196200 console.info = (line: string) => said.push(line);
197201 try {
198202 expect(await sweepGreen(app, repo)).toBe(10);
199203 } finally {
200204 console.info = info;
205 setLogLevel(floor);
201206 }
202207 expect(MAX_CANDIDATE).toBe(8);
203208 expect(gatesOf(repo)).toHaveLength(2);
@@ -215,11 +220,15 @@ describe("the merge queue", () => {
215220 for (let i = 0; i < 12; i++) pulls.push(await greenPull(repo, i === 1 ? "red-b.ts" : `q${i}.ts`));
216221 const said: string[] = [];
217222 const info = console.info;
223 // The log floor is process-wide: the verdict must not hang on what ran before.
224 const floor = logLevel();
225 setLogLevel("info");
218226 console.info = (line: string) => said.push(line);
219227 try {
220228 expect(await sweepGreen(app, repo)).toBe(11);
221229 } finally {
222230 console.info = info;
231 setLogLevel(floor);
223232 }
224233 const sizes = said.flatMap((l) => /\[queue\] gating (\d+) pulls? since/.exec(l)?.[1] ?? []).map(Number);
225234 // The eight are red; halving finds the culprit (4, 2, 1); then the six

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs