Public: anyone can read this; the crew can change it.
Main's check failed at 7:37-7:38 AM and nothing has gone green since #16548
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/16547-main-s-check-failed-at-7-37-7-38-am-and → main 0 commits fork 1 thread · 1 unresolved
2 files
changed +9
−5
src/web/render/torrent.ts +1 −1
| @@ -243,7 +243,7 @@ export function torrent(input: RenderInput): Rendered { | ||
| 243 | 243 | const content = [ |
| 244 | 244 | `<dl class="status-rows" aria-label="Torrent">${dl}</dl>`, |
| 245 | 245 | t.trackers.length === 0 |
| 246 | ? `<p class="muted small">No trackers are named.</p>` | |
| 246 | ? `<p class="muted small">This torrent names no trackers.</p>` | |
| 247 | 247 | : `<div class="csv-scroll"><table class="table" data-dense aria-label="Trackers"><thead><tr><th>Tracker</th></tr></thead><tbody>${trackers}</tbody></table></div>`, |
| 248 | 248 | `<div class="csv-scroll"><table class="table" data-dense aria-label="Files"><thead><tr><th>File</th><th class="num">Size</th></tr></thead><tbody>${rows}</tbody></table></div>`, |
| 249 | 249 | ...notes.map((n) => `<p class="muted small">${escapeHtml(n)}</p>`), |
test/ship-time.test.ts +8 −4
| @@ -17,11 +17,15 @@ import { serve } from "../src/http/server.ts"; | ||
| 17 | 17 | import { histogramSvg, shipSection } from "../src/web/pages/home_ship.ts"; |
| 18 | 18 | |
| 19 | 19 | const NOW = new Date("2026-11-20T12:00:00.000Z"); |
| 20 | const at = (minutesAgo: number) => new Date(NOW.getTime() - minutesAgo * 60_000).toISOString(); | |
| 20 | // The two cache tests read the real clock, so they seed relative to it; a fixed date ages out of | |
| 21 | // the 7-day window. | |
| 22 | let base = NOW; | |
| 23 | const at = (minutesAgo: number) => new Date(base.getTime() - minutesAgo * 60_000).toISOString(); | |
| 21 | 24 | const roots: string[] = []; |
| 22 | 25 | afterAll(() => roots.forEach((r) => rmSync(r, { recursive: true, force: true }))); |
| 23 | 26 | |
| 24 | async function seed() { | |
| 27 | async function seed(from: Date = NOW) { | |
| 28 | base = from; | |
| 25 | 29 | const root = mkdtempSync(join(tmpdir(), "forge-ship-")); |
| 26 | 30 | roots.push(root); |
| 27 | 31 | const app = createApp({ dataDir: root, port: 0 }); |
| @@ -182,7 +186,7 @@ describe("the slowest tenth, and what its time went to", () => { | ||
| 182 | 186 | |
| 183 | 187 | describe("one source, three doors", () => { |
| 184 | 188 | test("the API and the kept reading say what the function says; only an admin reads it", async () => { |
| 185 | const s = await seed(); | |
| 189 | const s = await seed(new Date()); | |
| 186 | 190 | s.shipped(40, 5); |
| 187 | 191 | const servers = await serve(s.app); |
| 188 | 192 | try { |
| @@ -202,7 +206,7 @@ describe("one source, three doors", () => { | ||
| 202 | 206 | }); |
| 203 | 207 | |
| 204 | 208 | test("the kept reading is reused for a minute and read again after", async () => { |
| 205 | const s = await seed(); | |
| 209 | const s = await seed(new Date()); | |
| 206 | 210 | s.shipped(40, 5); |
| 207 | 211 | const first = cachedShipTime(s.app.db, new Date()); |
| 208 | 212 | s.shipped(50, 5); |
new above
offline
Next: this shared mutable
basecouples every test to whichever seed ran last. Returnatfromseed()instead.