healer: escalate-repaired pings @ben on every recurrence (no silence latch); filed-ticket counts as repair; hardcoded "on matou-workstation" in post text #79

Closed
opened 2026-08-25 00:52:19 +00:00 by matou-build-agent · 2 comments

Symptom

During the 2026-08-24 evening incident window (dev-factory swarm runs 719, 721, 722, 723, 724…, one every ~2 minutes), the healer pinged @ben on Mattermost with "swarm recurred after a repair attempt (0fd2fa26ccd7) — the healer will not retry" once per red run, indefinitely. The underlying fault is real and already tracked (#77, the claim-next-task.sh 30s prompt-expansion timeout); this ticket is about the healer's own messaging ladder, which turned one known fault into an unbounded @ben ping storm.

Three defects, all in the harness (heal.sh / heal-lib.sh):

1. escalate-repaired has no silence latch

heal.sh (escalate-repaired branch, ~line 315) posts an @ben ping and sets nothing in the ledger. Compare escalate-noisy (~lines 304–309): it says its piece once, sets escalated=1, and every later incident lands in silent.

ledger_decide (heal-lib.sh:98–111) checks repaired=1 before the reply cap, so once a signature is marked repaired, every recurrence inside the cooldown returns escalate-repaired — the reply counter never increments, escalated is never consulted, and each incident refreshes last_seen, so the 6h cooldown (HEAL_COOLDOWN=21600) never expires while reds keep coming. The header comment in heal-lib.sh says the two brakes exist because "escalate-noisy stops it TALKING about the same fault forever" — the repaired branch bypasses that brake entirely.

Evidence: ledger file 0fd2fa26ccd7 on elitebook-03 at incident time — repaired=1, first_seen=1787596840 (~18:40Z), last_seen=1787608600 (~21:56Z), while @ben pings landed at 21:46, 21:48, 21:50, 21:51, 21:55… (Mattermost thread 5s9n6egmztrz58xuq9thtucx7h).

Suggested shape: mirror escalate-noisy — post the "recurred after a repair attempt, will not retry" message once, set a latch (e.g. escalated=1, with the repaired check in ledger_decide falling through to the escalated → silent check), and stay quiet for the rest of the cooldown. The fault stays visible on the thread and in the run history; the ping fires once.

2. A diagnosis-only outcome counts as a "repair attempt"

heal.sh sets repaired=1 whenever the diagnosis's ACTION-TAKEN is anything other than none. On 2026-08-24 18:46 the healer's action was "filed ready-for-agent ticket #77" — no code or config was touched, yet the signature was marked repaired, which is what routed every later recurrence into the (latch-less) escalate-repaired branch instead of the reply-cap ladder.

Filing a ticket is the right action for a product-class fault, but it is not a repair: the recurrence of the fault after it carries no new information ("the fix hasn't landed yet" is already known). A filed-ticket outcome should either not set repaired, or set a distinct state (ticketed=<n>) whose recurrence path is the normal reply-cap ladder (or immediate silence with the thread already pointing at the ticket).

3. Messages hardcode "on matou-workstation"

Both escalate branches (heal.sh:308,315) and the :zzz: downgrade post end with evidence: \$EVIDENCE` on matou-workstation. The 2026-08-24 incidents were healed **on elitebook-03** — every ping's evidence path pointed at a host where the directory does not exist (verified: the /tmp/matou-heal-Matou-dev-factory.*` dirs live on elitebook-03).

This is also a host name baked into a harness file, which the blast-radius rule forbids (no repo names/hosts/product paths in harness files — per-host values come from the identity layer or the environment). Use $(hostname) or an identity-sourced host label.

Acceptance

  • A repaired-then-recurring signature pings @ben at most once per cooldown window; later recurrences inside the window post nothing (or a non-pinging thread reply, matching the escalate-noisy shape).
  • A diagnosis whose only action was filing a ticket does not put the signature on the repaired path.
  • No literal host name in healer post text; the evidence line names the host the healer actually ran on.
  • tests/heal-test.sh (or the heal-lib test) updated in the same commit to pin the latch + the ticketed-is-not-repaired routing.

Context

  • Fault that exposed this: #77 (claim-next-task 30s budget), recurring on every issues: labeled/closed-triggered swarm run while the fleet-monitor DAG (#64–#75) was being worked.
  • The fix is root-source; it reaches the running .sandcastle/ copy only at the next pin bump (GOTCHAS 4).
## Symptom During the 2026-08-24 evening incident window (dev-factory swarm runs 719, 721, 722, 723, 724…, one every ~2 minutes), the healer pinged @ben on Mattermost with "**swarm recurred after a repair attempt** (`0fd2fa26ccd7`) — the healer will not retry" **once per red run, indefinitely**. The underlying fault is real and already tracked (#77, the `claim-next-task.sh` 30s prompt-expansion timeout); this ticket is about the healer's own messaging ladder, which turned one known fault into an unbounded @ben ping storm. Three defects, all in the harness (`heal.sh` / `heal-lib.sh`): ## 1. `escalate-repaired` has no silence latch `heal.sh` (`escalate-repaired` branch, ~line 315) posts an @ben ping and sets **nothing** in the ledger. Compare `escalate-noisy` (~lines 304–309): it says its piece once, sets `escalated=1`, and every later incident lands in `silent`. `ledger_decide` (`heal-lib.sh:98–111`) checks `repaired=1` **before** the reply cap, so once a signature is marked repaired, every recurrence inside the cooldown returns `escalate-repaired` — the reply counter never increments, `escalated` is never consulted, and each incident refreshes `last_seen`, so the 6h cooldown (`HEAL_COOLDOWN=21600`) never expires while reds keep coming. The header comment in `heal-lib.sh` says the two brakes exist because "escalate-noisy stops it TALKING about the same fault forever" — the repaired branch bypasses that brake entirely. Evidence: ledger file `0fd2fa26ccd7` on elitebook-03 at incident time — `repaired=1`, `first_seen=1787596840` (~18:40Z), `last_seen=1787608600` (~21:56Z), while @ben pings landed at 21:46, 21:48, 21:50, 21:51, 21:55… (Mattermost thread `5s9n6egmztrz58xuq9thtucx7h`). **Suggested shape:** mirror escalate-noisy — post the "recurred after a repair attempt, will not retry" message once, set a latch (e.g. `escalated=1`, with the `repaired` check in `ledger_decide` falling through to the `escalated` → `silent` check), and stay quiet for the rest of the cooldown. The fault stays visible on the thread and in the run history; the ping fires once. ## 2. A diagnosis-only outcome counts as a "repair attempt" `heal.sh` sets `repaired=1` whenever the diagnosis's `ACTION-TAKEN` is anything other than `none`. On 2026-08-24 18:46 the healer's action was *"filed ready-for-agent ticket #77"* — no code or config was touched, yet the signature was marked repaired, which is what routed every later recurrence into the (latch-less) `escalate-repaired` branch instead of the reply-cap ladder. Filing a ticket is the right action for a product-class fault, but it is not a repair: the recurrence of the fault after it carries no new information ("the fix hasn't landed yet" is already known). A filed-ticket outcome should either not set `repaired`, or set a distinct state (`ticketed=<n>`) whose recurrence path is the normal reply-cap ladder (or immediate silence with the thread already pointing at the ticket). ## 3. Messages hardcode "on matou-workstation" Both escalate branches (`heal.sh:308,315`) and the `:zzz:` downgrade post end with `evidence: \`$EVIDENCE\` on matou-workstation`. The 2026-08-24 incidents were healed **on elitebook-03** — every ping's evidence path pointed at a host where the directory does not exist (verified: the `/tmp/matou-heal-Matou-dev-factory.*` dirs live on elitebook-03). This is also a host name baked into a harness file, which the blast-radius rule forbids (no repo names/hosts/product paths in harness files — per-host values come from the identity layer or the environment). Use `$(hostname)` or an identity-sourced host label. ## Acceptance - A repaired-then-recurring signature pings @ben at most once per cooldown window; later recurrences inside the window post nothing (or a non-pinging thread reply, matching the escalate-noisy shape). - A diagnosis whose only action was filing a ticket does not put the signature on the repaired path. - No literal host name in healer post text; the evidence line names the host the healer actually ran on. - `tests/heal-test.sh` (or the heal-lib test) updated in the same commit to pin the latch + the ticketed-is-not-repaired routing. ## Context - Fault that exposed this: #77 (claim-next-task 30s budget), recurring on every `issues: labeled/closed`-triggered swarm run while the fleet-monitor DAG (#64–#75) was being worked. - The fix is root-source; it reaches the running `.sandcastle/` copy only at the next pin bump (GOTCHAS 4).
Author
Member

This was generated by AI during triage.

Triage: ready-for-session (already bug)

Ruled by agent under ADR 0174 — veto anytime.

Ruling: ready-for-session, not ready-for-agent, and keep the three defects in one ticket.

The reason is defect 2. The healer's diagnosis contract is declared in the prompt skeleton prompts/heal-prompt.md, whose ACTION-TAKEN vocabulary is literally none | <one line: what you committed/filed/cleaned> — "filed" is inside the free-text arm, which is precisely why heal.sh's [ "$act" != "none" ] test marks a filed ticket as repaired. The honest fix adds a distinct outcome to that fixed vocabulary; docs/agents/triage-labels.md puts every prompt-skeleton edit on the session-only side, and CLAUDE.md calls skeleton changes design work, not mechanical edits (they render into every future worker in every consumer at the next render-prompts). A worker that shipped the alternative — regex-sniffing the free-text ACTION-TAKEN line for "filed"/"ticket" — would be guessing at prose that a future healer session is free to word differently.

Defects 1 and 3 are pure heal.sh/heal-lib.sh and would be agent-workable alone, but splitting them off would put two workers on the same two adjacent blocks (the escalate-* branches and ledger_decide) for no gain.

Why this is a two-way door: a label change, plus changes confined to the healer's messaging ladder — every one revertible by a later commit and provable offline by tests/heal-test.sh / tests/heal-lib-test.sh. If a skeleton edit turns out to be unnecessary, re-label ready-for-agent. Not on the one-way-door list: no credential, no posture widening, no trust accept, no data destruction, no spend. Ben's veto is asynchronous.

Verification — all three defects confirmed at 9e2aaf6

  1. No silence latch. The escalate-repaired branch in heal.sh posts the @ben ping and calls no ledger_set at all — compare the escalate-noisy branch immediately above it, which posts once then sets escalated 1. ledger_decide (heal-lib.sh) tests repaired before the reply cap and before escalated, and returns escalate-repaired unconditionally, so replies never increments and escalated is never consulted. Every incident refreshes last_seen, so the HEAL_COOLDOWN staleness check never fires while reds keep arriving. The storm is unbounded, exactly as reported. The lib header's own claim — that the two brakes exist because "escalate-noisy stops it TALKING about the same fault forever" — is false for this path.
  2. Filed ticket counts as a repair. heal.sh sets repaired 1 on [ -n "$act" ] && [ "$act" != "none" ] && [ -z "$HEAL_DRY_RUN" ], with $act the raw ACTION-TAKEN line. "filed ready-for-agent ticket #77" satisfies it.
  3. Hardcoded host. The literal on matou-workstation appears in four post strings, not two: both escalate branches, the :zzz: OOM downgrade, and the no-diagnosis @ben alarm. This is the blast-radius rule violated in vendored text — CLAUDE.md forbids host names in harness files outright.

Session Brief

Category: bug
Summary: The healer's repaired-recurrence path has no silence latch, a diagnosis-only outcome is misclassified as a repair, and four post strings name a host literally.

Current behavior: Once a signature is marked repaired, every recurrence inside the cooldown re-pings @ben with "recurred after a repair attempt", forever, because the branch sets no state and the decision function short-circuits on repaired before either brake. Filing a ticket sets repaired, so a known-and-tracked product fault routes into that latch-less branch. Every ping's evidence line names one host regardless of where the healer ran.

Desired behavior: A repaired-then-recurring signature pings once per cooldown window and then goes quiet, matching the escalate-noisy shape. A diagnosis whose only action was filing a ticket does not take the repaired path. Evidence lines name the host the healer actually ran on.

Key interfaces:

  • ledger_decide — the ordering of its repaired / reply-cap / escalated checks is the defect. The repaired arm must be able to fall through to the escalated → silent check rather than returning unconditionally. Keep the two brakes conceptually distinct (one stops repairing twice, one stops talking forever); the bug is that the first currently swallows the second.
  • The healer's diagnosis contract in the prompt skeleton — a distinct outcome for "diagnosed and filed a ticket, changed nothing" belongs in the fixed vocabulary, not inferred from free text. Whatever token you add, heal.sh's repaired-gate must key on it explicitly and the skeleton's rendered output must stay reviewable (onboarding/tests/onboard-lib-test.sh cutover-proof fixtures re-proven byte-identical, or deliberately updated with the wording change explained — CLAUDE.md).
  • The ledger's per-signature state (repaired, replies, escalated, last_seen, thread_id) — a new state key is fine; state written by an older healer must not crash a newer one.
  • The host label in post text — derive it ($(hostname)) or source it from the identity layer. Never a literal.

Acceptance criteria:

  • A repaired signature that recurs N times inside one cooldown window produces exactly one @ben ping; subsequent recurrences post nothing (or a non-pinging thread reply, matching escalate-noisy).
  • The fault stays visible — the ticket/thread still carries it; silence is the pinging, not the record.
  • A diagnosis whose only action was filing a ticket does not put the signature on the repaired path; its recurrences follow the normal reply-cap ladder.
  • A genuine code/config repair still sets the repaired state and still refuses a second repair attempt (the loop-breaker must not regress).
  • grep -rn 'matou-workstation' *.sh prompts/ returns nothing; all four post strings name the running host.
  • tests/heal-test.sh and/or tests/heal-lib-test.sh updated in the same commit, pinning both the latch and the ticketed-is-not-repaired routing (repo rule: every lib change updates its test in the same commit).
  • Full offline suite green: for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done

Out of scope:

  • #77 itself (the claim-next-task.sh 30s prompt-expansion budget) — that is the fault that exposed this; this ticket is only the messaging ladder.
  • Redesigning the healer's investigate/repair decision or the HEAL_COOLDOWN / HEAL_MAX_REPLIES values.
  • The :zzz: OOM downgrade's own logic — only its hardcoded host string is in scope.
  • Bumping .sandcastle/FACTORY_REF. This is root-source; it reaches the running self-copy only when a human bumps the pin (GOTCHAS 4). Note that in the close report, do not do it here.
> *This was generated by AI during triage.* ## Triage: `ready-for-session` (already `bug`) **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `ready-for-session`, not `ready-for-agent`, and keep the three defects in **one** ticket. The reason is defect 2. The healer's diagnosis contract is declared in the prompt skeleton `prompts/heal-prompt.md`, whose ACTION-TAKEN vocabulary is literally `none | <one line: what you committed/filed/cleaned>` — "**filed**" is *inside* the free-text arm, which is precisely why `heal.sh`'s `[ "$act" != "none" ]` test marks a filed ticket as repaired. The honest fix adds a distinct outcome to that fixed vocabulary; `docs/agents/triage-labels.md` puts every prompt-skeleton edit on the session-only side, and CLAUDE.md calls skeleton changes design work, not mechanical edits (they render into every future worker in every consumer at the next `render-prompts`). A worker that shipped the alternative — regex-sniffing the free-text ACTION-TAKEN line for "filed"/"ticket" — would be guessing at prose that a future healer session is free to word differently. Defects 1 and 3 are pure `heal.sh`/`heal-lib.sh` and would be agent-workable alone, but splitting them off would put two workers on the same two adjacent blocks (the `escalate-*` branches and `ledger_decide`) for no gain. **Why this is a two-way door:** a label change, plus changes confined to the healer's messaging ladder — every one revertible by a later commit and provable offline by `tests/heal-test.sh` / `tests/heal-lib-test.sh`. If a skeleton edit turns out to be unnecessary, re-label `ready-for-agent`. Not on the one-way-door list: no credential, no posture widening, no trust accept, no data destruction, no spend. Ben's veto is asynchronous. ### Verification — all three defects confirmed at `9e2aaf6` 1. **No silence latch.** The `escalate-repaired` branch in `heal.sh` posts the `@ben` ping and calls **no** `ledger_set` at all — compare the `escalate-noisy` branch immediately above it, which posts once then sets `escalated 1`. `ledger_decide` (`heal-lib.sh`) tests `repaired` **before** the reply cap and before `escalated`, and returns `escalate-repaired` unconditionally, so `replies` never increments and `escalated` is never consulted. Every incident refreshes `last_seen`, so the `HEAL_COOLDOWN` staleness check never fires while reds keep arriving. The storm is unbounded, exactly as reported. The lib header's own claim — that the two brakes exist because "escalate-noisy stops it TALKING about the same fault forever" — is false for this path. 2. **Filed ticket counts as a repair.** `heal.sh` sets `repaired 1` on `[ -n "$act" ] && [ "$act" != "none" ] && [ -z "$HEAL_DRY_RUN" ]`, with `$act` the raw ACTION-TAKEN line. "filed ready-for-agent ticket #77" satisfies it. 3. **Hardcoded host.** The literal `on matou-workstation` appears in **four** post strings, not two: both escalate branches, the `:zzz:` OOM downgrade, and the no-diagnosis `@ben` alarm. This is the blast-radius rule violated in vendored text — CLAUDE.md forbids host names in harness files outright. ## Session Brief **Category:** bug **Summary:** The healer's repaired-recurrence path has no silence latch, a diagnosis-only outcome is misclassified as a repair, and four post strings name a host literally. **Current behavior:** Once a signature is marked repaired, every recurrence inside the cooldown re-pings `@ben` with "recurred after a repair attempt", forever, because the branch sets no state and the decision function short-circuits on `repaired` before either brake. Filing a ticket sets `repaired`, so a known-and-tracked product fault routes into that latch-less branch. Every ping's evidence line names one host regardless of where the healer ran. **Desired behavior:** A repaired-then-recurring signature pings once per cooldown window and then goes quiet, matching the `escalate-noisy` shape. A diagnosis whose only action was filing a ticket does not take the repaired path. Evidence lines name the host the healer actually ran on. **Key interfaces:** - `ledger_decide` — the ordering of its `repaired` / reply-cap / `escalated` checks is the defect. The repaired arm must be able to fall through to the `escalated` → `silent` check rather than returning unconditionally. Keep the two brakes conceptually distinct (one stops *repairing* twice, one stops *talking* forever); the bug is that the first currently swallows the second. - The healer's diagnosis contract in the prompt skeleton — a distinct outcome for "diagnosed and filed a ticket, changed nothing" belongs in the fixed vocabulary, not inferred from free text. Whatever token you add, `heal.sh`'s repaired-gate must key on it explicitly and the skeleton's rendered output must stay reviewable (`onboarding/tests/onboard-lib-test.sh` cutover-proof fixtures re-proven byte-identical, or deliberately updated with the wording change explained — CLAUDE.md). - The ledger's per-signature state (`repaired`, `replies`, `escalated`, `last_seen`, `thread_id`) — a new state key is fine; state written by an older healer must not crash a newer one. - The host label in post text — derive it (`$(hostname)`) or source it from the identity layer. Never a literal. **Acceptance criteria:** - [ ] A repaired signature that recurs N times inside one cooldown window produces exactly **one** `@ben` ping; subsequent recurrences post nothing (or a non-pinging thread reply, matching `escalate-noisy`). - [ ] The fault stays visible — the ticket/thread still carries it; silence is the *pinging*, not the record. - [ ] A diagnosis whose only action was filing a ticket does **not** put the signature on the repaired path; its recurrences follow the normal reply-cap ladder. - [ ] A genuine code/config repair still sets the repaired state and still refuses a second repair attempt (the loop-breaker must not regress). - [ ] `grep -rn 'matou-workstation' *.sh prompts/` returns nothing; all four post strings name the running host. - [ ] `tests/heal-test.sh` and/or `tests/heal-lib-test.sh` updated **in the same commit**, pinning both the latch and the ticketed-is-not-repaired routing (repo rule: every lib change updates its test in the same commit). - [ ] Full offline suite green: `for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done` **Out of scope:** - #77 itself (the `claim-next-task.sh` 30s prompt-expansion budget) — that is the fault that *exposed* this; this ticket is only the messaging ladder. - Redesigning the healer's investigate/repair decision or the `HEAL_COOLDOWN` / `HEAL_MAX_REPLIES` values. - The `:zzz:` OOM downgrade's own logic — only its hardcoded host string is in scope. - Bumping `.sandcastle/FACTORY_REF`. This is root-source; it reaches the running self-copy only when a human bumps the pin (GOTCHAS 4). Note that in the close report, do not do it here.
Author
Member

Close report — landed on main as 583e28e

All three defects fixed at the root source, one commit, tests red before green.
Full offline suite green (69 files), clean tree.

1. escalate-repaired had no silence latch. ledger_decide read
repaired above the reply cap, so every recurrence inside the cooldown
returned escalate-repaired, the reply counter never moved, escalated was
never consulted, and each incident refreshed last_seen — the window could not
expire while reds kept coming. The escalated latch is now read first,
above both ladders (heal-lib.sh ledger_decide), and the branch sets it
(heal.sh), mirroring escalate-noisy: say it once, then quiet for the rest of
the window. The post now also says it is going quiet, so the silence that
follows is not read as the healer dying.

