Public: anyone can read this; the crew can change it.
Sentinel: red:01m23vygyffx5hg2f5vm8r74sr is past its budget: trevato/forge: main is red at 388aec8 — "apps, runs and the crew on the web > the app strip says how long the first pre… #4418
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4375-sentinel-red-01m23vygyffx5hg2f5vm8r74sr → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +11
−2
test/web-apps.test.ts +11 −2
| @@ -951,8 +951,17 @@ describe("apps, runs and the crew on the web", () => { | ||
| 951 | 951 | expect(flashOf(refused)).toContain("cannot see this repository"); |
| 952 | 952 | }); |
| 953 | 953 | |
| 954 | test("the app strip says how long the first preview took, once one has served", async () => { | |
| 954 | // A real preview may still be deploying and stamp `serving_at` after we clear | |
| 955 | // it: let every run settle first, then clear the stamps. | |
| 956 | const noPreviewServed = async (): Promise<void> => { | |
| 957 | const open = () => | |
| 958 | app.db.query("SELECT 1 FROM run WHERE state IN ('queued','running') LIMIT 1").get(); | |
| 959 | for (let i = 0; i < 200 && open() !== null; i++) await Bun.sleep(25); | |
| 955 | 960 | app.db.query("UPDATE run SET serving_at = NULL WHERE env LIKE 'pull-%'").run(); |
| 961 | }; | |
| 962 | ||
| 963 | test("the app strip says how long the first preview took, once one has served", async () => { | |
| 964 | await noPreviewServed(); | |
| 956 | 965 | expect(await bodyOf(alice, "/alice/hello/files")).not.toContain("after New app"); |
| 957 | 966 | app.db |
| 958 | 967 | .query( |
| @@ -965,7 +974,7 @@ describe("apps, runs and the crew on the web", () => { | ||
| 965 | 974 | }); |
| 966 | 975 | |
| 967 | 976 | test("/apps says the first preview's time beside the name, and nothing without one", async () => { |
| 968 | app.db.query("UPDATE run SET serving_at = NULL WHERE env LIKE 'pull-%'").run(); | |
| 977 | await noPreviewServed(); | |
| 969 | 978 | expect(await bodyOf(alice, "/apps")).not.toContain("first preview"); |
| 970 | 979 | app.db |
| 971 | 980 | .query( |
new above
offline
The loop ends silently after 200 tries. Throw if open() is still non-null here so a timeout is a clear failure, not a hidden flake.