Unify trunk on main: initialization → main #3

Merged
jschoubben merged 95 commits from initialization into main 2026-09-05 01:13:46 +00:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit 3c9b5a848b - Show all commits
+6 -1
View File
@@ -103,12 +103,17 @@ export function record(
failed: number,
ran: string[],
env = process.env,
builtAgainst?: Against,
): Receipt {
const receipt: Receipt = {
at: new Date().toISOString(),
passed,
failed,
against: whatWasTested(env),
// What was BUILT, when the caller says — not what the repositories are at when the run ends.
// A receipt read at record time names whatever was committed during the twenty minutes the
// suite took, and it did: one run's receipt claimed a commit that landed mid-run and was
// never in the binaries. A verdict is only worth something attributed to one exact state.
against: builtAgainst ?? whatWasTested(env),
ran,
};
const path = receiptPath();
+5 -2
View File
@@ -10,7 +10,7 @@
*/
import { spawn } from "node:child_process";
import { endToEnd, record } from "./lastrun.ts";
import { endToEnd, record, whatWasTested } from "./lastrun.ts";
import { rebuild } from "./rebuild.ts";
/** counted is what the runner said, or nulls when it said nothing recognisable. */
@@ -43,6 +43,9 @@ export async function runSuite(args: string[]): Promise<number> {
const built = rebuild();
if (built.length > 0) console.log(`built: ${built.join(", ")}\n`);
}
// Read now, while it is true. The receipt names these, and reading them when the run ends
// names whatever was committed during the twenty minutes in between instead.
const against = whatWasTested(process.env);
// **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
@@ -55,7 +58,7 @@ export async function runSuite(args: string[]): Promise<number> {
// 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)));
console.log("\n" + reportOn(counted(seen), (p, f) => record(p, f, files, process.env, against)));
return code;
}