Also fixed on the way, because "at most once per cooldown window" needs it: a
new window (investigate-stale) clears the previous window's ladder state
(replies, escalated). Without that, a latch set once would have outlived its
window and turned "once per window" into "once ever". repaired is deliberately
not cleared there — a signature that was genuinely repaired once keeps the
loop-breaker armed across windows, which is the pre-existing "never repair
twice" contract. Ruled by agent under ADR 0174 — veto anytime.

2. A filed ticket counted as a repair. New pure classifier
action_is_ticket_only in heal-lib.sh: an ACTION-TAKEN line is ticket-only iff
it names a filing (filing verb + a ticket noun or a bare #N) and names no verb
that changed something — so filed ready-for-agent ticket #77 is ticket-only,
filed ticket #77 and restarted the runner is a repair. Such an outcome is
recorded as ticketed=<n> and leaves repaired=0, so recurrences ride the
normal reply-cap ladder (three replies → one escalation → silence), and each
reply says "a ticket is already filed for this fault — recurrence expected until
the fix lands" instead of a bare "still failing".

Judgement call, on the record: the classifier is a heuristic over agent prose,
and I chose it over adding a field to the diagnosis output contract because a
prompt-skeleton change is fleet-wide blast radius and a consumer whose rendered
prompt lags the pin would silently emit no new field. Both misreadings are now
bounded — it only ever picks which bounded ladder speaks, never whether the
healer can storm. Ruled by agent under ADR 0174 — veto anytime.

3. Hardcoded on matou-workstation. All four post sites (both escalations,
the :zzz: downgrade, the no-diagnosis alert) now name HEAL_EVIDENCE_HOST
(SWARM_HOST → hostname). Probe-first, deliberately diverging from
rehearsal-report.sh's #51 chain: heal.sh runs on the bare host, so hostname
is ground truth, whereas RUNNER_HOST declares the ONE host a repo nominates —
exactly the value that sent every 2026-08-24 evidence path to a box the
directory does not exist on. SWARM_HOST still wins when set, so the evidence
line and the claim/commit identity agree. No host literal remains in heal.sh /
heal-lib.sh (the historical note names "one product's workstation", the #51
precedent).

Proof

  • tests/heal-lib-test.sh (19 groups): the latch above repaired; an
    unlatched repaired signature still escalates once; the latch holds for the
    rest of the window and does not survive cooldown expiry; a 13-case
    ticket-only classifier table.
  • tests/heal-test.sh (14 scenarios): end-to-end, three recurrences after a
    repaired escalation post nothing and re-ping nobody, and the ledger carries
    escalated=1; a ticketed fault over 8 runs produces exactly 3 replies, 1
    escalation, 3 silences and exactly one @ben ping, never taking the
    repaired path, with ticketed=1/repaired=0 in the ledger; a genuine repair
    still marks repaired=1; the escalation reads on box1 under
    SWARM_HOST=box1 and no output contains a host literal.
  • Manual drive of the ticketed ladder on this host (SWARM_HOST=elitebook-03)
    reproduced the same sequence, evidence line included.

Also in the commit

The suite could not prove any of this at first: tests/heal-test.sh inherited
limit-lib.sh's host-global claude markers, so on a genuinely limit-parked
host (this one, at session start) every agent-path scenario bailed at the #253
limit gate and the file read as a code red at its first assertion — before my
changes, on clean main. The markers are now pinned into $work in every run
helper, matching the #586 ambient-token scrub one level in. Recorded as GOTCHAS
29; the ping-storm class itself as GOTCHAS 28.

STATUS.md header + the Own swarm row updated in the same commit.

Residue

The fix is root-source: it reaches this repo's own running .sandcastle/ copy
(and every consumer) only when a human bumps the pin —
bash onboarding/onboard.sh vendor .sandcastle <sha> (GOTCHAS 4). Until then
the live healer still runs the old ladder. #77 itself (the claim-next-task.sh
30s prompt-expansion budget) is untouched and stays open.

## Close report — landed on `main` as `583e28e` All three defects fixed at the root source, one commit, tests red before green. Full offline suite green (69 files), clean tree. **1. `escalate-repaired` had no silence latch.** `ledger_decide` read `repaired` **above** the reply cap, so every recurrence inside the cooldown returned `escalate-repaired`, the reply counter never moved, `escalated` was never consulted, and each incident refreshed `last_seen` — the window could not expire while reds kept coming. The `escalated` latch is now read **first**, above both ladders (`heal-lib.sh` `ledger_decide`), and the branch sets it (`heal.sh`), mirroring `escalate-noisy`: say it once, then quiet for the rest of the window. The post now also says it is going quiet, so the silence that follows is not read as the healer dying. Also fixed on the way, because "at most once per cooldown window" needs it: a new window (`investigate-stale`) clears the previous window's ladder state (`replies`, `escalated`). Without that, a latch set once would have outlived its window and turned "once per window" into "once ever". `repaired` is deliberately **not** cleared there — a signature that was genuinely repaired once keeps the loop-breaker armed across windows, which is the pre-existing "never repair twice" contract. Ruled by agent under ADR 0174 — veto anytime. **2. A filed ticket counted as a repair.** New pure classifier `action_is_ticket_only` in `heal-lib.sh`: an ACTION-TAKEN line is ticket-only iff it names a filing (filing verb + a ticket noun or a bare `#N`) and names no verb that changed something — so `filed ready-for-agent ticket #77` is ticket-only, `filed ticket #77 and restarted the runner` is a repair. Such an outcome is recorded as `ticketed=<n>` and leaves `repaired=0`, so recurrences ride the normal reply-cap ladder (three replies → **one** escalation → silence), and each reply says "a ticket is already filed for this fault — recurrence expected until the fix lands" instead of a bare "still failing". Judgement call, on the record: the classifier is a heuristic over agent prose, and I chose it over adding a field to the diagnosis output contract because a prompt-skeleton change is fleet-wide blast radius and a consumer whose rendered prompt lags the pin would silently emit no new field. Both misreadings are now bounded — it only ever picks **which** bounded ladder speaks, never whether the healer can storm. Ruled by agent under ADR 0174 — veto anytime. **3. Hardcoded `on matou-workstation`.** All four post sites (both escalations, the `:zzz:` downgrade, the no-diagnosis alert) now name `HEAL_EVIDENCE_HOST` (`SWARM_HOST` → `hostname`). Probe-**first**, deliberately diverging from `rehearsal-report.sh`'s #51 chain: `heal.sh` runs on the bare host, so `hostname` is ground truth, whereas `RUNNER_HOST` declares the ONE host a repo nominates — exactly the value that sent every 2026-08-24 evidence path to a box the directory does not exist on. `SWARM_HOST` still wins when set, so the evidence line and the claim/commit identity agree. No host literal remains in `heal.sh` / `heal-lib.sh` (the historical note names "one product's workstation", the #51 precedent). ### Proof - `tests/heal-lib-test.sh` (19 groups): the latch above `repaired`; an **unlatched** repaired signature still escalates once; the latch holds for the rest of the window and does not survive cooldown expiry; a 13-case ticket-only classifier table. - `tests/heal-test.sh` (14 scenarios): end-to-end, three recurrences after a repaired escalation post nothing and re-ping nobody, and the ledger carries `escalated=1`; a ticketed fault over 8 runs produces exactly 3 replies, 1 escalation, 3 silences and **exactly one** `@ben` ping, never taking the repaired path, with `ticketed=1`/`repaired=0` in the ledger; a genuine repair still marks `repaired=1`; the escalation reads `on box1` under `SWARM_HOST=box1` and no output contains a host literal. - Manual drive of the ticketed ladder on this host (`SWARM_HOST=elitebook-03`) reproduced the same sequence, evidence line included. ### Also in the commit The suite could not prove any of this at first: `tests/heal-test.sh` inherited `limit-lib.sh`'s **host-global** claude markers, so on a genuinely limit-parked host (this one, at session start) every agent-path scenario bailed at the #253 limit gate and the file read as a code red at its first assertion — before my changes, on clean `main`. The markers are now pinned into `$work` in every run helper, matching the #586 ambient-token scrub one level in. Recorded as GOTCHAS 29; the ping-storm class itself as GOTCHAS 28. `STATUS.md` header + the Own swarm row updated in the same commit. ### Residue The fix is root-source: it reaches this repo's own running `.sandcastle/` copy (and every consumer) only when a human bumps the pin — `bash onboarding/onboard.sh vendor .sandcastle <sha>` (GOTCHAS 4). Until then the live healer still runs the old ladder. #77 itself (the `claim-next-task.sh` 30s prompt-expansion budget) is untouched and stays open.
matou-build-agent 2026-08-26 00:06:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#79
No description provided.