healer: job_ran_here() is repo-scoped, not run-scoped — a fresh swarm lock on the healer host makes every elitebook-03-pinned red report as a local pre-Sandcastle fault (regression of #2048) #2079
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#2079
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?
Filed by the healer (
heal-Matou-idss-1793228556-722259, watchdog pass of 2026-10-28 23:02 UTC, signatureef220fc58024, workflowrelease-publish, evidence/tmp/matou-heal-Matou-idss.sOm6xlonmatou-dev-server-01, swarm lockfree). The fault is in.sandcastle/heal.sh, which the heal charter forbids me to modify — hence a ticket. Protected path (.sandcastle/), soready-for-human.This is a regression of the fix that closed #2048. That fix taught the healer not to blame another pool host when local evidence says the job ran here. The predicate it added is repo-scoped, not workflow- or task-scoped, so it now fires for any recent job of this repo on this host and the healer is told the opposite of the truth.
What happened this pass
The watchdog keyed on
release-publishalways-red.release-publishis pinnedruns-on: elitebook-03and every failing tick ran there (runner7e46ef4a, tasks 258067/258101/258103/258104) — the real fault is #2076,elitebook-03's disk full. Butheal.shwrote this intorun-verdict.txt,worker-logs.txtandno-local-evidence.txt, the three files the charter names as ground truth to read FIRST:Every clause after "but" is false for the run under investigation. The investigation is pointed at a pre-Sandcastle span on
matou-dev-server-01that does not exist.Root cause —
heal.sh:209Both legs answer "did ANY
Matou/idssjob touch this host in the last 2 h?", never "did THIS run's job land here?":/tmp/matou-workdir-Matou-idss.lockmtime was22:45:55Z— theswarmleg (task 258082), 12 min before the 23:02 heal. One shared per-repo lock, so a greenswarmtick on this host vouches for a redrelease-publishtick on another.runner-journal.txthas 10repo is Matou/idsslines (257901 … 258110) and none of them is arelease-publishtask. The grep cannot tell, because the journal line carries only the repo, not the workflow.So on any multi-host repo the predicate is ~always true, and the
elsebranch (#135's honest "ran on another pool host") is effectively dead whenever the healer host also runsswarm.Why it matters
release-publishandreseed-publishare pinned toelitebook-03and the healer never runs there, so every red on those two rails gets this inverted verdict. It cost this pass real work and would have produced a wrong diagnosis without the run's own job log. Combined with #2045 (one wedged host bills one investigation per workflow name), a single dark host now bills repeated Opus passes and each one is handed a misdirection.Suggested fix
Scope the predicate to the run under investigation instead of the repo:
received task <id> of job <name>, which pins both workflow and host. The healer already knowsrun_number, andPOST /Matou/idss/actions/runs/<n>/jobs/0/attempt/1returns the task id and the runner uuid.Worth a unit test in
.sandcastle/tests/pinning the shape: fresh workdir lock + journal with a different workflow's task ⇒ notjob_ran_here./is 100% full (0 bytes free) because /etc/cron.d/swarm-prune still points at the rootless docker socket — every task landing on its runner dies in 1-3s at Set up job, includingswarm-pool triage/resume-asks #2076workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174Live instance 10 days on, and the pool-busy case makes the predicate fire unconditionally. Watchdog pass of 2026-11-07 12:02 UTC (
heal-Matou-idss-1794052978-1200740, signature50dc0fb56753, workflowtriage, evidence/tmp/matou-heal-Matou-idss.1mm7dYonmatou-dev-server-01, swarm lockfree). Still unfixed, still in.sandcastle/heal.shwhich the charter forbids me to edit — no repair, just this datapoint.This pass keyed on
triagerun 61694 / task 281778, whose own job log is unambiguous:That is #2174 on bens-mac-04 — runner
73a6cc98, runner home/home/swarm. This host's runner home is/home/devand/home/swarmdoes not exist here at all.heal.shnevertheless wrote the local claim into all three ground-truth files:The pool-busy case is worse than the filing describes
The filing frames it as "a fresh swarm lock on the healer host" tipping the predicate. But the second signal —
grep -qiE "repo is ($slug|$REPO_TAG)\b"overrunner-journal.txt(heal.sh:318) — is enough on its own whenever this host ran anyMatou/idsstask in the 2-hour window. In this bundle's journal that is five of them:Task 281778 — the one under investigation — is absent (281779/281781/281782 are present; it was never offered to this runner). So on a healthy, busy pool host the predicate returns true for every remote-leg incident, regardless of the lock. The journal line it greps already carries
task <id>, so scoping the grep to the run's own task id rather than the repo slug would be an exact fix for this half.A cheap discriminator while that lands
In this bundle, run duration separates the two hosts perfectly: a pre-step ENOSPC death on bens-mac-04 is 2–8s (22 of them), real work on this host is 34–265s (9 of them), with no overlap. A leg that died in under ~10s cannot have reached
git-setup.sh, let alone a pre-Sandcastle span — so it cannot be the "#2048 shape" the local claim asserts, whatever the journal says.Fired again — and this pass found a one-command disproof the fix could key on. Watchdog pass of 2026-11-07 17:03 UTC (
heal-Matou-idss-1794071174-2666054, signaturee2c0a0a76977, workflowresume-asks, evidence/tmp/matou-heal-Matou-idss.XoNrfTonmatou-dev-server-01, swarm lockfree). Still unfixed, still in.sandcastle/heal.shwhich the charter forbids me to edit — no repair, just this datapoint.The real fault was #2174 (bens-mac-04 ENOSPC at
workflow prepared, run 61813/task 282316).heal.sh:406wrote the opposite into all three ground-truth files:job_ran_here(heal.sh:311) is unconditionally true on this host: the swarm matrix pins anidssleg here every ~7 min, sogrep "repo is Matou/idss"overrunner-journal.txtalways hits. Confirmed in this bundle — the journal shows idss tasks 282283/282292/282301/282338/282344/282354 inside the window, none of them run 61813.The cheap run-scoped signals, both already in the bundle or one command away:
job-log.txtline 1 names the runner UUID that actually took the task —73a6cc98-3960-4a27-ac53-0c3890c73887. This host's.runneris4ff4a71f-283a-41d7-8063-3bd52f91f633(namematou-workstation). A UUID mismatch is proof the leg ran elsewhere, and it needs no journal heuristic at all./home/swarm/.cache/act/…, i.e.$HOME=/home/swarm. On this hostgetent passwd swarmexits 2 — there is noswarmuser,/home/holds onlydevandrestic-bkp, and the runner unit isUser=dev/WorkingDirectory=/home/dev/forgejo-runner. A path under a nonexistent local home cannot be a local fault.Either check would have flipped this pass. (1) is strictly better: it is run-scoped by construction, where the journal grep is only ever repo-scoped.
Unrelated minor in the same bundle:
job-log.txtcarries 20 identical blocks,job 0…job 19, all showing the same single task 282316 — the per-leg fetch loops a fixed leg count over a single-job workflow. Harmless, but it pads the bundle ~20x and reads at a glance like a 20-leg matrix.workflow preparedwith ENOSPC on /home/swarm/.cache/act, so ~1 in 3 pool-label triage/resume-asks/ci ticks reds instantly (#2076 mechanism, second host) #2174Third witnessed instance, this time with the pool host proven to be a different
machine — watchdog pass
heal-Matou-idss-1794178165-1106924(signature41b6590dc14b, workflowtriage, evidence/tmp/matou-heal-Matou-idss.NjySHNon
matou-dev-server-01, swarm lockfree, so the lock-mtime arm was notthe one that fired).
run-verdict.txt,worker-logs.txtandno-local-evidence.txtall read:Every clause after the comma is wrong. The failing run (62391, task 285264) died
at
workflow preparedwithmkdir /home/swarm/.cache/act/15a55bf87b52f9a8: no space left on deviceon runner73a6cc98-3960-4a27-ac53-0c3890c73887— i.e.bens-mac-04(#2174). Disproof from the bundle itself:runner-journal.txthas no task 285264 at all; it jumps 285261 → 285269.73a6cc98…(grep -c→ 0). This host's runner is4ff4a71f-283a-41d7-8063-3bd52f91f633,name: matou-workstation, labelsmatou-workstation:host+swarm:host,HOME=/home/dev./home/swarmdoes not exist on this host, and there is noswarmuser —ls -1 /home/isdev,restic-bkp.The reason the predicate still fired with a free lock is the second arm,
heal.sh:314:matou-workstationis the healthy pool host, so it takes aMatou/idsstaskroughly every four minutes — 10 such lines in this 24-minute journal, none of
them the failing task. Over a 2-hour
RUN_WINDOWthe grep is thereforeunconditionally true on any busy host, which makes the cross-host branch
(
heal.sh:408) effectively dead code on exactly the hosts that gather bundles.Repo-scope is not the only gap: the predicate needs the run's own task id (the
journal prints it) or the runner uuid, both of which are already in
job-log.txt's first line.Flagging because the cost is not cosmetic — the bundle's three highest-trust
files actively assert the opposite of ground truth, and a diagnosis agent that
believes them starts hunting a local pre-Sandcastle fault on a host that never
saw the job. I did not touch
heal.sh(healer charter forbids it).