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

Full suite red: test/timers-named.test.ts #11990

Merged opened this in answer to

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

Merged

scout/forge:scout/11984-full-suite-red-test-timers-named-test-ts → main 3 commits fork

  • Merged. scout/11984-full-suite-red-test-timers-named-test-ts was merged into main as adfce14.

Review

Sign in to review this change.
3 files changed +7 −3
src/runs/log.ts +2 −1
@@ -20,6 +20,7 @@ import {
2020 closeSync,
2121 } from "node:fs";
2222 import { join } from "node:path";
23 import { during } from "../perf/jobs.ts";
2324 import { redactHeld } from "../kernel/log.ts";
2425 import { noteActivity } from "./activity.ts";
2526
@@ -146,7 +147,7 @@ function enqueue(dataDir: string, runId: string, clean: string): void {
146147 pendingBytes += clean.length + 1;
147148 if (pendingBytes >= FLUSH_BYTES) flushRunLogs();
148149 else if (flushTimer === undefined) {
149 flushTimer = setTimeout(flushRunLogs, FLUSH_MS);
150 flushTimer = setTimeout(() => void during("run-log-flush", flushRunLogs), FLUSH_MS);
150151 flushTimer.unref?.();
151152 }
152153 }
src/spawn/stopped.ts +3 −2
@@ -4,6 +4,7 @@
44 * backoff and its pages say so instead of "the forge is full".
55 */
66 import type { App } from "../app.ts";
7 import { during } from "../perf/jobs.ts";
78
89 export type Stop = { name: string; at: number; why: string; stops: number };
910
@@ -51,7 +52,7 @@ export function noteStop(parent: App, bodyId: string, name: string, why: string,
5152 s.stops.set(bodyId, stop);
5253 const was = s.timers.get(bodyId);
5354 if (was !== undefined) clearTimeout(was);
54 const timer = setTimeout(() => {
55 const timer = setTimeout(() => void during("spawn-restart", () => {
5556 s.timers.delete(bodyId);
5657 const restart = s.restart;
5758 if (restart === undefined) return clearStop(parent, bodyId);
@@ -59,7 +60,7 @@ export function noteStop(parent: App, bodyId: string, name: string, why: string,
5960 (coming) => coming || clearStop(parent, bodyId),
6061 () => clearStop(parent, bodyId),
6162 );
62 }, waitMs ?? backoffMs(stop.stops));
63 }), waitMs ?? backoffMs(stop.stops));
6364 timer.unref?.();
6465 s.timers.set(bodyId, timer);
6566 return stop;
test/job-slices.test.ts +2
@@ -241,6 +241,8 @@ const UNTIMED: Record<string, string> = {
241241 probes: "probes each app over HTTP after a deploy and nightly; the fixture has no apps",
242242 prompts: "a closure in startPromptRoutine; the fixture has no prompt routines",
243243 timers: "fires due app timers over HTTP to the apps; the fixture has no apps",
244 "run-log-flush": "a one-shot timer in runs/log.ts that appends buffered lines to the run log files: I/O, no fixture runs",
245 "spawn-restart": "a one-shot backoff timer in spawn/stopped.ts that restarts a stopped spawn; the fixture has no spawns",
244246 "estimates-due": "settles due 'done' estimates every five minutes from one indexed query on open estimates; the fixture records none",
245247 snapshot: "copies the database file to disk (VACUUM INTO): I/O off the loop, nightly",
246248 "snapshot-mirror": "uploads a snapshot to the mirror: network, nightly",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs