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

Merged opened this

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

Merged

scout/forge:scout/4454-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork 2 threads · 2 unresolved

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

Review

Sign in to review this change.
1 file changed +6 −4
test/migrate-after.test.ts +6 −4
@@ -5,7 +5,7 @@
55 * side; the fake GitHub's request log is the API side.
66 */
77
8 import { afterAll, beforeAll, describe, expect, test } from "bun:test";
8 import { afterAll, beforeAll, describe, expect, setDefaultTimeout, test } from "bun:test";
99 import { mkdtemp, rm } from "node:fs/promises";
1010 import { tmpdir } from "node:os";
1111 import { join } from "node:path";
@@ -30,6 +30,8 @@ import { quietLogs } from "./helpers/globals.ts";
3030 import { promote } from "./helpers/members.ts";
3131
3232 quietLogs();
33 // Git and a fake forge under a loaded check machine outlast bun's 5 s default.
34 setDefaultTimeout(30_000);

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.

3335
3436 describe("migrate: after", () => {
3537 let dataDir: string;
@@ -120,7 +122,7 @@ describe("migrate: after", () => {
120122 app.close();
121123 forgetProviders(dataDir);
122124 await rm(dataDir, { recursive: true, force: true });
123 });
125 }, 30_000);
124126
125127 test("the form's word: anything but archive or mirror leaves it alone", () => {
126128 expect(afterChoice("archive")).toBe("archive");
@@ -180,7 +182,7 @@ describe("migrate: after", () => {
180182 await commit(alice, "alice", copy, "landed.txt");
181183 const mine = await resolveOid(repoDir(app.reposRoot, "alice", copy), "refs/heads/main");
182184 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.

184186 const held = getMirrorTarget(app.db, getRepo(app.db, "alice", copy)!.id);
185187 if (held?.tips["refs/heads/main"] === mine) break;
186188 await Bun.sleep(50);
@@ -197,7 +199,7 @@ describe("migrate: after", () => {
197199
198200 /** The copy's mirror target, once `ok` says the push has settled. */
199201 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++) {
201203 const held = getMirrorTarget(app.db, getRepo(app.db, "alice", copy)!.id);
202204 if (held !== undefined && ok(held)) return held;
203205 await Bun.sleep(50);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs