schedule-backstop guard reads only PICKED jobs (actions/tasks) — a queued run is invisible, so a stalled runner turns the backstop into a 4x dispatch flood (2026-10-15, 1h45m global lag) #289

Closed
opened 2026-10-20 07:15:03 +00:00 by ben · 6 comments
Owner

Symptom. 2026-10-15 03:24Z–05:38Z the matou-workstation forgejo-runner silently fetched no tasks (no journal lines, no restart; it had 502s from the forge at 00:53Z). From ~04Z the host backstop on matou-workstation dispatched every tick: backstop.log 04Z = 101 dispatches / 15 skips (normal 24 / 92), 05Z = 88 / 28 — about 4x the run rate across all eight repos the tick serves. Forgejo 15 (15.0.5) serves every repo from ONE oldest-first queue (GetAvailableJobsForRunner: task_id=0 AND status=waiting, Asc(updated,id), no limit), so the flood became a 1h45m lag for everything (coa runs created 04:27Z started 06:09Z; 04:57Z → 06:42Z) that only drained by ~11Z. An unrelated Matou/coa-builds release build dispatched at 05:33Z waited in that line (run 43).

Cause. schedule-backstop.sh's #238 in-flight guard reads actions/tasks?limit=50&page=1. A task row exists only once a runner has PICKED the job (CreateTaskForRunner) — a run still queued behind a stalled/saturated runner has no task row at all, so the tasks view reads "idle" precisely when the queue is deepest, and the guard re-dispatches on every tick (crontab */15 + SESSION_RUNNER_NUDGE every 10 min x 5 repos). The "status":"waiting" task rows the #238 test scenarios feed are a shape the live forge does not produce. Same mechanism as the idss #878/#103 "2,700 no-op runs" mode the scheduler-canary header describes — the canary reads runs?status=waiting; the backstop beside it did not.

Fix (PR to follow). A second, fail-closed read of runs?status=waiting&limit=50&page=1 — the one runs read the ratchet (tests/actions-endpoint-test.sh) admits — suppresses the dispatch when a run of THIS workflow file (.workflow_id) is queued. Keyed on the workflow file, not the job name: a run queues as a whole, and an unpicked per-host leg says the pool cannot take more right now. Tests: four new scenarios in tests/schedule-backstop-test.sh (queued run suppresses even with an idle tasks view; another workflow's queued run does not; .workflow_id keying for resume-asks; failed read skips). GOTCHAS 78.

Not in this ticket: a liveness restart for a runner that stops fetching (the ignition); the coa-builds wait is only a symptom. Consumers get the fix at their next FACTORY_REF bump + re-vendor, and the host checkouts the tick calls (~/swarm/Matou/<repo>/.sandcastle/schedule-backstop.sh) must pull it.

**Symptom.** 2026-10-15 03:24Z–05:38Z the `matou-workstation` forgejo-runner silently fetched no tasks (no journal lines, no restart; it had 502s from the forge at 00:53Z). From ~04Z the host backstop on matou-workstation dispatched every tick: `backstop.log` 04Z = **101 dispatches / 15 skips** (normal 24 / 92), 05Z = 88 / 28 — about 4x the run rate across all eight repos the tick serves. Forgejo 15 (`15.0.5`) serves every repo from ONE oldest-first queue (`GetAvailableJobsForRunner`: `task_id=0 AND status=waiting`, `Asc(updated,id)`, no limit), so the flood became a **1h45m lag** for everything (coa runs created 04:27Z started 06:09Z; 04:57Z → 06:42Z) that only drained by ~11Z. An unrelated `Matou/coa-builds` release build dispatched at 05:33Z waited in that line (run 43). **Cause.** `schedule-backstop.sh`'s #238 in-flight guard reads `actions/tasks?limit=50&page=1`. A task row exists only once a runner has PICKED the job (`CreateTaskForRunner`) — a run still queued behind a stalled/saturated runner has no task row at all, so the tasks view reads "idle" precisely when the queue is deepest, and the guard re-dispatches on every tick (crontab `*/15` + `SESSION_RUNNER_NUDGE` every 10 min x 5 repos). The `"status":"waiting"` task rows the #238 test scenarios feed are a shape the live forge does not produce. Same mechanism as the idss #878/#103 "2,700 no-op runs" mode the scheduler-canary header describes — the canary reads `runs?status=waiting`; the backstop beside it did not. **Fix (PR to follow).** A second, fail-closed read of `runs?status=waiting&limit=50&page=1` — the one runs read the ratchet (`tests/actions-endpoint-test.sh`) admits — suppresses the dispatch when a run of THIS workflow file (`.workflow_id`) is queued. Keyed on the workflow file, not the job name: a run queues as a whole, and an unpicked per-host leg says the pool cannot take more right now. Tests: four new scenarios in `tests/schedule-backstop-test.sh` (queued run suppresses even with an idle tasks view; another workflow's queued run does not; `.workflow_id` keying for resume-asks; failed read skips). GOTCHAS 78. **Not in this ticket:** a liveness restart for a runner that stops fetching (the ignition); the `coa-builds` wait is only a symptom. Consumers get the fix at their next `FACTORY_REF` bump + re-vendor, and the host checkouts the tick calls (`~/swarm/Matou/<repo>/.sandcastle/schedule-backstop.sh`) must pull it.
ben self-assigned this 2026-10-20 07:15:03 +00:00

This was generated by AI during triage.

Triage ruling — ready-for-agent

Category: bug (already applied) · State: ready-for-agent

Ruled by agent under ADR 0174 — veto anytime

The call. Routing this to ready-for-agent rather than ready-for-human,
despite a real design tension the fix must navigate (below). This is a
two-way door: the change is a code edit to a root harness script and its
offline test, fully revertible by a later commit, and the intended behaviour
is pinned by the four new test scenarios the ticket specifies. It is none of
the one-way-door residues (no personal credentials, no security-posture
widening, no member-facing trust accept, no data destruction, no non-routine
spend). What proves it: tests/schedule-backstop-test.sh (the four new
scenarios) plus the existing tests/actions-endpoint-test.sh ratchet, both
offline (shimmed curl, no network).

Path check. schedule-backstop.sh is a root harness file — not a prompt
skeleton, not under .sandcastle/, not .forgejo/ (the only protected
paths). So this is swarm-worker work, not ready-for-session. The
landing-pr label stays: the worker lands via a PR a human merges, worked
alone in its run.

Verification — CONFIRMED

Read the current schedule-backstop.sh in-flight guard: it reads
actions/tasks?limit=50&page=1, then its jq select treats a run as
in-flight on status == "waiting" OR "running" OR a run_started_at inside
the window. The waiting branch is dead against live data: the
tests/actions-endpoint-test.sh ratchet (GOTCHAS 16/34) states plainly that
"a waiting run is NOT in the tasks (claimed-only) view" — a task row
exists only once a runner has PICKED the job (CreateTaskForRunner). So a run
queued behind a stalled/saturated runner is invisible to the guard, which then
re-dispatches every tick — exactly the flood #289 describes. The existing
test's {"status":"waiting"} task fixtures are, as the ticket says, a shape
the live forge does not produce. scheduler-canary.sh is already the sole
harness reader of actions/runs?...status=waiting under the ratchet's GOTCHAS
34 exemption; the proposed second read rides that same exemption.

Agent Brief

Category: bug
Summary: The schedule backstop's in-flight guard reads the claimed-only
tasks view, so a run queued behind a stalled/saturated runner is invisible and
the backstop re-dispatches on every tick — a ~4x dispatch flood that, on
Forgejo's single oldest-first queue, becomes a multi-hour global lag.

Current behavior:
The in-flight guard reads the Actions tasks listing
(actions/tasks?limit=50&page=1) and counts a dispatch as redundant if a
matching run is waiting, running, or started within the window. Because a
task row only appears once a runner has PICKED the job, a still-queued run is
absent from this view — so the guard reads "idle" precisely when the queue is
deepest and dispatches on every tick (*/15 cron + nudges across repos). The
waiting branch of the current guard can only ever match the test fixtures,
never live data.

Desired behavior:
Add a second, fail-closed read of the Actions runs listing filtered to
queued runs (actions/runs?status=waiting&limit=50&page=1 — the one runs read
the actions-endpoint-test.sh ratchet admits under its GOTCHAS 34 exemption,
bounded by the status=waiting filter, page=1, and a curl timeout). When a
run of this workflow file is queued, suppress the dispatch. Keying is on
the workflow file (.workflow_id), per the ticket's explicit decision: a
run queues as a whole, and an unpicked per-host leg means the pool cannot take
more right now. On any failure of the new read, skip the dispatch (fail
closed, same as the existing tasks read) — a blind dispatch onto a struggling
instance is the harm.

Design tension to respect (do not regress):
The existing tasks/name-keyed in-flight guard must stay keyed on the job
name with its per-host suffix discrimination (GOTCHAS 62): every per-host
swarm.yml leg shares one workflow_id, so keying that guard on
workflow_id would let one host's running leg starve another's dispatch. The
new waiting-runs read is additive and deliberately workflow_id-keyed for
the queued case only — it composes with, and does not replace, the existing
name-keyed guard. Keep both.

Key interfaces:

  • schedule-backstop.sh's in-flight guard — add the second runs?status=waiting
    read, .workflow_id-keyed, fail-closed, composing with the existing
    name-keyed tasks guard.
  • No new repo/host/product literals in the script (harness-file rule); the
    FORGEJO_API base continues to come from swarm-identity.sh.

Acceptance criteria:

  • A queued run of this workflow (present in runs?status=waiting, absent
    from the tasks view) SUPPRESSES the dispatch, even with an idle tasks view.
  • A queued run of a DIFFERENT workflow does NOT suppress this workflow's
    dispatch (.workflow_id keying).
  • The .workflow_id keying is exercised for a non-swarm workflow (e.g.
    resume-asks) as well as swarm.
  • A failed/unavailable runs?status=waiting read skips the dispatch (fail
    closed), matching the existing tasks-read behaviour.
  • The existing per-host name-keyed in-flight guard behaviour is unchanged
    (existing scenarios still pass).
  • tests/schedule-backstop-test.sh carries the four new scenarios and the
    full offline suite passes
    (for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done),
    including tests/actions-endpoint-test.sh (the new read must not trip the
    ratchet).
  • A GOTCHAS 78 body file + index row is added in the same commit
    (per docs/GOTCHAS.md conventions), and the state-change rule is honoured
    (a docs/journal/ entry + the relevant STATUS.md surface row).

Out of scope:

  • A liveness restart for a runner that stops fetching tasks (the ignition for
    this incident) — explicitly deferred by the ticket; file separately.
  • The Matou/coa-builds wait — a downstream symptom, not this fix.
  • Re-keying or removing the existing name-keyed per-host tasks guard.
  • Deploying to host checkouts / bumping FACTORY_REF in consumers — that is a
    human pin-bump step after this lands (the pull-only topology; CLAUDE.md,
    GOTCHAS 4).
> *This was generated by AI during triage.* ## Triage ruling — ready-for-agent **Category:** `bug` (already applied) · **State:** `ready-for-agent` ### Ruled by agent under ADR 0174 — veto anytime **The call.** Routing this to `ready-for-agent` rather than `ready-for-human`, despite a real design tension the fix must navigate (below). This is a **two-way door**: the change is a code edit to a root harness script and its offline test, fully revertible by a later commit, and the intended behaviour is pinned by the four new test scenarios the ticket specifies. It is none of the one-way-door residues (no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend). **What proves it:** `tests/schedule-backstop-test.sh` (the four new scenarios) plus the existing `tests/actions-endpoint-test.sh` ratchet, both offline (shimmed curl, no network). **Path check.** `schedule-backstop.sh` is a root harness file — not a prompt skeleton, not under `.sandcastle/`, not `.forgejo/` (the only protected paths). So this is swarm-worker work, not `ready-for-session`. The `landing-pr` label stays: the worker lands via a PR a human merges, worked alone in its run. ### Verification — CONFIRMED Read the current `schedule-backstop.sh` in-flight guard: it reads `actions/tasks?limit=50&page=1`, then its `jq` select treats a run as in-flight on `status == "waiting"` OR `"running"` OR a `run_started_at` inside the window. The `waiting` branch is **dead against live data**: the `tests/actions-endpoint-test.sh` ratchet (GOTCHAS 16/34) states plainly that *"a `waiting` run is NOT in the `tasks` (claimed-only) view"* — a task row exists only once a runner has PICKED the job (`CreateTaskForRunner`). So a run queued behind a stalled/saturated runner is invisible to the guard, which then re-dispatches every tick — exactly the flood #289 describes. The existing test's `{"status":"waiting"}` task fixtures are, as the ticket says, a shape the live forge does not produce. `scheduler-canary.sh` is already the sole harness reader of `actions/runs?...status=waiting` under the ratchet's GOTCHAS 34 exemption; the proposed second read rides that same exemption. ## Agent Brief **Category:** bug **Summary:** The schedule backstop's in-flight guard reads the claimed-only tasks view, so a run queued behind a stalled/saturated runner is invisible and the backstop re-dispatches on every tick — a ~4x dispatch flood that, on Forgejo's single oldest-first queue, becomes a multi-hour global lag. **Current behavior:** The in-flight guard reads the Actions *tasks* listing (`actions/tasks?limit=50&page=1`) and counts a dispatch as redundant if a matching run is `waiting`, `running`, or started within the window. Because a task row only appears once a runner has PICKED the job, a still-queued run is absent from this view — so the guard reads "idle" precisely when the queue is deepest and dispatches on every tick (`*/15` cron + nudges across repos). The `waiting` branch of the current guard can only ever match the test fixtures, never live data. **Desired behavior:** Add a second, fail-closed read of the Actions *runs* listing filtered to queued runs (`actions/runs?status=waiting&limit=50&page=1` — the one runs read the `actions-endpoint-test.sh` ratchet admits under its GOTCHAS 34 exemption, bounded by the `status=waiting` filter, `page=1`, and a curl timeout). When a run of **this workflow file** is queued, suppress the dispatch. Keying is on the **workflow file** (`.workflow_id`), per the ticket's explicit decision: a run queues as a whole, and an unpicked per-host leg means the pool cannot take more right now. On any failure of the new read, skip the dispatch (fail closed, same as the existing tasks read) — a blind dispatch onto a struggling instance is the harm. **Design tension to respect (do not regress):** The *existing* tasks/name-keyed in-flight guard must stay keyed on the job name with its per-host suffix discrimination (GOTCHAS 62): every per-host `swarm.yml` leg shares one `workflow_id`, so keying *that* guard on `workflow_id` would let one host's running leg starve another's dispatch. The new waiting-runs read is **additive** and deliberately `workflow_id`-keyed for the queued case only — it composes with, and does not replace, the existing name-keyed guard. Keep both. **Key interfaces:** - `schedule-backstop.sh`'s in-flight guard — add the second `runs?status=waiting` read, `.workflow_id`-keyed, fail-closed, composing with the existing name-keyed tasks guard. - No new repo/host/product literals in the script (harness-file rule); the `FORGEJO_API` base continues to come from `swarm-identity.sh`. **Acceptance criteria:** - [ ] A queued run of this workflow (present in `runs?status=waiting`, absent from the tasks view) SUPPRESSES the dispatch, even with an idle tasks view. - [ ] A queued run of a DIFFERENT workflow does NOT suppress this workflow's dispatch (`.workflow_id` keying). - [ ] The `.workflow_id` keying is exercised for a non-swarm workflow (e.g. resume-asks) as well as swarm. - [ ] A failed/unavailable `runs?status=waiting` read skips the dispatch (fail closed), matching the existing tasks-read behaviour. - [ ] The existing per-host name-keyed in-flight guard behaviour is unchanged (existing scenarios still pass). - [ ] `tests/schedule-backstop-test.sh` carries the four new scenarios and the full offline suite passes (`for t in tests/*.sh onboarding/tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done`), including `tests/actions-endpoint-test.sh` (the new read must not trip the ratchet). - [ ] A GOTCHAS 78 body file + index row is added in the same commit (per `docs/GOTCHAS.md` conventions), and the state-change rule is honoured (a `docs/journal/` entry + the relevant `STATUS.md` surface row). **Out of scope:** - A liveness restart for a runner that stops fetching tasks (the ignition for this incident) — explicitly deferred by the ticket; file separately. - The `Matou/coa-builds` wait — a downstream symptom, not this fix. - Re-keying or removing the existing name-keyed per-host tasks guard. - Deploying to host checkouts / bumping `FACTORY_REF` in consumers — that is a human pin-bump step after this lands (the pull-only topology; CLAUDE.md, GOTCHAS 4).

⏩ independent reviewer for #289 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #289 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #289 — status success

✅ close-report gates passed — every claim verified against the PR head. PR #291 (#291) is open and green; a human merges it and the merge closes this issue via closes #289 (MERGE_AUTHORITY=human).

envelope
{
  "issue": 289,
  "status": "success",
  "commits": [
    "384a190"
  ],
  "changed_files": [
    "schedule-backstop.sh",
    "tests/schedule-backstop-test.sh",
    "docs/GOTCHAS.md",
    "docs/gotchas/78-schedule-backstop-reads-only-claimed-tasks-not-queued-runs.md",
    "docs/journal/2026-10-20-289.md",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "bash tests/schedule-backstop-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/actions-endpoint-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "queued run of this workflow suppresses dispatch even with idle tasks view": "tests/schedule-backstop-test.sh scenario 'a QUEUED swarm.yml run ... must SUPPRESS'; schedule-backstop.sh waiting-runs guard",
    "queued run of a different workflow does not suppress this one (.workflow_id keying)": "tests/schedule-backstop-test.sh 'a queued run of a DIFFERENT workflow (healer.yml) must NOT suppress'",
    ".workflow_id keying exercised for a non-swarm workflow (resume-asks) too": "tests/schedule-backstop-test.sh 'a QUEUED resume-asks.yml run must SUPPRESS ... keyed on .workflow_id not the resume job name'",
    "failed/unavailable runs?status=waiting read skips the dispatch (fail closed)": "tests/schedule-backstop-test.sh 'a failed runs?status=waiting read must SKIP the dispatch (fail closed)'",
    "existing per-host name-keyed guard behaviour unchanged": "tests/schedule-backstop-test.sh — all pre-existing GOTCHAS 62 / #588 / #190 scenarios still pass (22 total)",
    "four new scenarios + full offline suite passes incl actions-endpoint ratchet": "tests entries above; ratchet pass=5 fail=0, suite green except two pre-existing unrelated reds",
    "GOTCHAS 78 body + index row + state-change rule (journal + STATUS surface row) in the same commit": "docs/gotchas/78-*.md + docs/GOTCHAS.md row 78 + docs/journal/2026-10-20-289.md + STATUS.md self-consumer row, all in 384a190"
  },
  "summary": "schedule-backstop.sh gains a fail-closed .workflow_id-keyed queued-runs guard so a run queued behind a stalled runner no longer re-dispatches every tick.",
  "blockers": []
}
**close-report** for #289 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the PR head. PR #291 (https://git.matou.nz/Matou/dev-factory/pulls/291) is open and green; a human merges it and the merge closes this issue via `closes #289` (MERGE_AUTHORITY=human). <details><summary>envelope</summary> ```json { "issue": 289, "status": "success", "commits": [ "384a190" ], "changed_files": [ "schedule-backstop.sh", "tests/schedule-backstop-test.sh", "docs/GOTCHAS.md", "docs/gotchas/78-schedule-backstop-reads-only-claimed-tasks-not-queued-runs.md", "docs/journal/2026-10-20-289.md", "STATUS.md" ], "tests": [ { "command": "bash tests/schedule-backstop-test.sh", "exit_code": 0 }, { "command": "bash tests/actions-endpoint-test.sh", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 } ], "criteria": { "queued run of this workflow suppresses dispatch even with idle tasks view": "tests/schedule-backstop-test.sh scenario 'a QUEUED swarm.yml run ... must SUPPRESS'; schedule-backstop.sh waiting-runs guard", "queued run of a different workflow does not suppress this one (.workflow_id keying)": "tests/schedule-backstop-test.sh 'a queued run of a DIFFERENT workflow (healer.yml) must NOT suppress'", ".workflow_id keying exercised for a non-swarm workflow (resume-asks) too": "tests/schedule-backstop-test.sh 'a QUEUED resume-asks.yml run must SUPPRESS ... keyed on .workflow_id not the resume job name'", "failed/unavailable runs?status=waiting read skips the dispatch (fail closed)": "tests/schedule-backstop-test.sh 'a failed runs?status=waiting read must SKIP the dispatch (fail closed)'", "existing per-host name-keyed guard behaviour unchanged": "tests/schedule-backstop-test.sh — all pre-existing GOTCHAS 62 / #588 / #190 scenarios still pass (22 total)", "four new scenarios + full offline suite passes incl actions-endpoint ratchet": "tests entries above; ratchet pass=5 fail=0, suite green except two pre-existing unrelated reds", "GOTCHAS 78 body + index row + state-change rule (journal + STATUS surface row) in the same commit": "docs/gotchas/78-*.md + docs/GOTCHAS.md row 78 + docs/journal/2026-10-20-289.md + STATUS.md self-consumer row, all in 384a190" }, "summary": "schedule-backstop.sh gains a fail-closed .workflow_id-keyed queued-runs guard so a run queued behind a stalled runner no longer re-dispatches every tick.", "blockers": [] } ``` </details>
Author
Owner

Closed 2026-10-21 (Ben's stale sweep): the fix landed on main as PR #290 (a2dc353, 2026-10-21). The agent's duplicate PR #291 is closed alongside, unmerged.

Closed 2026-10-21 (Ben's stale sweep): the fix landed on main as PR #290 (`a2dc353`, 2026-10-21). The agent's duplicate PR #291 is closed alongside, unmerged.
ben 2026-10-21 14:16:15 +00:00
Author
Owner

Recurrence on elitebook-03, 2026-10-21 (evidence while it is still wedged). Runner 104 (forgejo-runner-swarm.service, pid 4008139, up since a 06:26Z restart that SIGKILLed two running claude jobs) has logged failed to fetch task: deadline exceeded on every poll since ~15:00Z (~17 per 10 min = one per 30 s fetch_timeout cycle) plus uploading final logs failed … deadline_exceeded. Forgejo lists it offline.

What rules out the network and the forge:

  • curl https://git.matou.nz/api/v1/version from the same host, same user: 200 in 0.9 s, over HTTP/2 and HTTP/1.1 alike.
  • ss -tunap sampled every second for 40 s on the runner pid: no TCP or UDP socket at all, 9 fds, 18 threads — the process is not attempting I/O while it reports the deadline. The forge log confirms: zero FetchTask requests from it reach the server (the other two runners' do).
  • matou-workstation (runner 103) and bens-mac-04 (105) are healthy: 0 fetch errors since the mac's reboot, 38–150 pickups/hour on the workstation all day.

Effect: every swarm (elitebook-03) leg across all consumers has queued since 05:15Z — 395 waiting jobs in action_run_job (idss 177, dev-factory 77, ai-company-os 50, matou-app 30, matou-website 21, coa 20, pregnancy-navigator 20), all runs_on ["elitebook-03"]. Earlier today the same runner was starved differently: two matou-app legs held both slots 07:35–10:58Z until the 3 h timeout cancelled them, during the forge's 03–08Z slow-request storm (3.4k–4.9k router: slow lines/hour, mostly /blame|/commits|/src/commit crawl traffic arriving via the droplet proxy).

So the host-side liveness check this ticket asks for needs to catch a runner that is polling and failing (no socket, deadline exceeded every cycle, Forgejo status offline) and restart it when it holds no task — not only one that goes silent. Remedy today is a systemctl restart forgejo-runner-swarm with 0 tasks running on it (Ben).

**Recurrence on elitebook-03, 2026-10-21 (evidence while it is still wedged).** Runner 104 (`forgejo-runner-swarm.service`, pid 4008139, up since a 06:26Z restart that SIGKILLed two running claude jobs) has logged `failed to fetch task: deadline exceeded` on every poll since ~15:00Z (~17 per 10 min = one per 30 s fetch_timeout cycle) plus `uploading final logs failed … deadline_exceeded`. Forgejo lists it `offline`. What rules out the network and the forge: - `curl https://git.matou.nz/api/v1/version` from the same host, same user: 200 in 0.9 s, over HTTP/2 and HTTP/1.1 alike. - `ss -tunap` sampled every second for 40 s on the runner pid: **no TCP or UDP socket at all**, 9 fds, 18 threads — the process is not attempting I/O while it reports the deadline. The forge log confirms: zero FetchTask requests from it reach the server (the other two runners' do). - matou-workstation (runner 103) and bens-mac-04 (105) are healthy: 0 fetch errors since the mac's reboot, 38–150 pickups/hour on the workstation all day. Effect: every `swarm (elitebook-03)` leg across all consumers has queued since 05:15Z — **395 waiting jobs** in `action_run_job` (idss 177, dev-factory 77, ai-company-os 50, matou-app 30, matou-website 21, coa 20, pregnancy-navigator 20), all `runs_on ["elitebook-03"]`. Earlier today the same runner was starved differently: two matou-app legs held both slots 07:35–10:58Z until the 3 h timeout cancelled them, during the forge's 03–08Z slow-request storm (3.4k–4.9k `router: slow` lines/hour, mostly `/blame|/commits|/src/commit` crawl traffic arriving via the droplet proxy). So the host-side liveness check this ticket asks for needs to catch a runner that is *polling and failing* (no socket, `deadline exceeded` every cycle, Forgejo status `offline`) and restart it when it holds no task — not only one that goes silent. Remedy today is a `systemctl restart forgejo-runner-swarm` with 0 tasks running on it (Ben).
Author
Owner

Correction to the ignition (2026-10-28). The runner was not stalled. The forge's task record: task 208756 swarm (matou-workstation) ran 03:24:29Z–05:38:43Z, success — a 2h14m swarm leg on a capacity-1 runner, which picks nothing else while its one slot is busy. A quiet runner journal is what a busy capacity-1 runner looks like; the 502s at 00:53Z were unrelated.

So: no liveness restart (it would have killed that live job). The backstop guard from PR #290 is the whole fix. GOTCHAS 78 + the STATUS hosts row are corrected in a follow-up docs PR.

**Correction to the ignition (2026-10-28).** The runner was not stalled. The forge's task record: task 208756 `swarm (matou-workstation)` ran **03:24:29Z–05:38:43Z, success** — a 2h14m swarm leg on a capacity-1 runner, which picks nothing else while its one slot is busy. A quiet runner journal is what a busy capacity-1 runner looks like; the 502s at 00:53Z were unrelated. So: no liveness restart (it would have killed that live job). The backstop guard from PR #290 is the whole fix. GOTCHAS 78 + the STATUS hosts row are corrected in a follow-up docs PR.
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#289
No description provided.