healer watchdog: watchdog_run_url ignores run status, so the bundle fetches the IN-FLIGHT run's job log — the publish rails' real fault text is unreachable by construction #2182
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#2182
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?
Found by the healer while diagnosing watchdog incident
34d79489ef32(reseed-publish always-red, attempt 9, 2026-11-09 18:03Z). The incident's own root cause is already filed (#2073 x #2074, compounded by #2057 / #2076) — this ticket is about the evidence bundle being structurally unable to carry the fault text for exactly the workflows that overrun their ceiling.Symptom
heal.sh:879handscollect_job_logsthe output ofwatchdog_run_url:watchdog_detect(heal-lib.sh:206) filters to completed runs —select(.status == "success" or .status == "failure")— so the signature is keyed on the failures.watchdog_run_url(heal-lib.sh:239) applies no status filter at all:It returns the highest
run_numberfor the workflow regardless of status. So the bundle fetches the job log of a run that is still running, and gets the checkout prologue with no fault text in it.Proof from this incident's bundle
runs.jsonforreseed-publish:watchdog_detectsaw 62194/62191/62187/62184 — four of four failures — and emittedalways-red.job-log.txtin the bundle is headed:i.e. run 62294, the in-flight one. Its content ends at
git remote add originwith no error, because the run had not failed yet. Fetching 62194's log by hand (same URL shape, substituting the run number) gives the actual decisive text: the log stops mid-checkout at 17:30:08Z and emits nothing for the remaining 13.6 min of the job — thefetch --pruneof all refs burning thetimeout-minutes: 20ceiling.Why this is systematic, not a race
It is guaranteed for every workflow whose runs outlive their cron interval.
reseed-publishfires every 10 min withcancel-in-progress: false, and each run takes 16-22 min. There is therefore always a queued-or-running run with a higherrun_numberthan the newest completed one. For the two publish rails the watchdog can never reach a failing run's log — which is why #2057 sat for 17 days diagnosed from durations rather than logs.release-publish(cron every 10 min, 30-min ceiling) has the same shape.Suggested fix
Give
watchdog_run_urlthe samestatuspredicatewatchdog_detectuses, and prefer the newest failure — that is the run the signature was keyed on:Reading
.statusinto the projection and sorting failures first keeps theinvestigate-stale/streakcases intact.scripts/tests/has no coverage forwatchdog_run_urlagainst a mixed running/failedruns.json— worth a case there, since the function is pure and offline-testable.Secondary, same bundle
collect_job_logsprobes legs 0..HEAL_JOB_LOG_MAX_LEGS-1and appends every 2xx. For a single-job workflow this Forgejo serves the same job-0 log at every leg index, 200 each time, sojob-log.txtends up holding 20 byte-identical copies of the same 3.2 KB prologue — 99,940 of the bundle's ~100 KB, and 20 x 30 s of worst-case curl budget. Cheap guard: skip appending a leg whose body is byte-identical to one already written.Not touched
.sandcastle/is a protected dir andheal-lib.shis one of the three files the heal charter forbids the healer from editing, so this is filed rather than repaired. No repair was attempted for the parent incident either.