Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: stop the Wordplay suite's inner waitFor from consuming the whole test timeout

[._.]/ Adam Eivyfbf29f467a8d
diff --git a/.changelog/v2.37.0.md b/.changelog/v2.37.0.md
index c8647eda29..b2161028f7 100644
--- a/.changelog/v2.37.0.md
+++ b/.changelog/v2.37.0.md
@@ -102,6 +102,7 @@ Released: 2026-08-03
- **`@eslint/js` was a full major behind the ESLint it configures, and catching up surfaced eight dead stores.** The client runs `eslint` 10.8.0 but pinned `@eslint/js` — the package that supplies `js.configs.recommended` — at 9.39.4, whose peer range is `eslint@^9`. The lint run worked, so nothing complained, but the config presets being applied were the v9 set: ESLint 10 promoted `no-useless-assignment` into `recommended`, and PortOS had been running without it. Bumping to 10.0.1 turned on that rule and it found eight real dead stores, each a value written and then overwritten on every path that reaches a read: five `let x = <default>` initializers where both branches assign (a timezone validity flag, a keyboard-scrub target, a parsed session snapshot, a drag span's end, two fetch-result flags), one overflow cluster that is only ever read inside the branch that builds it, and one in the MIDI parser that advances `pos` immediately before `break`ing out of a loop after which `pos` is never read. None changed behavior; all eight are now gone rather than silenced. `@vitejs/plugin-react` (6.0.5) and `@eslint-react/eslint-plugin` (5.18.1) took their patches in the same pass.
- **Dependency audit: clean, and the two deferred override majors were re-checked rather than re-deferred.** `npm audit` reports zero vulnerabilities across all four manifests (root, `server`, `client`, `autofixer`) — the React Router advisory that drove the v8 migration was the last one outstanding. Every other direct dependency is already at its latest published version. The two overrides held back last pass stay held back for a reason that is now recorded instead of re-derived: pm2 declares `js-yaml` at the *exact* version `4.3.0`, so forcing the 5.x major overrides an exact pin rather than a range, and `onnxruntime-web` (via `kokoro-js`) declares `protobufjs@^7.2.4`, which 8.x is outside of by definition. `typescript` 7.0.2 is likewise blocked upstream, not by choice: it exists in this repo only as a peer for `@typescript-eslint`, whose current 8.65.0 declares `typescript >=4.8.4 <6.1.0` — the 6.0.3 pin is already at that ceiling, and 7 becomes available when typescript-eslint ships support for it. `node-pty` stays on `1.2.0-beta.14`, which is ahead of the 1.1.0 stable, not behind it.
- **Two `overrides` were forcing majors onto transitive consumers for no security benefit — the exact thing the previous pass refused to do to `js-yaml` and `protobufjs`.** Every direct dependency is already current and `npm audit` is still clean across all four manifests, so this pass audited the pinned `overrides` blocks themselves rather than the versions above them. Resolving each manifest twice — once as written, once with `overrides` deleted — and diffing the trees sorts all 39 entries into three groups. Two were actively harmful. `picomatch` was pinned to 4.0.5 against consumers that declared `^2.0.4` and `^2.2.1` — `anymatch` and `readdirp`, reached through pm2's `chokidar@3` file watcher — so pm2's watch globbing was running against a picomatch two majors past the one those packages were written for. `basic-ftp` was pinned to 6.2.0 against `get-uri@6`'s declared `^5.0.2`, in the FTP branch of pm2's PAC proxy agent. Neither pin is load-bearing: deleting each one individually and re-resolving leaves `npm audit` at zero, so no advisory required them and the only thing they bought was silent-breakage risk of the kind that surfaces at runtime instead of at install time. Both are gone, and the lockfile diff is exactly the correction — `basic-ftp` back to 5.3.1 under `get-uri`, `picomatch` 2.3.2 nested under `anymatch` and `readdirp` while vite and vitest keep the 4.0.5 they actually ask for. Ten more entries named packages that were not in the tree they were declared in at all — seven of the root manifest's fourteen, which had been copy-pasted from `server` even though root's only dependency is pm2, plus `brace-expansion`/`systeminformation` in `server` and `js-yaml` in `client`. Removing those produced zero lockfile churn, which is the proof they were inert; the root block now describes pm2's actual tree. The remaining pins all have real consumers and all sit inside the ranges those consumers declared, with two deliberate exceptions kept as-is: `sharp` and `three` are force-deduped across the whole tree because a second copy of a native binary or of three.js is itself the bug.
+- **A Wordplay test suite could spend its whole budget waiting and then blame the wrong line.** Its drill-generation waits were bounded at five seconds — exactly the per-test timeout — so an inner wait was allowed to consume the entire test, and the checks that came after it had nothing left to run in. The premature-submit test has eight awaited transitions after that wait and duly failed on CI at 5,011ms, reporting only "Test timed out" against the test's opening line rather than the step that actually stalled. The per-test budget is now derived from the inner bound instead of coinciding with it, so a wait that overruns fails as itself and the assertions after it still get to run.
## Chief of Staff
diff --git a/client/src/components/meatspace/post/WordplayTrainer.test.jsx b/client/src/components/meatspace/post/WordplayTrainer.test.jsx
index 5d7922a676..3eba6caff6 100644
--- a/client/src/components/meatspace/post/WordplayTrainer.test.jsx
+++ b/client/src/components/meatspace/post/WordplayTrainer.test.jsx
@@ -25,6 +25,16 @@ import {
// suite is competing for CI's event loop.
const GENERATED_DRILL_TIMEOUT = 5_000;
+// Vitest's default per-test timeout is also 5s, so a `waitFor` bounded at
+// GENERATED_DRILL_TIMEOUT was allowed to consume the entire test budget: the
+// inner bound could never actually report its own failure, and a test with work
+// left after that wait had nothing left to spend on it. The premature-submit
+// test has eight awaited transitions after its drill wait and died on CI at
+// 5011ms with a bare "Test timed out" pointing at the `it(` line rather than the
+// step that stalled. Derive the per-test budget from the inner bound so the two
+// can't drift back into equality.
+vi.setConfig({ testTimeout: GENERATED_DRILL_TIMEOUT * 3 });
+
// The selected mode now lives in the URL (`/post/wordplay/:mode`) — PostTab
// owns that param and passes it down. This harness stands in for that routing:
// clicking a mode button calls onSelectMode, which sets the `mode` prop, and the