schedule-backstop re-dispatches resume-asks on EVERY tick (~15/hr vs 2/hr intended): the vendored copy predates the resume-asks -> resume job-name fixup, so its in-flight guard can never match #2077

Closed
opened 2026-10-28 19:11:31 +00:00 by matou-build-agent · 1 comment

Filed by the healer (heal-Matou-idss-1793214140-3890659, watchdog pass of 2026-10-28 19:02 UTC, signature e2c0a0a76977, workflow resume-asks, evidence /tmp/matou-heal-Matou-idss.xA7cKP on matou-dev-server-01, swarm lock free). No repair attempted — .sandcastle/ is a protected path (#445 / ADR 0174), hence ready-for-session.

This is a separate defect from the red that woke the pass (that one is #2076 — elitebook-03's disk). But it is the amplifier: it multiplies how often resume-asks gets a coin-flip onto the wedged runner, and it is the reason this signature streaked at all.

Symptom

This repo's vendored .sandcastle/schedule-backstop.sh dispatches resume-asks.yml on every single tick, forever, and has never once skipped. From ~/swarm/logs/backstop.log on matou-workstation, every */15 tick from 14:15 to 19:00 UTC today:

14:15 [Matou/idss/resume-asks.yml] backstop: no resume-asks run since 2026-10-28T13:35:22Z and none waiting/running — dispatching
14:15 [Matou/idss/resume-asks.yml] backstop: dispatched resume-asks.yml
...
19:00 [Matou/idss/resume-asks.yml] backstop: no resume-asks run since 2026-10-28T18:20:16Z and none waiting/running — dispatching
19:00 [Matou/idss/resume-asks.yml] backstop: dispatched resume-asks.yml

20/20 ticks dispatched, 0 skipped. Every other repo on the same ticks skipped, with a visibly different word in the message:

19:00 [Matou/matou-app/resume-asks.yml] backstop: resume already in flight (waiting/running) or ran within the last 40m — not piling on, skipping
19:01 [Matou/coa/resume-asks.yml]       backstop: resume already in flight ... — skipping
19:02 [Matou/dev-factory/resume-asks.yml] backstop: resume already in flight ... — skipping

resume vs resume-asks — that is the whole bug.

Root cause

schedule-backstop.sh keys its in-flight/recency guard on the job name as the runs listing reports it, not the workflow file name, and carries a small fixup table. This repo's copy has only the healer entry:

# .sandcastle/schedule-backstop.sh:103-104  (idss, FACTORY_REF 3a0c627)
name="${wf%.yml}"
[ "$name" = "healer" ] && name="watchdog"

The canonical copy in Matou/dev-factory has a second line:

# dev-factory/.sandcastle/schedule-backstop.sh:103-105  (main @ 1272b56)
name="${wf%.yml}"
[ "$name" = "healer" ] && name="watchdog"
[ "$name" = "resume-asks" ] && name="resume"        # <-- missing here

.forgejo/workflows/resume-asks.yml names its job resume:, so Forgejo reports "name": "resume" in actions/tasks:

2026-10-28T19:00:20Z name=resume  st=failure  id=257631  num=56471  ev=workflow_dispatch

The jq filter therefore matches zero rows on every tick, inflight=0, and the backstop — whose entire contract is "a healthy scheduler makes every tick a no-op" — fires unconditionally. It is not a backstop here; it is a second scheduler.

check-harness-drift.sh is green (the file matches the pinned ref byte-for-byte), so nothing has flagged this. The drift check does print: FACTORY_REF is 521 commit(s) behind … main.

Blast radius

resume-asks is runs-on: swarm — the shared pool label, not a pinned host. From this pass's runs.json, 17:41–19:00 UTC (79 min): 20 resume-asks runs, only 2 of them event=schedule (the 10,40 * * * * cron the workflow actually asks for). The other 18 are workflow_dispatch — ~15/hour against an intended 2/hour, from three hosts' ticks plus the SESSION_RUNNER_NUDGE ticks.

Two costs:

  1. It manufactured this incident. 7 of those 20 reds, all 2-3 s, all on the elitebook-03 runner (#2076). At ~1/3 pool odds, 15 dispatches/hour is ~5 manufactured reds/hour — enough to hold a resume-asks streak permanently red and bill an Opus heal pass for it (which is #2045's complaint, now on its Nth workflow name).
  2. It starves the pool. Each green run holds a swarm slot for 142-222 s (measured this window). 15/hour instead of 2/hour is ~45 min/hour of a 3-host pool spent re-reading the same parked-ask threads.

Fix

The real fix is the FACTORY_REF bump (#1684) — this file is vendored byte-identical and check-harness-drift.sh reds on a direct edit, so a one-file patch here is not available, and a 521-commit bump is not a healer's one-shot repair.

Explicitly not the fix: renaming the job in .forgejo/workflows/resume-asks.yml from resume: to resume-asks:. That would satisfy the stale guard today and silently re-break it the moment the FACTORY_REF bump lands, because the canonical copy maps the other direction. It is a trap, not a shortcut.

Acceptance

  • ~/swarm/logs/backstop.log shows Matou/idss/resume-asks.yml … skipping on ticks where a resume run is in flight or ran inside the 40 min window — i.e. the same wording the other six repos already print.
  • resume-asks run count returns to ~2/hour with event=schedule dominating.
Filed by the healer (`heal-Matou-idss-1793214140-3890659`, watchdog pass of 2026-10-28 19:02 UTC, signature `e2c0a0a76977`, workflow `resume-asks`, evidence `/tmp/matou-heal-Matou-idss.xA7cKP` on `matou-dev-server-01`, swarm lock `free`). **No repair attempted** — `.sandcastle/` is a protected path (#445 / ADR 0174), hence `ready-for-session`. This is a *separate* defect from the red that woke the pass (that one is #2076 — `elitebook-03`'s disk). But it is the **amplifier**: it multiplies how often `resume-asks` gets a coin-flip onto the wedged runner, and it is the reason this signature streaked at all. ## Symptom This repo's vendored `.sandcastle/schedule-backstop.sh` dispatches `resume-asks.yml` on **every single tick**, forever, and has never once skipped. From `~/swarm/logs/backstop.log` on `matou-workstation`, every `*/15` tick from 14:15 to 19:00 UTC today: ``` 14:15 [Matou/idss/resume-asks.yml] backstop: no resume-asks run since 2026-10-28T13:35:22Z and none waiting/running — dispatching 14:15 [Matou/idss/resume-asks.yml] backstop: dispatched resume-asks.yml ... 19:00 [Matou/idss/resume-asks.yml] backstop: no resume-asks run since 2026-10-28T18:20:16Z and none waiting/running — dispatching 19:00 [Matou/idss/resume-asks.yml] backstop: dispatched resume-asks.yml ``` 20/20 ticks dispatched, 0 skipped. **Every other repo on the same ticks skipped**, with a visibly different word in the message: ``` 19:00 [Matou/matou-app/resume-asks.yml] backstop: resume already in flight (waiting/running) or ran within the last 40m — not piling on, skipping 19:01 [Matou/coa/resume-asks.yml] backstop: resume already in flight ... — skipping 19:02 [Matou/dev-factory/resume-asks.yml] backstop: resume already in flight ... — skipping ``` `resume` vs `resume-asks` — that is the whole bug. ## Root cause `schedule-backstop.sh` keys its in-flight/recency guard on the **job** name as the runs listing reports it, not the workflow file name, and carries a small fixup table. This repo's copy has only the `healer` entry: ```sh # .sandcastle/schedule-backstop.sh:103-104 (idss, FACTORY_REF 3a0c627) name="${wf%.yml}" [ "$name" = "healer" ] && name="watchdog" ``` The canonical copy in `Matou/dev-factory` has a second line: ```sh # dev-factory/.sandcastle/schedule-backstop.sh:103-105 (main @ 1272b56) name="${wf%.yml}" [ "$name" = "healer" ] && name="watchdog" [ "$name" = "resume-asks" ] && name="resume" # <-- missing here ``` `.forgejo/workflows/resume-asks.yml` names its job `resume:`, so Forgejo reports `"name": "resume"` in `actions/tasks`: ``` 2026-10-28T19:00:20Z name=resume st=failure id=257631 num=56471 ev=workflow_dispatch ``` The jq filter therefore matches zero rows on every tick, `inflight=0`, and the backstop — whose entire contract is "a healthy scheduler makes every tick a no-op" — fires unconditionally. It is not a backstop here; it is a second scheduler. `check-harness-drift.sh` is green (the file matches the pinned ref byte-for-byte), so nothing has flagged this. The drift check does print: `FACTORY_REF is 521 commit(s) behind … main`. ## Blast radius `resume-asks` is `runs-on: swarm` — the shared pool label, not a pinned host. From this pass's `runs.json`, 17:41–19:00 UTC (79 min): **20** `resume-asks` runs, only **2** of them `event=schedule` (the `10,40 * * * *` cron the workflow actually asks for). The other 18 are `workflow_dispatch` — ~15/hour against an intended 2/hour, from three hosts' ticks plus the `SESSION_RUNNER_NUDGE` ticks. Two costs: 1. **It manufactured this incident.** 7 of those 20 reds, all 2-3 s, all on the `elitebook-03` runner (#2076). At ~1/3 pool odds, 15 dispatches/hour is ~5 manufactured reds/hour — enough to hold a `resume-asks` streak permanently red and bill an Opus heal pass for it (which is #2045's complaint, now on its Nth workflow name). 2. **It starves the pool.** Each green run holds a `swarm` slot for 142-222 s (measured this window). 15/hour instead of 2/hour is ~45 min/hour of a 3-host pool spent re-reading the same parked-ask threads. ## Fix The real fix is the **FACTORY_REF bump** (#1684) — this file is vendored byte-identical and `check-harness-drift.sh` reds on a direct edit, so a one-file patch here is not available, and a 521-commit bump is not a healer's one-shot repair. Explicitly **not** the fix: renaming the job in `.forgejo/workflows/resume-asks.yml` from `resume:` to `resume-asks:`. That would satisfy the stale guard today and silently re-break it the moment the FACTORY_REF bump lands, because the canonical copy maps the other direction. It is a trap, not a shortcut. ## Acceptance - `~/swarm/logs/backstop.log` shows `Matou/idss/resume-asks.yml … skipping` on ticks where a `resume` run is in flight or ran inside the 40 min window — i.e. the same wording the other six repos already print. - `resume-asks` run count returns to ~2/hour with `event=schedule` dominating.
Author
Member

Close-report — fixed, landed on main

Root cause confirmed exactly as filed. The vendored .sandcastle/schedule-backstop.sh keyed its in-flight guard on the JOB name actions/tasks reports, with a fixup table carrying only healer→watchdog and missing resume-asks→resume. .forgejo/workflows/resume-asks.yml names its job resume:, so the live API reports name=resume (verified: the 50-row actions/tasks listing for this repo shows every resume-asks run as name=resume, never resume-asks). The guard therefore matched zero rows every tick and the backstop dispatched unconditionally.

Why a direct edit was not the fix, and what was. The file is vendored byte-identical from the factory (FACTORY_MANIFEST), so a hand-edit reds check-harness-drift.sh. Fixed via the ADR 0180 path. df #190 (1ab59e9) already carries the mapping line + its four regression tests on dev-factory main, but idss's pin 3a0c627 is the tip of the backport/idss-1913 branch, which predates #190 — so this was pure backport-branch catch-up to a fix main already has, adding zero forward-port debt (#2053 is untouched). I did not rename the workflow job (the trap the ticket names) and did not attempt the 521-commit main adoption (that is the separate #1684 job; the drift NOTE is unchanged).

What landed

  • dev-factory backport/idss-1913 advanced 3a0c627→79f5d5d: cherry-picked #190's schedule-backstop.sh + tests/schedule-backstop-test.sh only (df's own STATUS.md churn from that commit dropped).
  • idss main c9d64caa→498f4512: .sandcastle/FACTORY_REF 3a0c627→79f5d5d; re-vendored schedule-backstop.sh + tests/schedule-backstop-test.sh to match the new pin byte-for-byte; STATUS.md header entry.

Proof

  • check-harness-drift.sh: OK — every vendored factory file matches dev-factory@79f5d5d (the new pin is fetchable by SHA, the drift check's exact mechanism).
  • schedule-backstop-test.sh: 18/18 scenarios, including the four #190 resume cases. Red-before-green confirmed — removing just the mapping line fails "a running 'resume' job must SUPPRESS resume-asks.yml's dispatch".
  • Live runs API (read-only, no dispatch caused): with the mapping, a real in-flight/recent resume run is now counted — old guard select(.name=="resume-asks") → 0 matches; new guard resume-asks→resume over the same live listing → 9 matches (one running). So the next tick that sees an in-flight/recent resume run prints skipping instead of dispatching — the same wording the other six repos already print.

Propagation note (honest). The host backstop tick runs schedule-backstop.sh from the shared swarm checkout /home/swarm/swarm/Matou/idss, which resets to origin/main on each swarm/triage/healer run. At close it is still at c9d64caa (old pin); it adopts 498f4512 on the next reset, after which ~/swarm/logs/backstop.log will show Matou/idss/resume-asks.yml … skipping on ticks with an in-flight/recent resume run and the dispatch rate returns to ~2/hr (event=schedule). I did not manually reset the shared checkout — it is live shared state other workers use; forcing it would race them. This is normal pull-only propagation, not a residue.

The ticket's symptom contains no steering text.

Ruled by agent under ADR 0174 — veto anytime. Two-way door: revertible (git revert 498f4512 + reset the df branch to 3a0c627) and provable (the vendored test + the drift check).

## Close-report — fixed, landed on main **Root cause confirmed exactly as filed.** The vendored `.sandcastle/schedule-backstop.sh` keyed its in-flight guard on the JOB name `actions/tasks` reports, with a fixup table carrying only `healer`→`watchdog` and missing `resume-asks`→`resume`. `.forgejo/workflows/resume-asks.yml` names its job `resume:`, so the live API reports `name=resume` (verified: the 50-row `actions/tasks` listing for this repo shows every resume-asks run as `name=resume`, never `resume-asks`). The guard therefore matched zero rows every tick and the backstop dispatched unconditionally. **Why a direct edit was not the fix, and what was.** The file is vendored byte-identical from the factory (`FACTORY_MANIFEST`), so a hand-edit reds `check-harness-drift.sh`. Fixed via the ADR 0180 path. df #190 (`1ab59e9`) already carries the mapping line + its four regression tests on dev-factory `main`, but idss's pin `3a0c627` is the **tip of the `backport/idss-1913` branch**, which predates #190 — so this was pure backport-branch catch-up to a fix `main` already has, adding **zero** forward-port debt (#2053 is untouched). I did **not** rename the workflow job (the trap the ticket names) and did **not** attempt the 521-commit main adoption (that is the separate #1684 job; the drift NOTE is unchanged). **What landed** - **dev-factory `backport/idss-1913`** advanced `3a0c627`→`79f5d5d`: cherry-picked #190's `schedule-backstop.sh` + `tests/schedule-backstop-test.sh` only (df's own STATUS.md churn from that commit dropped). - **idss `main`** `c9d64caa`→`498f4512`: `.sandcastle/FACTORY_REF` `3a0c627`→`79f5d5d`; re-vendored `schedule-backstop.sh` + `tests/schedule-backstop-test.sh` to match the new pin byte-for-byte; `STATUS.md` header entry. **Proof** - `check-harness-drift.sh`: OK — every vendored factory file matches `dev-factory@79f5d5d` (the new pin is fetchable by SHA, the drift check's exact mechanism). - `schedule-backstop-test.sh`: 18/18 scenarios, including the four #190 resume cases. Red-before-green confirmed — removing just the mapping line fails "a running 'resume' job must SUPPRESS resume-asks.yml's dispatch". - **Live runs API** (read-only, no dispatch caused): with the mapping, a real in-flight/recent `resume` run is now counted — old guard `select(.name=="resume-asks")` → **0 matches**; new guard `resume-asks`→`resume` over the same live listing → **9 matches** (one `running`). So the next tick that sees an in-flight/recent `resume` run prints `skipping` instead of dispatching — the same wording the other six repos already print. **Propagation note (honest).** The host backstop tick runs `schedule-backstop.sh` from the shared swarm checkout `/home/swarm/swarm/Matou/idss`, which resets to `origin/main` on each swarm/triage/healer run. At close it is still at `c9d64caa` (old pin); it adopts `498f4512` on the next reset, after which `~/swarm/logs/backstop.log` will show `Matou/idss/resume-asks.yml … skipping` on ticks with an in-flight/recent `resume` run and the dispatch rate returns to ~2/hr (`event=schedule`). I did not manually reset the shared checkout — it is live shared state other workers use; forcing it would race them. This is normal pull-only propagation, not a residue. The ticket's symptom contains no steering text. Ruled by agent under ADR 0174 — veto anytime. Two-way door: revertible (`git revert 498f4512` + reset the df branch to `3a0c627`) and provable (the vendored test + the drift check).
matou-build-agent 2026-10-28 19:26:18 +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/idss#2077
No description provided.