harness: the in-sandbox alive-runs cap (20s, 0 retries) is below the forge's actions/tasks?limit=100 p95 (6-25s measured) — a healthy-but-slow read reds the swarm tick (run 59171) #2149
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2149
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?
Symptom
swarmrun 59171 (elitebook-03) REDed at stagesandcastle run (workers):rc 28 is curl's own "operation timed out". The harness is behaving exactly as
designed (idss#1425: a faulted required read fails LOUD). The fault is the
bound, not the loudness.
Root cause — a bound that no longer clears the endpoint's p95
claim_alive_runs(claim-lib.sh:100) reads/actions/tasks?limit=100&page=1. In the sandbox that read gets:CLAIM_ALIVE_MAX_TIME=20→CLAIM_API_MAX_TIME=20(claim-next-task.sh:74, 90)CLAIM_ALIVE_RETRIES=0(claim-next-task.sh:80) — single attempt by design,because the whole expansion lives under the library's hard-coded 30 s
PROMPT_EXPANSION_TIMEOUT_MS.Live probe from elitebook-03, 2026-11-04 ~04:15 UTC, same token, 8 samples of
actions/tasks?limit=100&page=1— all http=200, i.e. healthy, just slow:Control, same minutes:
issues?limit=1= 1.49 / 1.62 / 1.95 s. The forge isfine; this one Actions read is the heavy leg, and it scales with
limit(
limit=20measured 3.30 / 5.64 / 6.27 s).So the p95 of the one endpoint the prefetch must read sits at ~25 s against a
20 s cap with zero retries: roughly 1 in 8 ticks reds. This is verbatim
failure mode (b) FAIL-CLOSED ON HEALTHY, already documented at
claim-next-task.sh:60-70 — the 20 s value was chosen in #1279 to clear the
then-measured p95, and forge latency has since grown past it.
Why no healer repair was possible
claim-next-task.shandclaim-lib.share factory-vendored(
.sandcastle/FACTORY_MANIFESTlines 13-14, ADR 0180). A hand-edit heretrips
check-harness-drift.shandgit-hooks/pre-pushemitsDRIFT_BLOCK.The fix must land in
Matou/dev-factoryand arrive as aFACTORY_REFbump.CLAIM_ALIVE_MAX_TIME/CLAIM_API_MAX_TIME/CLAIM_ALIVE_RETRIESappear nowhere in.forgejo/,run-swarm.shorenv-allowlist-lib.sh.Expanding shell expressions donelegs are already 17.1 / 17.2 / 17.9 / 20.2 s(worker-logs, 02:53-03:37), and the 30 s library budget cannot be
overridden for a shell expression. A 25 s cap would convert rc 28 into the
worse
PromptExpansionTimeoutError.The ruling this needs
Three candidate fixes, each with a correctness cost a human should weigh:
30 s budget.
run-swarm.shalready mirrors read-only host signals at/run/host-signals/(fleet-pick,run-landing, drive-yield); analive-runssnapshot could join them and the prefetch would do zeroActions reads. Cost: the claim-lib header's timing invariant (b) — "a run is
visible in /actions/tasks for MINUTES before its first claim post, while a
snapshot is only seconds stale" — must be re-verified against the added
staleness, since arbitration rests on it.
limit=100to ~20-30. Measured 3-4x faster and fits the cap.Cost:
/actions/tasksis newest-first, so a live run beyond the newest Ntasks would read as dead → double-claim. Needs a proof of the bound, not a
guess.
overlaps the 12 s lister leg, so the only slack left is the claim walk's
CLAIM_NEXT_DEADLINE=26. Probably insufficient on its own.Same class as #2036 (a transient Forgejo read blip reds the whole triage tick,
no retry, no verdict seam) — the pattern is the harness depending on a
single un-retried forge read inside a hard ceiling.
Evidence
/tmp/matou-heal-Matou-idss.sZn7gL(signaturef99e8b1c38d7)run-verdict.txt,job-log.txt:129-130,worker-logs.txt$FORGEJO_APIat-m 10gavehttp=000,git.matou.nzroot was fine, and-m 30succeeded. Four consecutive ticks (02:53, 02:58, 03:08, 03:37)claimed nothing while the lister showed 7+ ready tickets.
Healer, run 59423 (signature
f99e8b1c38d7, 2026-11-04T05:43:49Z): third recurrence of this fault. Measurements and a verified one-line fix — a server-sidestatus=running&status=waitingfilter on theactions/tasksread, which takes it from 13.9-23.7s to 2.6-3.6s and is output-identical — are on #2150, the ticket holding this signature. Consolidating there; this one is the same defect seen from run 59171.