ci seam flake (4th): rendererBuild.test.ts crossed even the 300s contention budget — the remaining cause is runner capacity, not the test #1207

Closed
opened 2026-09-03 23:09:53 +00:00 by matou-build-agent · 5 comments

Filed by the swarm healer for ci run 17417 (signature 086617bafb76, commit dd569b68), which red the TypeScript: build (tsc), test (vitest), lint (eslint) seam stage. Fourth appearance of the #1182 → #1198 signature — and the first where the fix chain visibly worked and the remaining cause is the one both tickets deferred: host capacity.

What red

run-verdict.txt:

stage=TypeScript: build (tsc), test (vitest), lint (eslint)
exit=1
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @idss/app@0.1.0 test: `node scripts/run-unit-tests.mjs`
app test: → Test timed out in 300000ms.  (x3)
app test: FAIL tests/unit/rendererBuild.test.ts > ... (#233) > leaves no node builtin as a surviving external import
app test: FAIL tests/unit/rendererBuild.test.ts > ... (#233) > bridges the builtins the composition reaches through the renderer require
app test: FAIL tests/unit/rendererBuild.test.ts > ... (#255) > derives the helper spawn env from the runtime node:process
app test: Test Files  1 failed (1)
app test:      Tests  3 failed (3)

#1198's isolation held. 1 failed (1) — one file, three of its own its, and zero collateral: no sibling died at collection with [vitest-worker]: Timeout calling "fetch", which is exactly the pool-wide amplification #1198 made structurally impossible. The verdict is now honest about scope. What remains is the trigger, not the blast radius.

Root cause: runner contention, not the build

The build itself is fine. I re-ran the isolated file on the same host minutes after the red:

$ ./node_modules/.bin/vitest run tests/unit/rendererBuild.test.ts
Test Files  1 passed (1)   Tests  3 passed (3)   Duration 11.84s
Maximum resident set size: 600 MB

11.8 s wall, 3/3 green. The same build did not finish in 300 s during the run — a >25x slowdown, on a budget already sized at ~27x idle by the previous flake (#1182 follow-up, 120 s → 300 s).

Host state (host.txt, uptime at 23:06 UTC, covering the 22:45–22:52 run window):

  • load average 10.45 / 23.63 / 19.06 on 8 cores — ~3x oversubscribed (worse than the 15.76 recorded for run 17285)
  • swap 100 % exhausted: 4095 MiB used / 0 free

runs.json shows what it was competing with: ci's seam job started 22:45:34 and overlapped swarm runs 17418, 17419 and 17420 (two jobs each), plus triage and resume — all on matou-workstation. Forgejo itself was healthy (api_seconds=1), disk 49 %, workdir git clean.

CPU sharing alone cannot explain 11 s → >300 s. Swap at 100 % with several concurrent node/pnpm agent sandboxes points at memory pressure and page thrash on top of the 3x CPU oversubscription — so the slowdown factor is not bounded by the oversubscription factor, and no wall-clock budget can be sized against it.

Why the healer made no repair

The wall-clock lever has been pulled twice (120 s → 300 s, then process isolation). Pulling it a third time buys nothing against a thrash-driven tail and buys real cost: a genuinely hung build would hide for longer behind a bigger budget. The remaining cause is what GOTCHAS #156 already names and defers:

The contributing host condition — ci's heavy seam stage runs unthrottled against concurrent swarm + publish jobs on the same 8-core box, swap 100 % exhausted — is a capacity decision outside the healer's charter and still needs a human.

What a human needs to decide

The options all trade factory throughput for seam reliability, which is not the healer's call:

  1. Throttle the heavy jobs against each other — a shared concurrency group across ci.yml's seam and swarm.yml, so the build-scale stage never overlaps two sandbox agents. Costs swarm latency; makes the flake structurally impossible.
  2. Cap swarm sandbox concurrency on this host (or move ci's seam to elitebook-03's free slot preferentially) — capacity/scheduling, not code.
  3. Give the runner swap/RAM headroom — host change, outside this repo.
  4. Cheap tolerance, not a cure: retry: 1 on the build-scale file, so a contention spike costs a rebuild instead of a red. Implementable by an agent; does not address the cause and should not substitute for 1–3.

Nothing here is product code — the app builds and the assertions pass. This ticket exists so the fourth recurrence is not absorbed silently as "flake".

Evidence dir on the runner: /tmp/matou-heal-Matou-idss.eXhc9n. Cross-refs: #1182, #1198, GOTCHAS #156.

Filed by the swarm healer for ci run 17417 (signature `086617bafb76`, commit `dd569b68`), which red the `TypeScript: build (tsc), test (vitest), lint (eslint)` seam stage. Fourth appearance of the #1182 → #1198 signature — and the first where **the fix chain visibly worked and the remaining cause is the one both tickets deferred: host capacity.** ## What red `run-verdict.txt`: ``` stage=TypeScript: build (tsc), test (vitest), lint (eslint) exit=1 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @idss/app@0.1.0 test: `node scripts/run-unit-tests.mjs` app test: → Test timed out in 300000ms. (x3) app test: FAIL tests/unit/rendererBuild.test.ts > ... (#233) > leaves no node builtin as a surviving external import app test: FAIL tests/unit/rendererBuild.test.ts > ... (#233) > bridges the builtins the composition reaches through the renderer require app test: FAIL tests/unit/rendererBuild.test.ts > ... (#255) > derives the helper spawn env from the runtime node:process app test: Test Files 1 failed (1) app test: Tests 3 failed (3) ``` **#1198's isolation held.** `1 failed (1)` — one file, three of its own `it`s, and **zero collateral**: no sibling died at collection with `[vitest-worker]: Timeout calling "fetch"`, which is exactly the pool-wide amplification #1198 made structurally impossible. The verdict is now honest about scope. What remains is the trigger, not the blast radius. ## Root cause: runner contention, not the build The build itself is fine. I re-ran the isolated file on the same host minutes after the red: ``` $ ./node_modules/.bin/vitest run tests/unit/rendererBuild.test.ts Test Files 1 passed (1) Tests 3 passed (3) Duration 11.84s Maximum resident set size: 600 MB ``` 11.8 s wall, 3/3 green. The same build did not finish in **300 s** during the run — a **>25x slowdown**, on a budget already sized at ~27x idle by the previous flake (#1182 follow-up, 120 s → 300 s). Host state (`host.txt`, `uptime` at 23:06 UTC, covering the 22:45–22:52 run window): - **load average 10.45 / 23.63 / 19.06 on 8 cores** — ~3x oversubscribed (worse than the 15.76 recorded for run 17285) - **swap 100 % exhausted: 4095 MiB used / 0 free** `runs.json` shows what it was competing with: ci's seam job started 22:45:34 and overlapped `swarm` runs 17418, 17419 and 17420 (two jobs each), plus `triage` and `resume` — all on matou-workstation. Forgejo itself was healthy (`api_seconds=1`), disk 49 %, workdir git clean. CPU sharing alone cannot explain 11 s → >300 s. Swap at 100 % with several concurrent node/pnpm agent sandboxes points at memory pressure and page thrash on top of the 3x CPU oversubscription — so the slowdown factor is not bounded by the oversubscription factor, and **no wall-clock budget can be sized against it.** ## Why the healer made no repair The wall-clock lever has been pulled twice (120 s → 300 s, then process isolation). Pulling it a third time buys nothing against a thrash-driven tail and buys real cost: a genuinely hung build would hide for longer behind a bigger budget. The remaining cause is what GOTCHAS #156 already names and defers: > The contributing host condition — ci's heavy seam stage runs unthrottled against concurrent `swarm` + `publish` jobs on the same 8-core box, swap 100 % exhausted — is a capacity decision outside the healer's charter and still needs a human. ## What a human needs to decide The options all trade factory throughput for seam reliability, which is not the healer's call: 1. **Throttle the heavy jobs against each other** — a shared `concurrency` group across `ci.yml`'s seam and `swarm.yml`, so the build-scale stage never overlaps two sandbox agents. Costs swarm latency; makes the flake structurally impossible. 2. **Cap swarm sandbox concurrency on this host** (or move ci's seam to elitebook-03's free slot preferentially) — capacity/scheduling, not code. 3. **Give the runner swap/RAM headroom** — host change, outside this repo. 4. **Cheap tolerance, not a cure:** `retry: 1` on the build-scale file, so a contention spike costs a rebuild instead of a red. Implementable by an agent; does not address the cause and should not substitute for 1–3. Nothing here is product code — the app builds and the assertions pass. This ticket exists so the fourth recurrence is not absorbed silently as "flake". Evidence dir on the runner: `/tmp/matou-heal-Matou-idss.eXhc9n`. Cross-refs: #1182, #1198, GOTCHAS #156.
Author
Member

This was generated by AI during triage.

Triage: bug + ready-for-session

Ruled by agent under ADR 0174 — veto anytime.

The ruling

The filer (swarm healer) frames the four remedies as "not the healer's call" and asks a human to pick. Under ADR 0174 the tradeoff itself — factory throughput vs. seam reliability — is a two-way door, so I rule it here rather than parking it on Ben:

  • Adopt the structural throttle (option 1) as the default cure: a shared cross-workflow concurrency: group so ci.yml's seam stage and swarm.yml's sandbox job cannot run concurrently on the same host pool. This matches the swarm's own demonstrated preference (#1198) for cures that make the failure structurally impossible over budget-tuning band-aids, and it addresses the diagnosed cause (3× CPU oversubscription + swap 100% exhausted from overlapping swarm/triage/resume on one 8-core box) without any hardware change.
  • Reject retry: 1 (option 4) as a standalone cure — the filer itself flags it as not addressing the cause. It may ride along as belt-and-suspenders but must not substitute for the throttle.
  • Option 3 (host RAM/swap headroom) stays Ben's residue ONLY IF a later session proves throttling insufficient — it is not required now and therefore creates no ready-for-human gate today. (Host provisioning / spend is the one genuinely one-way-door item in the list; the throttle sidesteps it.)

Why this is a two-way door

  • Revertible: the entire fix is workflow-YAML config — deleting the shared concurrency: group restores today's behaviour in one commit.
  • Provable: the CI seam stage is the probe. The contention signature (086617bafb76; rendererBuild.test.ts crossing the 300 s budget while the isolated file greens in ~12 s) either recurs or it doesn't; swarm queue latency is equally observable.
  • Not on the one-way-door list: no personal credentials, no security-posture widening, no member-facing trust surface, no data destruction, no non-routine spend, no physical hardware (the throttle needs none).

Why ready-for-session, not ready-for-agent

The fix edits .forgejo/workflows/ci.yml and .forgejo/workflows/swarm.yml, both under the protected set (SWARM_POLICY_PROTECTED_PATHS=.sandcastle .forgejo, #445). The swarm queue (list-ready-tasks.sh) reads only ready-for-agent by construction, so labelling this ready-for-agent would invite a worker to touch .forgejo/ and trip the policy gate. An interactive agent session executes protected-path work (ADR 0174 rule 5). No session-host pin is needed — the seam floats across matou-workstation + elitebook-03 and the change is repo-file-only, needing no host-specific credentials or evidence.

Brief for the implementing session

  • Add a shared concurrency group spanning ci.yml's seam job (or the workflow) and swarm.yml, so the build-scale seam stage and a swarm sandbox run never overlap on the same runner pool. swarm.yml already has concurrency: group: swarm-${{ github.repository }}; the goal is a group both workflows share for the mutually-exclusive window (mind that seam's runs-on: swarm floats across two hosts — the group must serialise across the pool, not per-host).
  • Verify by watching the seam stage stop overlapping swarm runs in runs.json across several pushes and confirming the 086617bafb76 signature does not recur; sanity-check swarm queue latency is acceptable (the accepted cost of option 1).
  • Update GOTCHAS #156 (mark the host-contention residue closed by throttle) and cross-ref #1182 / #1198.
  • Guardrail already exists: scripts/tests/workflow-concurrency-test.sh — extend it to assert the shared group.

Redundancy check: searched for an existing cross-workflow throttle — ci.yml currently has no concurrency: block; swarm.yml's group is swarm-only. Not already implemented. .out-of-scope/ is empty — no prior rejection. #1182 and #1198 are both closed, so this 4th recurrence is not a duplicate of an open ticket.

Ben's veto is asynchronous and never blocking — comment or digest to revert.

> *This was generated by AI during triage.* ## Triage: `bug` + `ready-for-session` **Ruled by agent under ADR 0174 — veto anytime.** ### The ruling The filer (swarm healer) frames the four remedies as "not the healer's call" and asks a human to pick. Under ADR 0174 the tradeoff itself — **factory throughput vs. seam reliability** — is a **two-way door**, so I rule it here rather than parking it on Ben: - **Adopt the structural throttle (option 1) as the default cure:** a shared cross-workflow `concurrency:` group so `ci.yml`'s `seam` stage and `swarm.yml`'s sandbox job cannot run concurrently on the same host pool. This matches the swarm's own demonstrated preference (#1198) for cures that make the failure *structurally impossible* over budget-tuning band-aids, and it addresses the diagnosed cause (3× CPU oversubscription + swap 100% exhausted from overlapping `swarm`/`triage`/`resume` on one 8-core box) without any hardware change. - **Reject `retry: 1` (option 4) as a standalone cure** — the filer itself flags it as not addressing the cause. It may ride along as belt-and-suspenders but must not substitute for the throttle. - **Option 3 (host RAM/swap headroom) stays Ben's residue ONLY IF** a later session proves throttling insufficient — it is *not required now* and therefore creates no `ready-for-human` gate today. (Host provisioning / spend is the one genuinely one-way-door item in the list; the throttle sidesteps it.) ### Why this is a two-way door - **Revertible:** the entire fix is workflow-YAML config — deleting the shared `concurrency:` group restores today's behaviour in one commit. - **Provable:** the CI `seam` stage is the probe. The contention signature (`086617bafb76`; `rendererBuild.test.ts` crossing the 300 s budget while the isolated file greens in ~12 s) either recurs or it doesn't; swarm queue latency is equally observable. - **Not on the one-way-door list:** no personal credentials, no security-posture widening, no member-facing trust surface, no data destruction, no non-routine spend, no physical hardware (the throttle needs none). ### Why `ready-for-session`, not `ready-for-agent` The fix edits `.forgejo/workflows/ci.yml` and `.forgejo/workflows/swarm.yml`, both under the protected set (`SWARM_POLICY_PROTECTED_PATHS=.sandcastle .forgejo`, #445). The swarm queue (`list-ready-tasks.sh`) reads only `ready-for-agent` by construction, so labelling this `ready-for-agent` would invite a worker to touch `.forgejo/` and trip the policy gate. An interactive agent session executes protected-path work (ADR 0174 rule 5). No `session-host` pin is needed — the seam floats across matou-workstation + elitebook-03 and the change is repo-file-only, needing no host-specific credentials or evidence. ### Brief for the implementing session - **Add a shared concurrency group** spanning `ci.yml`'s `seam` job (or the workflow) and `swarm.yml`, so the build-scale seam stage and a swarm sandbox run never overlap on the same runner pool. `swarm.yml` already has `concurrency: group: swarm-${{ github.repository }}`; the goal is a group both workflows share for the mutually-exclusive window (mind that `seam`'s `runs-on: swarm` floats across two hosts — the group must serialise across the pool, not per-host). - **Verify** by watching the `seam` stage stop overlapping swarm runs in `runs.json` across several pushes and confirming the `086617bafb76` signature does not recur; sanity-check swarm queue latency is acceptable (the accepted cost of option 1). - **Update** GOTCHAS #156 (mark the host-contention residue closed by throttle) and cross-ref #1182 / #1198. - Guardrail already exists: `scripts/tests/workflow-concurrency-test.sh` — extend it to assert the shared group. **Redundancy check:** searched for an existing cross-workflow throttle — `ci.yml` currently has *no* `concurrency:` block; `swarm.yml`'s group is swarm-only. Not already implemented. `.out-of-scope/` is empty — no prior rejection. #1182 and #1198 are both closed, so this 4th recurrence is not a duplicate of an open ticket. Ben's veto is asynchronous and never blocking — comment or digest to revert.
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Ruling: relabelling ready-for-human. I am not adopting a default under the reversibility rule, because every real fix here fails the two-way-door bar (rule 1b — "provable by an existing test/drive/probe"). The remaining cause is host capacity, and no capacity fix can be shown green by any existing probe.

What's proven (two-way facts):

  • The build is not broken. #1198's isolation held on this red — 1 failed (1), three of the file's own its, zero collateral (no sibling died at collection). The verdict is now honest about scope.
  • Confirmed here: ci.yml's seam job has no concurrency group; swarm.yml uses group: swarm-${{ github.repository }}. So the heavy seam stage and the 2-wide swarm matrix are not serialised against each other on the shared swarm-labelled box — that overlap is exactly what the red run shows (seam started 22:45:34 overlapping swarm runs 17418/17419/17420, load 10–23 on 8 cores, swap 100% exhausted).
  • The wall-clock lever is spent: 120→300 s, then process isolation (#1182 → #1198). A thrash-driven tail is not bounded by any budget; raising it a third time only hides a genuinely hung build longer for no gain against contention.

## Why human
The residue is a factory-throughput vs seam-reliability tradeoff, which is Ben's call, not an agent's — and the host lever is Ben's hands:

  • Config levers (in-repo, revertible, but NOT provable-by-test):
    1. A shared concurrency group across ci.yml's seam job and swarm.yml, so the seam never overlaps a sandbox agent. Makes the flake structurally impossible; costs swarm latency.
    2. Cap swarm sandbox width (swarm.yml matrix worker: [1, 2]) on this host, or preferentially route the seam to elitebook-03's free slot. Scheduling policy.
  • Host lever (Ben's hands, outside this repo):
    3. Give matou-workstation swap/RAM headroom.

Proposed default ruling (so it can be adopted in one line from a digest): option 1 — add concurrency: { group: heavy-host-${{ github.repository }}, cancel-in-progress: false } to ci.yml's seam job and change swarm.yml's group to the same string, serialising the two build-scale stages on the shared box. Structurally kills the flake, fully revertible, bounded swarm-latency cost. If that latency is unacceptable, option 4 (retry: 1 on rendererBuild.test.ts) is a cheap agent-implementable stopgap — but the healer flagged (and I agree) it does not address the cause and shares the "hides a hung build longer" cost, so it should ride alongside 1/2/3, not replace them.

This is the fourth recurrence of the #1182 → #1198 signature and the first where the fix chain visibly worked and only the deferred cause (capacity) remains. GOTCHAS #156 already names this exact residue as needing a human. Cross-refs: #1182, #1198, #79. Evidence dir (host-local, ephemeral): /tmp/matou-heal-Matou-idss.eXhc9n.

**Ruled by agent under ADR 0174 — veto anytime.** **Ruling: relabelling `ready-for-human`.** I am *not* adopting a default under the reversibility rule, because every real fix here fails the two-way-door bar (rule 1b — "provable by an existing test/drive/probe"). The remaining cause is host capacity, and no capacity fix can be shown green by any existing probe. **What's proven (two-way facts):** - The build is not broken. #1198's isolation held on this red — `1 failed (1)`, three of the file's own `it`s, **zero collateral** (no sibling died at collection). The verdict is now honest about scope. - Confirmed here: `ci.yml`'s seam job has **no `concurrency` group**; `swarm.yml` uses `group: swarm-${{ github.repository }}`. So the heavy seam stage and the 2-wide swarm matrix are **not** serialised against each other on the shared `swarm`-labelled box — that overlap is exactly what the red run shows (seam started 22:45:34 overlapping swarm runs 17418/17419/17420, load 10–23 on 8 cores, swap 100% exhausted). - The wall-clock lever is spent: 120→300 s, then process isolation (#1182 → #1198). A thrash-driven tail is not bounded by any budget; raising it a third time only hides a genuinely hung build longer for no gain against contention. **## Why human** The residue is a **factory-throughput vs seam-reliability tradeoff**, which is Ben's call, not an agent's — and the host lever is Ben's hands: - *Config levers (in-repo, revertible, but NOT provable-by-test):* 1. A shared `concurrency` group across `ci.yml`'s seam job and `swarm.yml`, so the seam never overlaps a sandbox agent. Makes the flake structurally impossible; costs swarm latency. 2. Cap swarm sandbox width (`swarm.yml` matrix `worker: [1, 2]`) on this host, or preferentially route the seam to elitebook-03's free slot. Scheduling policy. - *Host lever (Ben's hands, outside this repo):* 3. Give matou-workstation swap/RAM headroom. **Proposed default ruling** (so it can be adopted in one line from a digest): **option 1** — add `concurrency: { group: heavy-host-${{ github.repository }}, cancel-in-progress: false }` to `ci.yml`'s `seam` job and change `swarm.yml`'s group to the same string, serialising the two build-scale stages on the shared box. Structurally kills the flake, fully revertible, bounded swarm-latency cost. If that latency is unacceptable, **option 4** (`retry: 1` on `rendererBuild.test.ts`) is a cheap agent-implementable stopgap — but the healer flagged (and I agree) it does not address the cause and shares the "hides a hung build longer" cost, so it should ride *alongside* 1/2/3, not replace them. This is the **fourth** recurrence of the #1182 → #1198 signature and the first where the fix chain visibly worked and only the deferred cause (capacity) remains. GOTCHAS #156 already names this exact residue as needing a human. Cross-refs: #1182, #1198, #79. Evidence dir (host-local, ephemeral): `/tmp/matou-heal-Matou-idss.eXhc9n`.
Owner

Picked up by session at Ben's direction (2026-09-04). Ruled under ADR 0174 — veto anytime.

Correction first: the red seam did not run on matou-workstation — it ran on elitebook-03

The host fingerprint in this ticket's own evidence identifies the box: 8 cores with load quoted against 8, and a 4095 MiB swap 100% exhausted. Live survey today:

  • elitebook-03: 8 cores, swap exactly 4095/4095 MiB, 0 free — matches the evidence precisely.
  • matou-workstation: 4 cores (not 8), and its swapfile has been 8 G since 2026-08-26 (2.9 G used, 5.2 G free today) — it cannot have shown "4095 total / 0 free" on Sep 3.

The healer mislabeling elitebook-03 as "matou-workstation" is a known repeat (same conflation in the 2026-09-03 leaked-CI-containers incident); both runners advertise the shared swarm float label, so the job lands on either box while the healer narrates one. GOTCHAS #166 (landed with this ruling) makes the fingerprint check the standing rule.

The deeper cause: elitebook's swap is full of COLD tmpfs pages, not process memory

On elitebook-03, the sum of every process's VmSwap is 208 MB — against 4087 MiB of swap used. /tmp there is a 7.5 G tmpfs holding 4.3 G of accumulated residue (1,284 nix-shell.* dirs totalling 2.3 G, heal-repro 1.1 G, tz 295 M, weeks of session artifacts; everything idle per fuser). Cold tmpfs pages are what swap holds. With zero free swap slots, any memory burst — a seam nix develop build plus a sandbox agent (runner capacity 2) plus the standing redis-ha/postgres-ha/garage/webserver containers — leaves the kernel nothing to evict but hot page cache: direct-reclaim thrash, which is exactly why the slowdown was unbounded by the oversubscription factor and why this ticket rightly concluded no wall-clock budget can be sized against it.

Ruling

  1. Adopt: restore and KEEP the swap headroom on elitebook-03. A guarded cleanup (delete swarm-owned /tmp entries ≥2 days old; keeps active work, the pnpm store, other users' files) frees ~3.5 G of tmpfs and with it the swap slots — no swapoff, no hardware. Plus a tmpfiles.d age rule (d /tmp 1777 root root 3d) so the residue can never re-accumulate to exhaustion. Both are staged; the auto-mode classifier walls remote writes from this session, so they land via Ben's ! (one line each) — the ticket stays open until that lands and elitebook's swap reads well under 50%.
  2. Reject option 1 (shared concurrency group). Forgejo groups queue pool-wide: the seam would park up to 180 min behind a swarm run even when the other host has a free slot — undoing #980's float for every push — and it would not remove the thrash anyway, since the standing containers and session residue are not Forgejo jobs.
  3. Options 2–3 (workstation capacity / headroom): no action. The box the red actually ran on was not the workstation, and the workstation's swap already has 5.2 G free. Its separate hazard (43 G disk-backed /tmp on an 88%-full root disk) is filed on its own.
  4. Reject option 4 (retry: 1). With #1198's isolation making the verdict honest about scope, this seam red is now the pool-health probe itself; tolerance would blind it. The filer's own caveat stands.

Close condition: Ben's ! lands → elitebook swap drops to a few hundred MB (the 208 MB of real process swap plus change) → close; the signature (rendererBuild.test.ts crossing 300 s while the isolated file greens in ~12 s) recurring after that reopens with the thrash theory falsified.

**Picked up by session at Ben's direction (2026-09-04). Ruled under ADR 0174 — veto anytime.** ## Correction first: the red seam did not run on matou-workstation — it ran on elitebook-03 The host fingerprint in this ticket's own evidence identifies the box: **8 cores** with load quoted against 8, and a **4095 MiB swap 100% exhausted**. Live survey today: - **elitebook-03**: 8 cores, swap exactly **4095/4095 MiB, 0 free** — matches the evidence precisely. - **matou-workstation**: **4 cores** (not 8), and its swapfile has been **8 G since 2026-08-26** (2.9 G used, 5.2 G free today) — it cannot have shown "4095 total / 0 free" on Sep 3. The healer mislabeling elitebook-03 as "matou-workstation" is a known repeat (same conflation in the 2026-09-03 leaked-CI-containers incident); both runners advertise the shared `swarm` float label, so the job lands on either box while the healer narrates one. GOTCHAS #166 (landed with this ruling) makes the fingerprint check the standing rule. ## The deeper cause: elitebook's swap is full of COLD tmpfs pages, not process memory On elitebook-03, the sum of every process's `VmSwap` is **208 MB** — against 4087 MiB of swap used. `/tmp` there is a **7.5 G tmpfs holding 4.3 G** of accumulated residue (1,284 `nix-shell.*` dirs totalling 2.3 G, `heal-repro` 1.1 G, `tz` 295 M, weeks of session artifacts; everything idle per `fuser`). Cold tmpfs pages are what swap holds. With **zero free swap slots**, any memory burst — a seam `nix develop` build plus a sandbox agent (runner capacity 2) plus the standing redis-ha/postgres-ha/garage/webserver containers — leaves the kernel nothing to evict but hot page cache: direct-reclaim thrash, which is exactly why the slowdown was unbounded by the oversubscription factor and why this ticket rightly concluded **no wall-clock budget can be sized against it**. ## Ruling 1. **Adopt: restore and KEEP the swap headroom on elitebook-03.** A guarded cleanup (delete swarm-owned `/tmp` entries ≥2 days old; keeps active work, the pnpm store, other users' files) frees ~3.5 G of tmpfs and with it the swap slots — no swapoff, no hardware. Plus a `tmpfiles.d` age rule (`d /tmp 1777 root root 3d`) so the residue can never re-accumulate to exhaustion. Both are staged; the auto-mode classifier walls remote writes from this session, so they land via Ben's `!` (one line each) — the ticket stays open until that lands and elitebook's swap reads well under 50%. 2. **Reject option 1 (shared `concurrency` group).** Forgejo groups queue pool-wide: the seam would park up to 180 min behind a swarm run even when the *other* host has a free slot — undoing #980's float for every push — and it would not remove the thrash anyway, since the standing containers and session residue are not Forgejo jobs. 3. **Options 2–3 (workstation capacity / headroom): no action.** The box the red actually ran on was not the workstation, and the workstation's swap already has 5.2 G free. Its separate hazard (43 G disk-backed `/tmp` on an 88%-full root disk) is filed on its own. 4. **Reject option 4 (`retry: 1`).** With #1198's isolation making the verdict honest about scope, this seam red is now the pool-health probe itself; tolerance would blind it. The filer's own caveat stands. **Close condition:** Ben's `!` lands → elitebook swap drops to a few hundred MB (the 208 MB of real process swap plus change) → close; the signature (`rendererBuild.test.ts` crossing 300 s while the isolated file greens in ~12 s) recurring after that reopens with the thrash theory falsified.
Owner

The clean landed (Ben's !, 2026-09-04 ~20:5x UTC). Result on elitebook-03:

  • /tmp tmpfs: 4.3 G → 936 M (6,278 stale entries, 3.4 G, removed; ≥2-day swarm-owned policy).
  • Swap: 4087 → 668 MiB used, 3427 MiB free — the thrash amplifier is gone; what remains is the ~200 MB of genuine process swap plus residual shmem, i.e. the predicted floor.
  • Cosmetic residue: /tmp/heal-diag is an empty directory skeleton (0 bytes) — Go marks module-cache dirs read-only, so rm left the empty dirs behind after deleting the contents.

The one open item before close: the keep-it-fixed rule, so the residue can never re-exhaust swap again (this took ~2 weeks to accumulate). As root on elitebook-03:

printf 'd /tmp 1777 root root 3d\n' > /etc/tmpfiles.d/tmp-age.conf && systemctl start systemd-tmpfiles-clean

Once that's in, this closes. The reopen probe stays as stated: rendererBuild.test.ts crossing 300 s while the isolated file greens in ~12 s, with swap headroom present, falsifies the thrash theory.

**The clean landed (Ben's `!`, 2026-09-04 ~20:5x UTC).** Result on elitebook-03: - `/tmp` tmpfs: 4.3 G → **936 M** (6,278 stale entries, 3.4 G, removed; ≥2-day swarm-owned policy). - Swap: 4087 → **668 MiB used, 3427 MiB free** — the thrash amplifier is gone; what remains is the ~200 MB of genuine process swap plus residual shmem, i.e. the predicted floor. - Cosmetic residue: `/tmp/heal-diag` is an empty directory skeleton (0 bytes) — Go marks module-cache dirs read-only, so `rm` left the empty dirs behind after deleting the contents. **The one open item before close:** the keep-it-fixed rule, so the residue can never re-exhaust swap again (this took ~2 weeks to accumulate). As root on elitebook-03: ``` printf 'd /tmp 1777 root root 3d\n' > /etc/tmpfiles.d/tmp-age.conf && systemctl start systemd-tmpfiles-clean ``` Once that's in, this closes. The reopen probe stays as stated: `rendererBuild.test.ts` crossing 300 s while the isolated file greens in ~12 s, with swap headroom present, falsifies the thrash theory.
Owner

Closing — both halves landed and verified live on elitebook-03 (2026-09-04):

  1. The one-shot clean: /tmp 4.3 G → ~950 M, swap 4087 → ~990 MiB used with 3.1 G free (holding steady with a job running on the box).
  2. The standing rule: /etc/tmpfiles.d/tmp-age.conf (d /tmp 1777 root root 3d) is in place and systemd-tmpfiles-clean ran Result=success at 21:59:53 UTC — the residue can no longer re-accumulate to swap exhaustion. Side effect accepted in the ruling above: healer evidence dirs in /tmp now age out after 3 days, so the ticket text remains the durable record (this ticket's own evidence dir had already vanished before the fix).

Reopen condition (unchanged): the signature — rendererBuild.test.ts crossing the 300 s budget while the isolated file greens in ~12 s — recurring with swap headroom present falsifies the thrash theory and reopens this; the next lever would then be runner capacity, per the options above.

**Closing — both halves landed and verified live on elitebook-03 (2026-09-04):** 1. The one-shot clean: `/tmp` 4.3 G → ~950 M, swap 4087 → ~990 MiB used with **3.1 G free** (holding steady with a job running on the box). 2. The standing rule: `/etc/tmpfiles.d/tmp-age.conf` (`d /tmp 1777 root root 3d`) is in place and `systemd-tmpfiles-clean` ran `Result=success` at 21:59:53 UTC — the residue can no longer re-accumulate to swap exhaustion. Side effect accepted in the ruling above: healer evidence dirs in `/tmp` now age out after 3 days, so the ticket text remains the durable record (this ticket's own evidence dir had already vanished before the fix). **Reopen condition** (unchanged): the signature — `rendererBuild.test.ts` crossing the 300 s budget while the isolated file greens in ~12 s — recurring *with swap headroom present* falsifies the thrash theory and reopens this; the next lever would then be runner capacity, per the options above.
ben closed this issue 2026-09-04 22:00:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1207
No description provided.