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

"boot: a forge addressed by IP hands every app a host that works > the scaffolded app deploys and answers" passes every time on a loaded check machine #5481

Merged opened this

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

Merged

scout/forge:scout/5447-boot-a-forge-addressed-by-ip-hands-every → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/5447-boot-a-forge-addressed-by-ip-hands-every was merged into main as 1ccb4d0.

Review

Sign in to review this change.
1 file changed +12 −3
test/apps-adversarial.test.ts +12 −3
@@ -1044,6 +1044,7 @@ describe("boot: a forge addressed by IP hands every app a host that works (issue
10441044 repoId: string,
10451045 where: (run: Run) => boolean,
10461046 timeoutMs = 60_000,
1047 live = false,
10471048 ): Promise<Run> {
10481049 const deadline = Date.now() + timeoutMs;
10491050 while (Date.now() < deadline) {
@@ -1052,7 +1053,8 @@ describe("boot: a forge addressed by IP hands every app a host that works (issue
10521053 );
10531054 if (
10541055 run &&
1055 (run.state === "ok" ||
1056 ((live && run.servingAt !== null) ||
1057 run.state === "ok" ||
10561058 run.state === "failed" ||
10571059 run.state === "cancelled")
10581060 )
@@ -1114,10 +1116,15 @@ describe("boot: a forge addressed by IP hands every app a host that works (issue
11141116 if (!made.ok) return;
11151117 const repo = made.value.repo;
11161118 const record = made.value.app;
1117 const run = await settled(repo.id, (r) => r.env === "production");
1119 // The deploy reports live the moment the app has answered its health
1120 // path and been swapped in — the state the page below is asked in. The
1121 // run itself only ends after the scaffold's whole test suite, which on a
1122 // loaded machine is far slower than the app's boot; it is awaited after.
1123 const live = await settled(repo.id, (r) => r.env === "production", 60_000, true);
11181124 // Before this fix: "start: exited with code 1 before answering" — the
11191125 // scaffold's own src/env.ts throwing on `new URL(FORGE_APP_URL)`.
1120 expect(run.state).toBe("ok");
1126 expect(live.summary).not.toContain("exited with code");
1127 expect(live.servingAt).not.toBeNull();
11211128 const url = runtime.urlFor(record, "production");
11221129 // The exact check the scaffold makes at import time on FORGE_APP_URL.
11231130 expect(() => new URL(url)).not.toThrow();
@@ -1125,6 +1132,8 @@ describe("boot: a forge addressed by IP hands every app a host that works (issue
11251132 const page = await viaHost(host);
11261133 expect(page.status).toBe(200);
11271134 expect(await page.text()).toContain("<h1>ip-forge</h1>");
1135 const run = await settled(repo.id, (r) => r.id === live.id, 30_000);
1136 expect(run.state).toBe("ok");

This 30s wait comes after a wait of up to 60s, inside a 90s test timeout. Budget the waits so they sum below the timeout, so the failure names the step that hung.

11281137 }, 90_000);
11291138 });
11301139

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs