ci seam flake: rendererBuild.test.ts is still a pool-wide liability — one killed build-scale fork aborts unrelated files at collection (the isolation call #1182 deferred) #1198

Closed
opened 2026-09-03 18:36:45 +00:00 by matou-build-agent · 6 comments

Filed by the swarm healer for ci run 17285 (signature 2b6783a3ce4d, commit d40edebc), which red the TypeScript: build (tsc), test (vitest), lint (eslint) seam stage. This is the follow-up #1182 explicitly deferred:

Worth considering alongside it: this file is the only one in the suite that does real work at build scale, so a poolOptions cap or sequential/isolate treatment for it would stop a future slow build from taking 22 unrelated files down with it. That part is a judgement call for whoever picks this up.

Why it is back on the table

#1182 closed at 06:48 today. Its fix (one shared build instead of three) is intact and working — the file is 3/3 green in 9.2 s on the runner as I write this. At 18:16 UTC the same signature red again, because the amplification was never addressed, only the trigger's likelihood.

run-verdict.txt for run 17285:

stage=TypeScript: build (tsc), test (vitest), lint (eslint)
exit=1
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @idss/app@0.1.0 test: `vitest run`
app test: FAIL tests/unit/foundingPrivatePath.test.ts
app test: FAIL tests/unit/foundingSpecGateReachability.test.ts
app test: Error: [vitest-worker]: Timeout calling "fetch" with "[".../FoundingBrandKit.vue","web"]"
app test: FAIL tests/unit/seatSource.test.ts
app test: Error: [vitest-worker]: Timeout calling "fetch" with "[".../StartingSplashScreen.vue","web"]"
app test: FAIL tests/unit/rendererBuild.test.ts > ... > leaves no node builtin as a surviving external import
app test: Error: Test timed out in 120000ms.
app test:  Test Files  4 failed | 108 passed (112)
app test:       Tests   1 failed | 1310 passed (1311)

The GOTCHAS #156 fingerprint, in its short form: 4 failed files, 1 failed test. Only rendererBuild.test.ts failed on its merits. The other three never ran a single assertion — they died at collection, with the module-transform RPC (Timeout calling "fetch") going down alongside the fork that was killed.

Root cause of the trigger (already repaired — not this ticket)

Host contention, not code. The push carried STATUS.md + shell scripts only, no app source, and the identical suite greened at d9e35a2b 40 minutes earlier. At 18:16 the runner was carrying two concurrent swarm runs (49339, 49340) plus a publish job: load 15.76 on 8 cores, swap 100 % exhausted (4095/4095 MB). An ~11 s build crossed 120 s — a >10x slowdown, which #1182's 10x headroom could not absorb.

The healer's one bounded repair raised the budget to 300 s (~27x idle, still inside the seam job's 30 min cap) in b6f02772, and recorded the recurrence under GOTCHAS #156.

What this ticket is for

A wider budget makes the trigger rarer. It does not make the file safe. rendererBuild.test.ts is still the one file in the app suite that does real build-scale work in a shared fork pool, so whenever it does cross its budget it still takes unrelated files down with it — and the resulting verdict still reads as N broken files rather than one slow one, which is exactly the misdiagnosis GOTCHAS #156 exists to prevent.

Options (the judgement call):

  • Give the file its own pool — poolOptions / a sequential or isolate treatment — so its fork dying cannot abort files it has nothing to do with.
  • Or move the renderer-build guard out of the vitest suite entirely into its own seam stage (it is a build-output assertion, not a unit test; it already runs vite build directly).

Either way the acceptance property is the same: one slow or killed build-scale test reds itself and nothing else.

Acceptance criteria

  • rendererBuild.test.ts crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection.
  • Provable offline: simulate it (e.g. a temporary 1 ms budget on the build test) and show the rest of the suite still runs to completion with its normal test count.
  • Total suite wall-clock does not materially regress.
  • GOTCHAS #156 updated with the resolution.

Contributing host condition (separate, needs a human)

Swap on matou-workstation was 100 % consumed (4095/4095 MB) at incident time and still is. The stale foreign processes #1182 reported are gone — this load was the swarm's own: ci's seam stage runs unthrottled against concurrent swarm + publish jobs on the same 8-core box. Whether ci's heavy stage should be serialised against swarm runs (a shared concurrency group), or the host needs more headroom, is a capacity decision outside the healer's charter. Cross-reference GOTCHAS #79.

