healer.yml watchdog is pinned to one host — render it per host or move it to the cron backstop #214

Closed
opened 2026-10-15 02:59:37 +00:00 by ben · 1 comment
Owner

Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against main at 3e50274.

Symptom

healer.yml runs-on: matou-workstation (the hourly watchdog, the swarm's only independent failure detector). If that host is down there is no watchdog for ANY repo, and hook-mode healers on other hosts only see their own evidence (heal.sh:251-258). ci.yml is pinned to the same host for log-reachability (GOTCHAS 1), compounding the SPOF.

Proposed change

  • Render the watchdog leg per enrolled host like swarm.yml (onboard.sh workflows), with the first host to win a short flock doing the sweep; OR move the watchdog into the ADR 0004 managed cron block beside scheduler-canary.sh (which already runs host-side), keeping healer.yml as workflow_dispatch only.
  • Either way the healer stamps the executing host (#135 already does for swarm).

Acceptance

  • Template + this repo's rendered copy + self-workflows-drift-test.sh updated; GOTCHAS entry.
_Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against `main` at 3e50274._ ## Symptom `healer.yml` `runs-on: matou-workstation` (the hourly watchdog, the swarm's only independent failure detector). If that host is down there is no watchdog for ANY repo, and hook-mode healers on other hosts only see their own evidence (`heal.sh:251-258`). `ci.yml` is pinned to the same host for log-reachability (GOTCHAS 1), compounding the SPOF. ## Proposed change - Render the watchdog leg per enrolled host like `swarm.yml` (`onboard.sh workflows`), with the first host to win a short flock doing the sweep; OR move the watchdog into the ADR 0004 managed cron block beside `scheduler-canary.sh` (which already runs host-side), keeping `healer.yml` as `workflow_dispatch` only. - Either way the healer stamps the executing host (#135 already does for swarm). ## Acceptance - Template + this repo's rendered copy + `self-workflows-drift-test.sh` updated; GOTCHAS entry.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

  • Ruling: wontfix (already addressed at the harness layer; proposed mechanism is a deliberately-rejected design). Reopen anytime if the narrow consumer-layer tradeoff below is worth revisiting.
  • Why this is a two-way door: closing is reversible by a label change, and the disposition is provable by the template + the documented ruling + the drift-test exemption cited below. Not on the one-way-door list.

Closing as wontfix — the concern is already addressed at the harness layer, and the proposed mechanism is a deliberately-rejected design.

The watchdog is not pinned in the template. healer.yml.tmpl renders runs-on to the pool label {{SWARM_RUNNER_LABEL}} (swarm), exactly like triage.yml, resume-asks.yml, and ci.yml. A single pool-label leg goes to whichever enrolled host polls first, so a down host does not blind the factory — another host runs the hourly sweep. This is an explicit decision in onboard_render_workflows (onboarding/onboard-lib.sh): "There is deliberately no per-host label for harness-only flows: pinning the watchdog or CI to one machine … leaves the factory blind when it is down (Ben's ruling 2026-08-22, matou-app)." That rationale is verbatim the SPOF this ticket raises.

The premise is backwards. swarm.yml is the only per-host-rendered workflow (matrix.host over {{SWARM_HOST_LABELS}}), and it is per-host for a CAPACITY reason that does not apply here (GOTCHAS 62: a busy host polls, takes a pool leg, and throws it away on the workdir lock while an idle host gets nothing — a slot-stealing problem). A detection sweep has no slot to steal; rendering it per host would make every host run the same hourly sweep, duplicating tickets and burning tokens. So the watchdog is in the majority of pool-label flows, not the odd one out.

The matou-workstation you saw is this repo's own copy, not the template. .forgejo/workflows/healer.yml is a deliberate per-repo divergence (onboarding/tests/self-workflows-drift-test.sh explicitly exempts healer.yml and ci.yml from the drift ratchet), the same log-reachability family as ci.yml's pin (GOTCHAS 1). Whether this repo should un-pin its healer back to the pool label is a narrow consumer-layer operational choice that trades GOTCHAS 1 log-reachability against the SPOF — not a harness render change. If the operators want to revisit that single tradeoff, reopen or file a tightly-scoped follow-up; this ticket as framed (template defect / render per host) does not survive.

Implementation to read: onboarding/onboard-lib.sh (the two-label design and its rationale), onboarding/templates/workflows/healer.yml.tmpl, and swarm.yml.tmpl (why swarm alone is per-host).

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** - **Ruling:** `wontfix` (already addressed at the harness layer; proposed mechanism is a deliberately-rejected design). Reopen anytime if the narrow consumer-layer tradeoff below is worth revisiting. - **Why this is a two-way door:** closing is reversible by a label change, and the disposition is provable by the template + the documented ruling + the drift-test exemption cited below. Not on the one-way-door list. Closing as wontfix — the concern is already addressed at the harness layer, and the proposed mechanism is a deliberately-rejected design. **The watchdog is not pinned in the template.** `healer.yml.tmpl` renders `runs-on` to the pool label `{{SWARM_RUNNER_LABEL}}` (`swarm`), exactly like `triage.yml`, `resume-asks.yml`, and `ci.yml`. A single pool-label leg goes to whichever enrolled host polls first, so a down host does not blind the factory — another host runs the hourly sweep. This is an explicit decision in `onboard_render_workflows` (`onboarding/onboard-lib.sh`): *"There is deliberately no per-host label for harness-only flows: pinning the watchdog or CI to one machine … leaves the factory blind when it is down (Ben's ruling 2026-08-22, matou-app)."* That rationale is verbatim the SPOF this ticket raises. **The premise is backwards.** `swarm.yml` is the *only* per-host-rendered workflow (`matrix.host` over `{{SWARM_HOST_LABELS}}`), and it is per-host for a CAPACITY reason that does not apply here (GOTCHAS 62: a busy host polls, takes a pool leg, and throws it away on the workdir lock while an idle host gets nothing — a slot-stealing problem). A detection sweep has no slot to steal; rendering it per host would make every host run the same hourly sweep, duplicating tickets and burning tokens. So the watchdog is in the majority of pool-label flows, not the odd one out. **The `matou-workstation` you saw is this repo's own copy, not the template.** `.forgejo/workflows/healer.yml` is a deliberate per-repo divergence (`onboarding/tests/self-workflows-drift-test.sh` explicitly exempts healer.yml and ci.yml from the drift ratchet), the same log-reachability family as ci.yml's pin (GOTCHAS 1). Whether *this repo* should un-pin its healer back to the pool label is a narrow consumer-layer operational choice that trades GOTCHAS 1 log-reachability against the SPOF — not a harness render change. If the operators want to revisit that single tradeoff, reopen or file a tightly-scoped follow-up; this ticket as framed (template defect / render per host) does not survive. Implementation to read: `onboarding/onboard-lib.sh` (the two-label design and its rationale), `onboarding/templates/workflows/healer.yml.tmpl`, and `swarm.yml.tmpl` (why swarm alone is per-host).
matou-build-agent 2026-10-15 03:17:38 +00:00
  • closed this issue
  • added the
    wontfix
    label
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#214
No description provided.