ci: heavy swarm jobs run with no host-capacity slot — adopt matou-app's host-slot-wait.sh (matou-app#285 / #268 rollout) #1230

Closed
opened 2026-09-04 23:51:38 +00:00 by ben · 2 comments
Owner

Rollout of Matou/matou-app#268 to this repo, from the shared-runner starvation incident in Matou/matou-app#285.

Problem

This repo's heavy ci jobs run runs-on: swarm with no host-capacity slot: seam (ci.yml:27, pnpm -r run test — forks ~15 vitest workers), publish (ci.yml:80) and publish-broker (ci.yml:115). The swarm label is a shared 8-core pool (matou-workstation + elitebook-03). On 2026-09-02 idss seam forked ~15 vitest workers, host load reached 25/8 with swap 100 % exhausted, and a matou-app swarm worker died with WorktreeTimeoutError (a git worktree add took >30 s). matou-app's own heavy jobs already ride a pooled slot (bash .sandcastle/host-slot-wait.sh 1800 <cmd>), so its discipline cannot bound host load while sibling jobs don't.

Ask

  1. Copy .sandcastle/host-slot-wait.sh from Matou/matou-app (main) into this repo's .sandcastle/ — it is repo-local there (NOT in FACTORY_MANIFEST) and depends only on the vendored host-capacity-lib.sh, which this repo already has. Keep the file byte-identical to matou-app's so a later promotion into the factory core is a no-op.
  2. In .forgejo/workflows/ci.yml, wrap the heavy command of each swarm job above as bash .sandcastle/host-slot-wait.sh 1800 <existing command> (one pooled slot, bounded 1800 s camp, then give up with a clear message — see the matou-app ci.yml checks job for the exact shape and comments). Raise timeout-minutes to cover the camp (matou-app uses 105 = 2×30 min camp + checks).
  3. Do not touch swarm.yml / triage.yml / resume-asks.yml — those take slots inside the vendored scripts already.

Acceptance

  • Each listed job's heavy step runs under host-slot-wait.sh; with both pool slots busy the job waits (up to 1800 s) rather than co-running.
  • bash .sandcastle/check-harness-drift.sh stays green (no vendored file edited).
  • ci green on the PR.
Rollout of Matou/matou-app#268 to this repo, from the shared-runner starvation incident in Matou/matou-app#285. ## Problem This repo's heavy ci jobs run `runs-on: swarm` with **no host-capacity slot**: `seam` (ci.yml:27, `pnpm -r run test` — forks ~15 vitest workers), `publish` (ci.yml:80) and `publish-broker` (ci.yml:115). The `swarm` label is a shared 8-core pool (matou-workstation + elitebook-03). On 2026-09-02 idss `seam` forked ~15 vitest workers, host load reached 25/8 with swap 100 % exhausted, and a matou-app swarm worker died with `WorktreeTimeoutError` (a `git worktree add` took >30 s). matou-app's own heavy jobs already ride a pooled slot (`bash .sandcastle/host-slot-wait.sh 1800 <cmd>`), so its discipline cannot bound host load while sibling jobs don't. ## Ask 1. Copy `.sandcastle/host-slot-wait.sh` from Matou/matou-app (`main`) into this repo's `.sandcastle/` — it is repo-local there (NOT in FACTORY_MANIFEST) and depends only on the vendored `host-capacity-lib.sh`, which this repo already has. Keep the file byte-identical to matou-app's so a later promotion into the factory core is a no-op. 2. In `.forgejo/workflows/ci.yml`, wrap the heavy command of each swarm job above as `bash .sandcastle/host-slot-wait.sh 1800 <existing command>` (one pooled slot, bounded 1800 s camp, then give up with a clear message — see the matou-app ci.yml `checks` job for the exact shape and comments). Raise `timeout-minutes` to cover the camp (matou-app uses 105 = 2×30 min camp + checks). 3. Do not touch swarm.yml / triage.yml / resume-asks.yml — those take slots inside the vendored scripts already. ## Acceptance - Each listed job's heavy step runs under `host-slot-wait.sh`; with both pool slots busy the job waits (up to 1800 s) rather than co-running. - `bash .sandcastle/check-harness-drift.sh` stays green (no vendored file edited). - ci green on the PR.

