From 2b3a30619b89b56239dadfb7cea038deb2ef9611 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 1 Sep 2026 21:07:07 +0200 Subject: [PATCH] Stop raising a second scenario to test the first three tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The canary walked one path on one machine — a mesh comes up, a module lands, a consumer gets a credential — and stopped the run if it broke. That path is exactly what the first three tests of the long run walk, and the long run finishes them about 160 seconds in. So the gate cost a whole scenario on every passing run to save roughly 45 seconds on a failing one. A scenario is three machines, one of them a registry that boots a kernel in order to serve files, which is where the two minutes went. The test file stays and still runs when it is named. What is gone is raising it on the way to everything else. Measured rather than argued: the canary's scenario took 116s of which 60s was standing up a registry, and the run reached the same assertions without it. --- src/lastrun.ts | 9 --------- src/suite.ts | 27 +++++++++------------------ 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/lastrun.ts b/src/lastrun.ts index 48f3893..9d76fe4 100644 --- a/src/lastrun.ts +++ b/src/lastrun.ts @@ -50,15 +50,6 @@ export interface Receipt { */ export const endToEnd = "test/integration/mesh.test.ts"; -/** - * canary is the short run that goes first. - * - * One machine, three images, one path walked end to end. **A suite that takes forty minutes is a - * suite you hear from once a day** — and every fault found on 2026-09-01 would have shown up in - * the first three minutes of it. Running this first means a broken change costs minutes. - */ -export const canary = "test/integration/canary.test.ts"; - /** Where the receipt lives: XDG state, which is for exactly this — data a tool keeps between runs. */ export function receiptPath(): string { const state = process.env["XDG_STATE_HOME"] ?? join(homedir(), ".local", "state"); diff --git a/src/suite.ts b/src/suite.ts index 96fdafa..7eb57fc 100644 --- a/src/suite.ts +++ b/src/suite.ts @@ -10,7 +10,7 @@ */ import { spawn } from "node:child_process"; -import { canary, endToEnd, record } from "./lastrun.ts"; +import { endToEnd, record } from "./lastrun.ts"; import { rebuild } from "./rebuild.ts"; /** counted is what the runner said, or nulls when it said nothing recognisable. */ @@ -44,24 +44,15 @@ export async function runSuite(args: string[]): Promise { if (built.length > 0) console.log(`built: ${built.join(", ")}\n`); } - // **The canary first, and stop if it dies.** It walks one path on one machine: a mesh comes up, - // a module lands, a consumer gets a credential it can use. Everything that broke on - // 2026-09-01 broke on that path, and finding out took forty minutes each time because the long - // run had to reach it. + // **No canary.** There was one: a second scenario, one machine, raised first so a broken mesh + // failed in two minutes rather than in forty. It walked exactly the path the first three tests + // of the long run walk — a mesh comes up, a module lands, a consumer gets a credential — and + // the long run reaches the end of that path in about 160 seconds. // - // Skipped when the caller named its own files — they asked for something specific — and when - // the canary is itself what was asked for. - if (ran.length === 0) { - const first = await runFiles([canary]); - if (first.code !== 0) { - console.log( - `\nthe canary failed, so the rest was not run. It is one machine and one path: a mesh ` + - `comes up, a module lands, a consumer gets a credential. Fix that first — the long ` + - `suite would fail on the same thing forty minutes later.`); - return first.code; - } - console.log(""); - } + // So it cost a whole scenario, every passing run, to save about 45 seconds on a failing one. + // A scenario is three machines including a registry that boots a kernel to serve files, which + // is where the two minutes went. `test/integration/canary.test.ts` is still there and still + // runs when it is named; it is no longer raised on the way to everything else. const { code, seen } = await runFiles(files); console.log("\n" + reportOn(counted(seen), (p, f) => record(p, f, files)));