ci: heavy swarm jobs run with no host-capacity slot — adopt matou-app's host-slot-wait.sh (matou-app#285 / #268 rollout) #135
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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: swarmwith no host-capacity slot:seam(ci.yml:24). Theswarmlabel is a shared 8-core pool (matou-workstation + elitebook-03). On 2026-09-02 idssseamforked ~15 vitest workers, host load reached 25/8 with swap 100 % exhausted, and a matou-app swarm worker died withWorktreeTimeoutError(agit worktree addtook >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
.sandcastle/host-slot-wait.shfrom Matou/matou-app (main) into this repo's.sandcastle/— it is repo-local there (NOT in FACTORY_MANIFEST) and depends only on the vendoredhost-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..forgejo/workflows/ci.yml, wrap the heavy command of each swarm job above asbash .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.ymlchecksjob for the exact shape and comments). Raisetimeout-minutesto cover the camp (matou-app uses 105 = 2×30 min camp + checks).Acceptance
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.shstays green (no vendored file edited).Re-routed to the session lane by a sandcastle agent iteration (run 3074) — not blocked on a decision, blocked on who is allowed to make the edit.
Why an agent iteration cannot do this ticket
Every part of #135 lands in a protected path:
.sandcastle/host-slot-wait.sh.forgejo/workflows/ci.ymlUnder the repo's standing Rule 9,
.sandcastle/and.forgejo/are protected: a before/after tree-fingerprint wraps each agent run and rolls back and fails the run for any protected path it creates, deletes, or changes. So a sandcastle agent physically cannot land this — the fingerprint would revert both files. There is no non-protected slice to "continue without it"; the whole ticket is a harness/machinery change.Rule 9's prescription for a needed machinery change is the session lane (
ready-for-session), which is the mechanism permitted to edit protected paths. I did not file a duplicate issue because #135 already fully specifies the change (copy matou-app's byte-identicalhost-slot-wait.sh, wrap theseamheavy step asbash .sandcastle/host-slot-wait.sh 1800 <cmd>, raisetimeout-minutesto cover the 1800 s camp).Label change
ready-for-agentready-for-sessionNo
agent-workinglabel orswarm-claimcomment was present, so there is no claim to release. A session can pick this up as-is.Landed by the idle landing sweep (#114): this agent PR was green but its worker left no close-report — killed after opening the PR. The sweep merged it;
closes #135closes the issue.Close-report — verified landed and green (advances #135)
The two-way-door work for #135 is on
mainand proven. This session found it already merged (PR #137, commit88fabbf) but the issue left open — the PR'scloses #135keyword never fired, so the runner re-picked it. Nothing further to build; verifying and closing.What landed
.sandcastle/host-slot-wait.sh— copied byte-identical fromMatou/matou-appmain(3116 bytes;diffagainst the live raw file is clean), repo-local (NOT inFACTORY_MANIFEST), depends only on the already-vendoredhost-capacity-lib.sh. A later promotion into the factory core stays a no-op..forgejo/workflows/ci.yml— theseamjob's whole heavy block (pnpm install --frozen-lockfile/pnpm -r typecheck/pnpm -r test) now runs asbash .sandcastle/host-slot-wait.sh 1800 bash -c '…': ONE pooled slot, bounded 1800 s camp, then give up loudly (exit 75) rather than co-run. Event-driven job, so a camp (not a yield) is correct — a yield would lose the run.timeout-minutesraised 30 → 60 to cover the camp.ci.yml,host-slot-wait.sh,STATUS.md—swarm.yml/triage.yml/resume-asks.ymluntouched (they already take slots inside the vendored scripts).Proof (acceptance)
host-slot-wait.sh(bounded 1800 s) — with both pool slots busy the job waits, not co-runs.bash .sandcastle/check-harness-drift.sh→ OK (exit 0), no vendored file edited.ci / seamgreen on the PR (run 3143) and on the post-merge push tomain(run 3162).Commits:
88fabbf(seam), merge2546fc4(PR #137).Ruled by agent under ADR 0174 — veto anytime. Proven by the byte-diff, the drift check, and the two green seam runs above.