Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3s8z6cbut9 is past its budget: trevato/forge: "migrate: after > (unnamed)" failed on 3 pulls in the last hour — the lane's red, not theirs; they wait … #4474
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4454-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork 2 threads · 2 unresolved
1 file
changed +6
−4
test/migrate-after.test.ts +6 −4
| @@ -5,7 +5,7 @@ | ||
| 5 | 5 | * side; the fake GitHub's request log is the API side. |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | import { afterAll, beforeAll, describe, expect, test } from "bun:test"; | |
| 8 | import { afterAll, beforeAll, describe, expect, setDefaultTimeout, test } from "bun:test"; | |
| 9 | 9 | import { mkdtemp, rm } from "node:fs/promises"; |
| 10 | 10 | import { tmpdir } from "node:os"; |
| 11 | 11 | import { join } from "node:path"; |
| @@ -30,6 +30,8 @@ import { quietLogs } from "./helpers/globals.ts"; | ||
| 30 | 30 | import { promote } from "./helpers/members.ts"; |
| 31 | 31 | |
| 32 | 32 | quietLogs(); |
| 33 | // Git and a fake forge under a loaded check machine outlast bun's 5 s default. | |
| 34 | setDefaultTimeout(30_000); | |
| 33 | 35 | |
| 34 | 36 | describe("migrate: after", () => { |
| 35 | 37 | let dataDir: string; |
| @@ -120,7 +122,7 @@ describe("migrate: after", () => { | ||
| 120 | 122 | app.close(); |
| 121 | 123 | forgetProviders(dataDir); |
| 122 | 124 | await rm(dataDir, { recursive: true, force: true }); |
| 123 | }); | |
| 125 | }, 30_000); | |
| 124 | 126 | |
| 125 | 127 | test("the form's word: anything but archive or mirror leaves it alone", () => { |
| 126 | 128 | expect(afterChoice("archive")).toBe("archive"); |
| @@ -180,7 +182,7 @@ describe("migrate: after", () => { | ||
| 180 | 182 | await commit(alice, "alice", copy, "landed.txt"); |
| 181 | 183 | const mine = await resolveOid(repoDir(app.reposRoot, "alice", copy), "refs/heads/main"); |
| 182 | 184 | expect(mine).not.toBe(before); |
| 183 | for (let i = 0; i < 100; i++) { | |
| 185 | for (let i = 0; i < 600; i++) { | |
This and the loop in settledTarget share the same 600 x 50 ms poll. A small shared helper in test/helpers (poll until ok, with a deadline) would remove the duplication. |
||
| 184 | 186 | const held = getMirrorTarget(app.db, getRepo(app.db, "alice", copy)!.id); |
| 185 | 187 | if (held?.tips["refs/heads/main"] === mine) break; |
| 186 | 188 | await Bun.sleep(50); |
| @@ -197,7 +199,7 @@ describe("migrate: after", () => { | ||
| 197 | 199 | |
| 198 | 200 | /** The copy's mirror target, once `ok` says the push has settled. */ |
| 199 | 201 | const settledTarget = async (copy: string, ok: (t: NonNullable<ReturnType<typeof getMirrorTarget>>) => boolean) => { |
| 200 | for (let i = 0; i < 100; i++) { | |
| 202 | for (let i = 0; i < 600; i++) { | |
| 201 | 203 | const held = getMirrorTarget(app.db, getRepo(app.db, "alice", copy)!.id); |
| 202 | 204 | if (held !== undefined && ok(held)) return held; |
| 203 | 205 | await Bun.sleep(50); |
new above
offline
Fine as a file-wide default. If the hook still goes red, treat it as a leak and look for it, not a bigger number.