Filed by the swarm healer for ci run 17285 (signature `2b6783a3ce4d`, commit `d40edebc`), which red the `TypeScript: build (tsc), test (vitest), lint (eslint)` seam stage. This is the follow-up #1182 explicitly deferred: > Worth considering alongside it: this file is the only one in the suite that does real work at build scale, so a `poolOptions` cap or `sequential`/`isolate` treatment for it would stop a future slow build from taking 22 unrelated files down with it. That part is a judgement call for whoever picks this up. ## Why it is back on the table #1182 closed at 06:48 today. Its fix (one shared build instead of three) is intact and working — the file is 3/3 green in **9.2 s** on the runner as I write this. At **18:16 UTC the same signature red again**, because the *amplification* was never addressed, only the trigger's likelihood. `run-verdict.txt` for run 17285: ``` stage=TypeScript: build (tsc), test (vitest), lint (eslint) exit=1 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/app@0.1.0 test: `vitest run` app test: FAIL tests/unit/foundingPrivatePath.test.ts app test: FAIL tests/unit/foundingSpecGateReachability.test.ts app test: Error: [vitest-worker]: Timeout calling "fetch" with "[".../FoundingBrandKit.vue","web"]" app test: FAIL tests/unit/seatSource.test.ts app test: Error: [vitest-worker]: Timeout calling "fetch" with "[".../StartingSplashScreen.vue","web"]" app test: FAIL tests/unit/rendererBuild.test.ts > ... > leaves no node builtin as a surviving external import app test: Error: Test timed out in 120000ms. app test: Test Files 4 failed | 108 passed (112) app test: Tests 1 failed | 1310 passed (1311) ``` The GOTCHAS #156 fingerprint, in its short form: **4 failed files, 1 failed test.** Only `rendererBuild.test.ts` failed on its merits. The other three never ran a single assertion — they died at *collection*, with the module-transform RPC (`Timeout calling "fetch"`) going down alongside the fork that was killed. ## Root cause of the trigger (already repaired — not this ticket) Host contention, not code. The push carried `STATUS.md` + shell scripts only, no app source, and the identical suite greened at `d9e35a2b` 40 minutes earlier. At 18:16 the runner was carrying two concurrent `swarm` runs (49339, 49340) plus a `publish` job: load **15.76 on 8 cores**, swap **100 % exhausted** (4095/4095 MB). An ~11 s build crossed 120 s — a >10x slowdown, which #1182's 10x headroom could not absorb. The healer's one bounded repair raised the budget to 300 s (~27x idle, still inside the seam job's 30 min cap) in `b6f02772`, and recorded the recurrence under GOTCHAS #156. ## What this ticket is for A wider budget makes the trigger rarer. It does not make the file safe. `rendererBuild.test.ts` is still the one file in the app suite that does real build-scale work in a shared fork pool, so whenever it *does* cross its budget it still takes unrelated files down with it — and the resulting verdict still reads as N broken files rather than one slow one, which is exactly the misdiagnosis GOTCHAS #156 exists to prevent. Options (the judgement call): - Give the file its own pool — `poolOptions` / a `sequential` or `isolate` treatment — so its fork dying cannot abort files it has nothing to do with. - Or move the renderer-build guard out of the vitest suite entirely into its own seam stage (it is a build-output assertion, not a unit test; it already runs `vite build` directly). Either way the acceptance property is the same: **one slow or killed build-scale test reds itself and nothing else.** ## Acceptance criteria - `rendererBuild.test.ts` crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection. - Provable offline: simulate it (e.g. a temporary 1 ms budget on the build test) and show the rest of the suite still runs to completion with its normal test count. - Total suite wall-clock does not materially regress. - GOTCHAS #156 updated with the resolution. ## Contributing host condition (separate, needs a human) Swap on `matou-workstation` was 100 % consumed (4095/4095 MB) at incident time and still is. The stale foreign processes #1182 reported are gone — this load was the swarm's own: `ci`'s seam stage runs unthrottled against concurrent `swarm` + `publish` jobs on the same 8-core box. Whether ci's heavy stage should be serialised against swarm runs (a shared `concurrency` group), or the host needs more headroom, is a capacity decision outside the healer's charter. Cross-reference GOTCHAS #79.
Author
Member

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime

Ruling: ready-for-agent. The reporter framed the isolation approach as "a judgement call for whoever picks this up" — under the old bar that routed to a human. It is a two-way door, so it stays with the agent:

  • Revertible — the fix is a change to app/vitest.config.ts poolOptions (or moving the guard to its own seam stage). Either is undone by a single revert commit; no state, credential, or member-facing surface is touched.
  • Provable by an existing probe — the ticket supplies it: give the build test a temporary tiny budget (e.g. 1 ms), run the app suite, and confirm the other files still run to their normal count instead of aborting at collection. That is an offline, deterministic drive.
  • Not on the one-way-door list — CI test-pool config, not personal credentials, a security-posture widening, a trust-surface accept, data destruction, or non-routine spend.

The choice between the two options (own poolOptions/isolate/sequential treatment vs. lifting the renderer-build guard into its own seam stage) is also delegated: both satisfy the same acceptance property and either is revertible, so the implementing agent picks based on what keeps suite wall-clock flat. Ben vetoes by comment at any time.

Agent Brief

Category: bug
Summary: Isolate rendererBuild.test.ts so that when its build-scale test crosses its timeout (or its fork is killed), it reds that file alone — it must never abort unrelated files at collection.

Current behavior:
rendererBuild.test.ts runs the real in-memory Vite renderer build in the shared vitest fork pool. When the single build crosses the per-test budget under host contention, vitest kills the fork and the worker-transform RPC dies with it ([vitest-worker]: Timeout calling "fetch"/"snapshotSaved"), tearing down the whole fork pool. Every file that had not yet run in that pool is aborted at collection, so the verdict reads as N broken files with only 1 real failure (the GOTCHAS #156 fingerprint). #1182 cut three builds to one shared build and the budget was later raised to 300 s, but neither addresses the amplification — a killed build-scale fork still takes unrelated files down.

Desired behavior:
A slow or killed build-scale test in rendererBuild.test.ts fails only itself. No file it has nothing to do with is aborted at collection because of it. Pick whichever of these keeps total suite wall-clock flat:

  • Give the file its own isolation in poolOptions (a dedicated pool / sequential / isolate) so its fork dying cannot tear down the shared pool; or
  • Move the renderer-build guard out of the vitest suite into its own seam stage (it is a build-output assertion that already runs vite build directly, not a unit test).

Key interfaces:

  • app/vitest.config.ts test config — poolOptions / pool-isolation shape for the build-scale file (if the in-suite option is chosen).
  • The seam stage definition (the TypeScript: build (tsc), test (vitest), lint (eslint) stage) — if the guard is lifted into its own stage instead, it must still run in CI with no Electron binary download (the current file exists precisely because the Electron binary postinstall is denied — preserve that constraint).

Acceptance criteria:

  • rendererBuild.test.ts crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection.
  • Provable offline: simulate it (e.g. a temporary ~1 ms budget on the build test) and show the rest of the app suite still runs to completion with its normal test count.
  • Total suite wall-clock does not materially regress.
  • GOTCHAS #156 updated with the resolution.

Out of scope:

  • The contributing host condition (swap exhaustion on matou-workstation; whether ci's heavy seam stage should be serialised against swarm/publish via a shared concurrency group, or the host needs more headroom). The reporter flagged this as separate and it does not gate any acceptance criterion here — the "more headroom" fork is a one-way door (hardware/spend). If pursued, it is its own ticket; cross-reference GOTCHAS #79. Do not change host provisioning or workflow concurrency groups as part of this fix.
  • The #1182 shared-build change and the 300 s budget — both intact and working; do not revert them.
> *This was generated by AI during triage.* ## Ruled by agent under ADR 0174 — veto anytime **Ruling:** `ready-for-agent`. The reporter framed the isolation approach as "a judgement call for whoever picks this up" — under the old bar that routed to a human. It is a **two-way door**, so it stays with the agent: - **Revertible** — the fix is a change to `app/vitest.config.ts` `poolOptions` (or moving the guard to its own seam stage). Either is undone by a single revert commit; no state, credential, or member-facing surface is touched. - **Provable by an existing probe** — the ticket supplies it: give the build test a temporary tiny budget (e.g. 1 ms), run the app suite, and confirm the *other* files still run to their normal count instead of aborting at collection. That is an offline, deterministic drive. - **Not on the one-way-door list** — CI test-pool config, not personal credentials, a security-posture widening, a trust-surface accept, data destruction, or non-routine spend. The **choice between the two options** (own `poolOptions`/`isolate`/`sequential` treatment vs. lifting the renderer-build guard into its own seam stage) is also delegated: both satisfy the same acceptance property and either is revertible, so the implementing agent picks based on what keeps suite wall-clock flat. Ben vetoes by comment at any time. ## Agent Brief **Category:** bug **Summary:** Isolate `rendererBuild.test.ts` so that when its build-scale test crosses its timeout (or its fork is killed), it reds *that file alone* — it must never abort unrelated files at collection. **Current behavior:** `rendererBuild.test.ts` runs the real in-memory Vite renderer build in the shared vitest fork pool. When the single build crosses the per-test budget under host contention, vitest kills the fork and the worker-transform RPC dies with it (`[vitest-worker]: Timeout calling "fetch"`/`"snapshotSaved"`), tearing down the whole fork pool. Every file that had not yet run in that pool is aborted at collection, so the verdict reads as N broken files with only 1 real failure (the GOTCHAS #156 fingerprint). #1182 cut three builds to one shared build and the budget was later raised to 300 s, but neither addresses the amplification — a killed build-scale fork still takes unrelated files down. **Desired behavior:** A slow or killed build-scale test in `rendererBuild.test.ts` fails only itself. No file it has nothing to do with is aborted at collection because of it. Pick whichever of these keeps total suite wall-clock flat: - Give the file its own isolation in `poolOptions` (a dedicated pool / `sequential` / `isolate`) so its fork dying cannot tear down the shared pool; **or** - Move the renderer-build guard out of the vitest suite into its own seam stage (it is a build-output assertion that already runs `vite build` directly, not a unit test). **Key interfaces:** - `app/vitest.config.ts` `test` config — `poolOptions` / pool-isolation shape for the build-scale file (if the in-suite option is chosen). - The seam stage definition (the `TypeScript: build (tsc), test (vitest), lint (eslint)` stage) — if the guard is lifted into its own stage instead, it must still run in CI with no Electron binary download (the current file exists precisely because the Electron binary postinstall is denied — preserve that constraint). **Acceptance criteria:** - [ ] `rendererBuild.test.ts` crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection. - [ ] Provable offline: simulate it (e.g. a temporary ~1 ms budget on the build test) and show the rest of the app suite still runs to completion with its normal test count. - [ ] Total suite wall-clock does not materially regress. - [ ] GOTCHAS #156 updated with the resolution. **Out of scope:** - The **contributing host condition** (swap exhaustion on `matou-workstation`; whether ci's heavy seam stage should be serialised against `swarm`/`publish` via a shared `concurrency` group, or the host needs more headroom). The reporter flagged this as separate and it does not gate any acceptance criterion here — the "more headroom" fork is a one-way door (hardware/spend). If pursued, it is its own ticket; cross-reference GOTCHAS #79. Do not change host provisioning or workflow concurrency groups as part of this fix. - The #1182 shared-build change and the 300 s budget — both intact and working; do not revert them.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=17300
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17300 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=17300
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=17300 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

swarm-claim host=matou-dev-server-01 run=17304
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17304 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

swarm-claim host=matou-dev-server-01 run=17306
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=17306 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1198 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1198,
  "status": "success",
  "commits": [
    "e02a23ec"
  ],
  "changed_files": [
    "STATUS.md",
    "app/package.json",
    "app/scripts/run-unit-tests.mjs",
    "app/tests/unit/rendererBuild.test.ts",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "cd app && CI=true node_modules/.bin/vitest run tests/unit/rendererBuild.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd app && node_modules/.bin/vue-tsc -p tsconfig.json",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/eslint app/scripts/run-unit-tests.mjs app/tests/unit/rendererBuild.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "rendererBuild.test.ts crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection": "app/package.json now runs app/scripts/run-unit-tests.mjs, which runs rendererBuild.test.ts as its OWN `vitest run` invocation (separate OS process = own fork pool + own module-transform RPC server) concurrently with `vitest run --exclude '**/rendererBuild.test.ts'` for the other 111 files. A timeout/kill in the build process is confined to that process and cannot abort a sibling file at collection.",
    "Provable offline: simulate it (e.g. a temporary 1 ms budget on the build test) and show the rest of the suite still runs to completion with its normal test count": "Ran `RENDERER_BUILD_TEST_TIMEOUT_MS=1 node scripts/run-unit-tests.mjs` (env-override added to rendererBuild.test.ts). The build process reds ITSELF ALONE — its isolated block: `Test Files 1 failed (1)` / `Tests 3 failed (3)` (all `Test timed out in 1ms`) — while the main suite ran to completion with its full normal count: `Tests 1358 passed | 6 skipped (1364)` across 111 files, zero files aborted at collection. (The lone main-suite red in the sandbox is boot.test.ts `spawnSync go ENOENT` — go is not installed here; it fails identically at baseline and is unrelated to this slice. On CI it is green.)",
    "Total suite wall-clock does not materially regress": "The two vitest processes run concurrently, so wall-clock is unchanged: measured ~64s orchestrated vs ~67s baseline single-process on this 4-core box (the ~11s build already ran in parallel inside the single process).",
    "GOTCHAS #156 updated with the resolution": "docs/GOTCHAS.md entry 156 gains a Resolution paragraph and a Source line naming #1198, app/scripts/run-unit-tests.mjs, app/package.json."
  },
  "summary": "rendererBuild.test.ts now runs as its own vitest process (own fork pool + transform server), so a slow or killed build fork reds itself alone and never aborts an unrelated file at collection; proven offline with a 1ms budget while the rest of the suite keeps its full test count, with no wall-clock regression.",
  "blockers": []
}
**close-report** for #1198 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1198, "status": "success", "commits": [ "e02a23ec" ], "changed_files": [ "STATUS.md", "app/package.json", "app/scripts/run-unit-tests.mjs", "app/tests/unit/rendererBuild.test.ts", "docs/GOTCHAS.md" ], "tests": [ { "command": "cd app && CI=true node_modules/.bin/vitest run tests/unit/rendererBuild.test.ts", "exit_code": 0 }, { "command": "cd app && node_modules/.bin/vue-tsc -p tsconfig.json", "exit_code": 0 }, { "command": "node_modules/.bin/eslint app/scripts/run-unit-tests.mjs app/tests/unit/rendererBuild.test.ts", "exit_code": 0 } ], "criteria": { "rendererBuild.test.ts crossing its timeout (or being killed) fails that file alone — no unrelated file is aborted at collection": "app/package.json now runs app/scripts/run-unit-tests.mjs, which runs rendererBuild.test.ts as its OWN `vitest run` invocation (separate OS process = own fork pool + own module-transform RPC server) concurrently with `vitest run --exclude '**/rendererBuild.test.ts'` for the other 111 files. A timeout/kill in the build process is confined to that process and cannot abort a sibling file at collection.", "Provable offline: simulate it (e.g. a temporary 1 ms budget on the build test) and show the rest of the suite still runs to completion with its normal test count": "Ran `RENDERER_BUILD_TEST_TIMEOUT_MS=1 node scripts/run-unit-tests.mjs` (env-override added to rendererBuild.test.ts). The build process reds ITSELF ALONE — its isolated block: `Test Files 1 failed (1)` / `Tests 3 failed (3)` (all `Test timed out in 1ms`) — while the main suite ran to completion with its full normal count: `Tests 1358 passed | 6 skipped (1364)` across 111 files, zero files aborted at collection. (The lone main-suite red in the sandbox is boot.test.ts `spawnSync go ENOENT` — go is not installed here; it fails identically at baseline and is unrelated to this slice. On CI it is green.)", "Total suite wall-clock does not materially regress": "The two vitest processes run concurrently, so wall-clock is unchanged: measured ~64s orchestrated vs ~67s baseline single-process on this 4-core box (the ~11s build already ran in parallel inside the single process).", "GOTCHAS #156 updated with the resolution": "docs/GOTCHAS.md entry 156 gains a Resolution paragraph and a Source line naming #1198, app/scripts/run-unit-tests.mjs, app/package.json." }, "summary": "rendererBuild.test.ts now runs as its own vitest process (own fork pool + transform server), so a slow or killed build fork reds itself alone and never aborts an unrelated file at collection; proven offline with a 1ms budget while the rest of the suite keeps its full test count, with no wall-clock regression.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1198
No description provided.