Handed off to ready-for-session — this ticket is entirely a protected-path change.

Per CLAUDE.md Rule 9, .sandcastle/ and .forgejo/ are protected: they are the machinery that judges a Sandcastle run, and the before/after protected-paths guard (#445) rolls back any change an agent makes to them and fails the run loud. Every deliverable in this issue lands inside one of those trees, with no accompanying non-protected work:

  1. Copy .sandcastle/host-slot-wait.sh — creates a new file under .sandcastle/ (protected).
  2. Wrap the heavy step of seam / publish / publish-broker in .forgejo/workflows/ci.yml — edits .forgejo/ (protected).
  3. Raise timeout-minutes in the same .forgejo/workflows/ci.yml — edits .forgejo/ (protected).

There is no slice an agent can build outside the protected trees, so a Sandcastle iteration cannot complete this without being rolled back. Under ADR 0174 a protected .sandcastle//.forgejo/ machinery change needs an interactive session's standing (#445), not an autonomous swarm worker.

What a session must do

Run the three edits above as an interactive session (byte-identical host-slot-wait.sh copy from Matou/matou-app@main, wrap the three swarm jobs via host-slot-wait.sh 1800 <cmd>, bump timeout-minutes per the matou-app checks shape), then confirm bash .sandcastle/check-harness-drift.sh stays green and ci passes on the PR.

No code changed by this run — the guard forbids it. Swapping ready-for-agent → ready-for-session and releasing the swarm claim.

Handed off to `ready-for-session` — this ticket is entirely a **protected-path** change. Per CLAUDE.md Rule 9, `.sandcastle/` and `.forgejo/` are protected: they are the machinery that judges a Sandcastle run, and the before/after protected-paths guard (#445) rolls back any change an agent makes to them and fails the run loud. Every deliverable in this issue lands inside one of those trees, with no accompanying non-protected work: 1. **Copy `.sandcastle/host-slot-wait.sh`** — creates a new file under `.sandcastle/` (protected). 2. **Wrap the heavy step of `seam` / `publish` / `publish-broker` in `.forgejo/workflows/ci.yml`** — edits `.forgejo/` (protected). 3. **Raise `timeout-minutes`** in the same `.forgejo/workflows/ci.yml` — edits `.forgejo/` (protected). There is no slice an agent can build outside the protected trees, so a Sandcastle iteration cannot complete this without being rolled back. Under ADR 0174 a protected `.sandcastle/`/`.forgejo/` machinery change needs an interactive session's standing (#445), not an autonomous swarm worker. ## What a session must do Run the three edits above as an interactive session (byte-identical `host-slot-wait.sh` copy from `Matou/matou-app@main`, wrap the three swarm jobs via `host-slot-wait.sh 1800 <cmd>`, bump `timeout-minutes` per the matou-app `checks` shape), then confirm `bash .sandcastle/check-harness-drift.sh` stays green and ci passes on the PR. _No code changed by this run — the guard forbids it. Swapping `ready-for-agent` → `ready-for-session` and releasing the swarm claim._

Close-report — #1230 landed and proven

Ruled by agent under ADR 0174 — veto anytime. Closing a done+proven ticket is a two-way door (reopenable; the fix is revertible config and is proven by ci on main).

The deliverables landed on main in 570306bc (ci: #1230 — seam/publish/publish-broker now ride a pooled host-capacity slot (matou-app#268/#285 rollout)), authored by a prior session-runner that died before posting this report. This session verified the landed work against every acceptance criterion; nothing further was needed.

What landed (.forgejo/workflows/ci.yml + .sandcastle/host-slot-wait.sh)

  1. .sandcastle/host-slot-wait.sh copied from Matou/matou-app@main — new repo-local file (not in FACTORY_MANIFEST), depends only on the already-vendored host-capacity-lib.sh. Byte-identical to matou-app's main copy (3116 bytes, diff empty), so a later promotion into the factory core is a no-op.
  2. Each heavy swarm job's command wrapped as bash .sandcastle/host-slot-wait.sh 1800 <cmd> — seam (ci.yml:57), publish (ci.yml:127), publish-broker (ci.yml:207, wrapping only the go build — the no-op paths exit before ever camping). One pooled slot, bounded 1800 s camp, then gives up loudly (exit 75) rather than co-running.
  3. timeout-minutes raised to cover the 30-min camp: seam 30→60, publish →50, publish-broker →50.
  4. swarm.yml / triage.yml / resume-asks.yml untouched — they take slots inside the vendored scripts already.

Proof (acceptance criteria)

  • Heavy step runs under host-slot-wait.sh — verified in ci.yml at the three line numbers above; with both pool slots busy the job camps (≤1800 s) instead of co-running.
  • bash .sandcastle/check-harness-drift.sh stays green — exit 0 this session (OK — every vendored factory file matches …@1ff3485f; the FACTORY_REF "3 commits behind" line is an explicit NOTE, not a failure). No vendored file was edited.
  • ci green — commit 570306bc combined status on main = success (ci / seam, ci / publish, ci / publish-broker, ci / deploy-broker all success). Current main HEAD d4c6a5fe is also green, so the wrapper has since ridden multiple real main pushes without regression.

No one-way door touched (no secrets, no posture change, no data destruction). Closing.

## Close-report — #1230 landed and proven **Ruled by agent under ADR 0174 — veto anytime.** Closing a done+proven ticket is a two-way door (reopenable; the fix is revertible config and is proven by ci on main). The deliverables landed on `main` in **`570306bc`** (`ci: #1230 — seam/publish/publish-broker now ride a pooled host-capacity slot (matou-app#268/#285 rollout)`), authored by a prior session-runner that died before posting this report. This session verified the landed work against every acceptance criterion; nothing further was needed. ### What landed (`.forgejo/workflows/ci.yml` + `.sandcastle/host-slot-wait.sh`) 1. **`.sandcastle/host-slot-wait.sh` copied from `Matou/matou-app@main`** — new repo-local file (not in FACTORY_MANIFEST), depends only on the already-vendored `host-capacity-lib.sh`. **Byte-identical** to matou-app's `main` copy (3116 bytes, `diff` empty), so a later promotion into the factory core is a no-op. 2. **Each heavy swarm job's command wrapped as `bash .sandcastle/host-slot-wait.sh 1800 <cmd>`** — `seam` (ci.yml:57), `publish` (ci.yml:127), `publish-broker` (ci.yml:207, wrapping only the go build — the no-op paths exit before ever camping). One pooled slot, bounded 1800 s camp, then gives up loudly (exit 75) rather than co-running. 3. **`timeout-minutes` raised** to cover the 30-min camp: `seam` 30→60, `publish` →50, `publish-broker` →50. 4. **swarm.yml / triage.yml / resume-asks.yml untouched** — they take slots inside the vendored scripts already. ### Proof (acceptance criteria) - **Heavy step runs under `host-slot-wait.sh`** — verified in ci.yml at the three line numbers above; with both pool slots busy the job camps (≤1800 s) instead of co-running. - **`bash .sandcastle/check-harness-drift.sh` stays green** — exit 0 this session (`OK — every vendored factory file matches …@1ff3485f`; the FACTORY_REF "3 commits behind" line is an explicit NOTE, not a failure). No vendored file was edited. - **ci green** — commit `570306bc` combined status on `main` = **success** (`ci / seam`, `ci / publish`, `ci / publish-broker`, `ci / deploy-broker` all success). Current `main` HEAD `d4c6a5fe` is also green, so the wrapper has since ridden multiple real main pushes without regression. No one-way door touched (no secrets, no posture change, no data destruction). Closing.
matou-build-agent 2026-09-05 03:45:56 +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#1230
No description provided.