import { defineConfig } from 'vitest/config'; /** * THE SIXTH INSTANCE OF ONE FAILURE, IN THE FIFTH PACKAGE — AND THE ONE THAT * ARRIVED WHILE THE SENTENCE PREDICTING IT WAS BEING WRITTEN. * * ── WHAT HAPPENED ──────────────────────────────────────────────────────────── * * 2026-11-01, run 6026, job 15130, on `fix/identity-crypto-timeout` — the * branch that bounds `packages/identity`: * * FAIL test/server.test.ts > POST /submit * > accepts a signed submission and reports what was stored * FAIL test/verify.test.ts > checkSubmission — the happy day * > accepts a correctly signed submission for the current week * Error: Test timed out in 5000ms. (both) * * Test Files 2 failed | 4 passed (6) * Tests 2 failed | 68 passed (70) * * Nothing failed an assertion. Both cases call `signedSubmission(keyFor(1))`, * so both do real Ed25519 key generation and signing; the container was * slower than vitest's 5s default. * * G5.50's row, written one commit earlier on this same branch, says: *"seven * packages have no `testTimeout` at all and are red the first time the * container is slow on one of their cases."* That is this, four hours later. * The row deferred the sweep on the grounds that a bound chosen by analogy is * how the engine's 80x claim got written — which is still right, and is why * this file says below exactly which number here is measured and which is * borrowed. * * ── WHAT THE CONTAINER ACTUALLY SHOWED, AND WHAT IT DID NOT ───────────────── * * Read off run 6026's log, 506,073 bytes, rather than inferred: the relay's * OTHER cases were fine in the same container — * * GET /health > publishes the relay week … 860ms * recording a standing > keeps ONE row per participant … 320ms * checkSubmission — the XP ceiling > leaves a submission … 498ms * guardedFetch > turns a hung server into a timeout reason 35ms * * — so this is not a slow suite. It is **two cases that generate and use a * keypair**, which is the same signature the four earlier instances have: * `packages/identity`'s crypto cases, and `packages/engine`'s seeded property * sweeps. Everything else in this package is tens to hundreds of ms. * * **The local baseline was NOT measured, deliberately.** The box was at * **93.1% CPU** with five agents working in parallel worktrees, and §5.7 * rule 3 forbids quoting a timing from a loaded machine — a number taken at * 93% cannot be told apart later from one taken on an idle box, which is the * whole reason that rule exists. So the ratio here is **borrowed from * `packages/identity`'s measured 19x–99x**, and it is borrowed rather than * derived. If a seventh instance lands in this package, measure it properly * before touching this number. * * ── WHY 120 SECONDS ───────────────────────────────────────────────────────── * * The same value as `packages/engine` and `packages/identity`. One timeout in * this repository is easier to defend than five, and **none of them is a * performance guard.** These cases assert that a signature verifies and that a * submission is stored; they say nothing about speed. At 120s the cost of * being generous is that a genuinely hung test takes two minutes to report; * the cost of being tight is a red `main` that says nothing about the product, * six times over. * * **Do not tighten this into a benchmark.** If the relay's signing speed is * ever worth guarding, that wants its own assertion with its own measured * bound and §5.7 rule 3's load beside it — a timeout dressed up as a benchmark * reports "too slow" and "broken" with the same red tick. */ export default defineConfig({ test: { environment: 'node', testTimeout: 120_000 } });