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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5129-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork
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 | ||
| 24 | 24 | import { listComments } from "../src/core/issues.ts"; |
| 25 | 25 | import { readQueues } from "../src/flow/queue.ts"; |
| 26 | 26 | import { repoDir } from "../src/git/repos.ts"; |
| 27 | import { logLevel, setLogLevel } from "../src/kernel/log.ts"; | |
| 27 | 28 | import { serve, type Servers } from "../src/http/server.ts"; |
| 28 | 29 | import { createToken } from "../src/core/tokens.ts"; |
| 29 | 30 | import { flowLines } from "../src/tui/screens/flow.ts"; |
| @@ -193,11 +194,15 @@ describe("the merge queue", () => { | ||
| 193 | 194 | for (let i = 0; i < 10; i++) pulls.push(await greenPull(repo, `p${i}.ts`)); |
| 194 | 195 | const said: string[] = []; |
| 195 | 196 | 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"); | |
| 196 | 200 | console.info = (line: string) => said.push(line); |
| 197 | 201 | try { |
| 198 | 202 | expect(await sweepGreen(app, repo)).toBe(10); |
| 199 | 203 | } finally { |
| 200 | 204 | console.info = info; |
| 205 | setLogLevel(floor); | |
| 201 | 206 | } |
| 202 | 207 | expect(MAX_CANDIDATE).toBe(8); |
| 203 | 208 | expect(gatesOf(repo)).toHaveLength(2); |
| @@ -215,11 +220,15 @@ describe("the merge queue", () => { | ||
| 215 | 220 | for (let i = 0; i < 12; i++) pulls.push(await greenPull(repo, i === 1 ? "red-b.ts" : `q${i}.ts`)); |
| 216 | 221 | const said: string[] = []; |
| 217 | 222 | 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"); | |
| 218 | 226 | console.info = (line: string) => said.push(line); |
| 219 | 227 | try { |
| 220 | 228 | expect(await sweepGreen(app, repo)).toBe(11); |
| 221 | 229 | } finally { |
| 222 | 230 | console.info = info; |
| 231 | setLogLevel(floor); | |
| 223 | 232 | } |
| 224 | 233 | const sizes = said.flatMap((l) => /\[queue\] gating (\d+) pulls? since/.exec(l)?.[1] ?? []).map(Number); |
| 225 | 234 | // The eight are red; halving finds the culprit (4, 2, 1); then the six |
new above
offline