healer watchdog: one wedged host bills one full investigation per workflow NAME — the degraded signature can never recur, so the ledger brake never fires #2045
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#2045
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-1791547341-3292877, watchdog pass of 2026-10-09 12:02 UTC). The fault is in.sandcastle/heal.sh/heal-lib.sh, which the heal charter forbids me to modify — hence a ticket. Protected path (.sandcastle), soready-for-human.Symptom
One host fault (#2044 —
bens-mac-04reds every job that lands on it) has now billed two complete Opus investigations 52 minutes apart, each arriving as a brand-new incident:Workflow:Signature:…LCuGUGswarm0ff1caf1b642…LiZpkttriage50dc0fb56753Both passes read the same
runs.json, reached the same conclusion, and could repair nothing (another host's state is out of charter). The second pass had no way to know the first existed except by me reading/tmp/matou-heal-*/diagnosis.mdby hand.Cause
signature_for(heal.sh ~line 282–318) degrades when there is no fresh verdict artifact:collect_evidencecorrectly writes theno local evidence for run … another swarm pool hostline intoworker-logs.txt/run-verdict.txtand drops theseam-degradedmarker;no verdict for workflow <w>— keyed on the workflow name alone;runs-on: swarmworkflow, so it mints one distinct signature per workflow name that happens to land on it. In this window that is alreadyswarm+triage, withresume-asks,ciandlanding-tripwireall queued behind the same label.Each signature is new in the ledger, so the recurrence brake that exists precisely to stop re-investigating a known fault cannot engage — the brake keys on the thing the degraded path guarantees will differ. The more workflows the wedged host poisons, the more investigations it buys.
Suggested shape (for the human to rule on)
When the evidence bundle is the no-local-evidence shape (
seam-degradedpresent andworker-logs.txtcarrying the cross-host line), the signature should key on the shape of the gap, not the workflow name — e.g.cross-host no-evidenceplus the repo, so every pool workflow folds into one incident and the second hour is braked instead of re-investigated. The already-open suggestion in #2044 ("a wedged host's alarm must be raised by a different host") is the complementary half: make the alarm reliable, then make it fire once.Also, smaller, same files
The trigger line handed to the diagnosis agent is
watchdog: streak ()— the streak count interpolates empty, in both passes above. Cosmetic, but it is the one number that says how bad the pattern is, and the agent currently cannot read it.Evidence
/tmp/matou-heal-Matou-idss.LiZpktand/tmp/matou-heal-Matou-idss.LCuGUGonmatou-dev-server-01(prompt.txtlines 147–152 in each carry the incident headers quoted above). No repair attempted; no containers started.Third billing, 18:02 UTC — and it shows the brake has two independent leaks, not one.
Workflow:Signature:kind…LCuGUGswarm0ff1caf1b642streak…LiZpkttriage50dc0fb56753streak…qy3y0gswarm0990ca97e6aaalways-redTwo things this pass adds to the cause section:
kindis in the degraded signature too. This pass is the same workflowname (
swarm) as pass 1, so the body's "one signature per workflow name" isan undercount.
handle_incidentis called with"watchdog: $kind ($(error_line "$wf"))", and with the parenthesis empty(degraded path) the whole discriminator is
$kind. A fault that persists longenough to turn a
streakintoalways-red— i.e. exactly a wedged host —mints a second signature per workflow name for free. Ledger confirms it:
0ff1caf1b642and0990ca97e6aaboth carryworkflow=swarm.The per-workflow 6-hour skip is the only brake that was ever holding, and it
expires.
heal.sh:574skips a workflow whose ledger file was touched inside-6 hours;0ff1caf1b642was last written 11:11:14, so it aged out at 17:11and the 18:00 sweep walked straight through. For a fault measured in days that
brake is a rate limit of one investigation per workflow per 6h, not a brake —
with the pool's workflow set (
swarm,triage,resume-asks,ci,landing-tripwire) times two kinds, the ceiling is ~10 Opus investigations per6 hours for one dead box.
The suggested shape in the body (key the degraded signature on the shape of the
gap —
seam-degraded+ the cross-host line — rather than the workflow name) alsocloses leak 1, since it drops
$kindout of the discriminator. Leak 2 needs thecompanion half: once an incident is
ESCALATE: yeswith aready-for-humanticket still open, the cooldown should not expire it back into a fresh
investigation — re-arm on the ticket closing, not on a clock.
Still nothing to repair here (
.sandcastleis a protected path and the charterforbids me editing
heal.sh/heal-lib.sh), so this stays a comment.Also still true: the trigger line reads
watchdog: always-red ().Evidence
/tmp/matou-heal-Matou-idss.qy3y0gonmatou-dev-server-01. No repairattempted; no containers started.
Pass 4 on the same host fault — this ticket's prediction held exactly. The
always-redkind minted5f7b0b1abedcfor the samebens-mac-04wedge that0ff1caf1b642(swarm/streak),50dc0fb56753(triage) and0990ca97e6aaalready paid for, and
heal.sh:574's 6-hour per-workflow skip had aged outagain. Four complete Opus investigations, one fault.
One addition for whoever rules on the shape here: the degraded signature is only
half the cost. The other half is that the bundle carried no fault text for a
cross-host leg, so each pass re-derived a mechanism from durations and SHAs —
and three of the four got it wrong (all recorded "Forgejo serves no job-log
endpoint"). The job log is in fact fetchable with the ordinary repo token, and
it names the fault in one line (
Could not resolve host: git.matou.nz; see#2044 comment 61579). Filed as
Matou/dev-factory#188.Those two fixes compose: a bundle that carries
job-log.txtkeys a realsignature off real fault text, so the degraded workflow-name path this ticket is
about stops being reached for a cross-host fault at all. Worth ruling on
together.
Pass 5, 20:02 UTC —
resume-asks, exactly the third name this ticket listed as queued behind the label.Workflow:Signature:kind…LCuGUGswarm0ff1caf1b642streak…LiZpkttriage50dc0fb56753streak…qy3y0gswarm0990ca97e6aaalways-red…5f7b0b1swarm5f7b0b1abedcalways-red…Rw7myCresume-askse2c0a0a76977streakFive investigations, one DNS failure on one box. Nothing to add to the cause section — the degraded
no verdict for workflow <w>signature behaved as described.Two notes for whoever rules on the shape:
resume-askshas no verdict artifact at all (verdict_pathhas no case for it), so it takes the unwired branch rather than theseam-degradedone. A fix keyed only on "seam-degradedpresent and the cross-host line inworker-logs.txt" would still have billed this pass. The reliable discriminator in this bundle isno-local-evidence.txt, whichcollect_evidencewrites on exactly the cross-host shape and which was present here.watchdog: streak (no verdict for workflow resume-asks)— the empty-streak-count bug in the "Also, smaller" section is still live; the parenthesis carries the error line, not the count.Independently, the per-workflow billing count is itself inflated:
Matou/dev-factory#190 —schedule-backstop.shdispatchesresume-asksevery tick (its guard looks for a job namedresume-asks; the job is namedresume), so 6 sweeps/hour instead of 2 land on the wedged host. Fixing that cuts the reds that tripwatchdog_detectwithout touching the brake.Confirmed again — plus a second, separate defect found in the same ledger
This pass is the behaviour this ticket describes, happening again: the
bens-mac-04wedge (#2044) reddenedtriagetwice (23:05, 23:35 UTC), the signature degraded to the workflow name (seam-degradedmarker present,error_lineempty — the trigger line was literallywatchdog: streak ()),last_seenwas 12 h stale soledger_decidereturnedinvestigate-stale, and a 4th full investigation was billed to one host fault. Nothing in the ticket's analysis needs changing.New sub-defect:
action_is_ticket_onlyreads "no repair" as a repairACTION_CHANGED_REin.sandcastle/heal-lib.sh:171containsrepair|repaired, and the classifier greps the ACTION-TAKEN prose with no notion of negation. So an honest ticket-only outcome that says it made no repair is classified as a repair.Reproducer (read-only, against the shipped lib):
Both ledger entries on this box show the damage. Neither pass repaired anything:
50dc0fb56753repaired=1, noticketede2c0a0a76977repaired=1, noticketed0990ca97e6aaticketed=1,repaired=0✅The third row is the control: phrase the same outcome without the word "repair" and the classifier gets it right.
Why it matters.
repaired=1routes the signature ontoescalate-repaired— the repair loop-breaker, which exists so the healer never repairs the same fault twice. For a fault where nothing was ever repaired, a recurrence inside the cooldown would hit that brake instead ofreply-recurring, so the reply-cap ladder never runs and the recurrence count never builds. That is the exact mis-routing theaction_is_ticket_onlycomment says #79 introduced the classifier to fix, re-entered through prose phrasing. It did not bite this pass only because the 12 h gap made the decisioninvestigate-stalebeforerepairedwas ever read — i.e. the two defects in this ticket have been masking each other.Suggested shape (a human's call,
.sandcastleis protected so I am not touching it): strip negated spans before the CHANGED grep, or require the CHANGED verb not to be immediately preceded byno|not|never|without|nothing. Note that "no code touched" already passes, becausetouchedis not in the verb set — so the blind spot is narrow and the fix can be narrow too.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
publishjobs share one streak bucket — a phantomrelease-publish streakbilled a full investigation #2056/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 #2076Another billed investigation for the same wedged host —
resume-asks, 60 min after the one that filed #2076Healer watchdog pass
heal-Matou-idss-1793214140-3890659(2026-10-28 19:02 UTC), evidence/tmp/matou-heal-Matou-idss.xA7cKPonmatou-dev-server-01.This ticket's symptom table, extended with today's
elitebook-03wedge (#2076). One host fault, one per workflow NAME, exactly as predicted:Workflow:Signature:…F0ij9Pswarm0ff1caf1b642…KfsVTVrelease-publishef220fc58024…S5UNqctriage41b6590dc14b…xA7cKPresume-askse2c0a0a76977My pass read the same
actions/taskstable, pulled the sameno space left on deviceline off runner7e46ef4a, and reached #2076's conclusion independently — one hour after #2076 was already open andready-for-human. The ledger brake could not fire:e2c0a0a76977is keyed onresume-asks, and its only prior sighting was 2026-10-09 (first_seen=1791576171, thebens-mac-04wedge of #2044), so by the ledger this was a 19-day-old signature recurring, not a known-live incident.One concrete sharpener for whoever takes this: the discriminator is cheap and host-local, not workflow-local. Every
swarm-pool job family in my window was bimodal with the same fast mode —resume142-222 s green vs 2-3 s red,triage31 s vs 2-3 s,swarm (elitebook-03)2-3 s on 3/3,publish2-4 s. A watchdog that keyed the signature on the runner id of the failing task (7e46ef4a-5df6-4ea1-b5b8-5800316e2013, already in the first log line of every red) rather than on the workflow name would have collapsed all four passes above into one incident, and the ledger'sescalated=1brake would have silenced passes 2-4.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) #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) #2174One more billed investigation — and this one is the harder case: the signature RECURRED and the brake still did not fire. Watchdog pass of 2026-11-07 17:03 UTC (
heal-Matou-idss-1794071174-2666054, workflowresume-asks, kindstreak, evidence/tmp/matou-heal-Matou-idss.XoNrfT, swarm lockfree). No repair — the fault is in.sandcastle/heal.sh, which the charter forbids me to edit.Prior comments here show the per-workflow-NAME fan-out (one host fault → one distinct signature per
runs-on: swarmworkflow, each arriving as a brand-new incident). Today adds the other half: signaturee2c0a0a76977is not new at all — it is the same signature #2174 was filed under on 2026-11-05 21:17 UTC. It recurred, soledger_decidehad a prior entry to find, and a full Opus pass was billed anyway becauselast_seenwas ~44 h stale →investigate-stale, exactly the path the 2026-10-10 comment describes.So the brake has two independent holes for one wedged host:
no verdict for workflow <w>mints a fresh signature per workflow name, so the recurrence counter never accumulates (documented above);investigate-stalere-bills it on a fixed staleness window with no notion of "this is a known, open,ready-for-humanticket that no agent may fix."The second is the expensive one for a long wedge. #2174 is ~44 h old,
priority+ready-for-human, with 9 healer comments all saying no repair, out of charter. Nothing a heal pass can learn on hour 44 changes what a human has to do, but the stale window guarantees another pass every time it lapses. A ledger entry that carried the filed ticket number and itsready-for-humanstate could short-circuit to comment-only without spending an investigation.Today's tally for the bens-mac-04 wedge (#2174), passes that reached "same fault, nothing new to do":
Workflow:Signature:…1062411swarm0ff1caf1b642…1200740triage50dc0fb56753…2666054resume-askse2c0a0a76977Three names, three signatures, one host fault, one day.
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) #2174