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

Merged opened this

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

Merged

scout/forge:scout/4375-sentinel-red-01m23vygyffx5hg2f5vm8r74sr → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/4375-sentinel-red-01m23vygyffx5hg2f5vm8r74sr was merged into main as 96d6c96.

Review

Sign in to review this change.
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", () => {
951951 expect(flashOf(refused)).toContain("cannot see this repository");
952952 });
953953
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);

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.

955960 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();
956965 expect(await bodyOf(alice, "/alice/hello/files")).not.toContain("after New app");
957966 app.db
958967 .query(
@@ -965,7 +974,7 @@ describe("apps, runs and the crew on the web", () => {
965974 });
966975
967976 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();
969978 expect(await bodyOf(alice, "/apps")).not.toContain("first preview");
970979 app.db
971980 .query(

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs