A scheduled workflow's failing run leaves the Co-Ordinator's failed-runs window in about seven hours, so a daily check's red run is unactionable long before the next one fires
Id: TD-PPagop-26082936 · Status: open · Filed: 2026-08-29
What: the failed-runs work source is derived by the Co-Ordinator itself, not
by a gatherer — prompts/coordinator.md:397 tells it to “query it live
(gh api repos/<slug>/actions/runs?branch=<default-branch>&per_page=100)” —
and scripts/gather-source-state.sh:178 samples the identical unpaginated
page for the no-op fingerprint’s workflows digest. Neither read paginates,
so both see only the most recent 100 runs on the default branch. Requirement
19’s candidate (“this workflow’s most recent run is a failure”) is therefore
answerable only for a workflow whose latest run is still inside that page.
Why it matters: measured on Poetic-Poems/agent-ops on 2026-08-29, one
100-run page of branch=main spanned 11h18m (00:23:57Z to 11:41:14Z)
across 6 distinct workflows — roughly 13.5 runs an hour, from ~10 merges a day
each firing eight-plus push-triggered workflows plus the existing schedules.
A workflow that runs once a day therefore drops out of the window about seven
hours after it fires, and is invisible to every cycle after that. It reappears
only when its next run lands, which — if that run also fails — restarts the
same seven-hour window. The failure is real and permanent; its visibility is
intermittent and short.
Nothing is wrong today, because nothing scheduled here runs daily:
td-tooling-drift.yml is weekly and codeql.yml is weekly, and both are
already past the window most of the time. It becomes load-bearing with
.github/workflows/graphql-drift.yml (PR #1043), whose entire design argument
for being scheduled rather than per-pull-request is that “a red run becomes
the pipeline’s own next work item rather than a mark on a page” — a claim that
holds for about seven of every twenty-four hours. That wording has been
corrected in the workflow header, requirement 1g-ii and the CHANGELOG to state
the window rather than assert durability; this record is the gap those
corrections now describe.
Where: prompts/coordinator.md:397 (the Co-Ordinator’s own live query) and
scripts/gather-source-state.sh:178 (the fingerprint digest). Requirement 19
and requirement 15 are the consumers.
Suggested fix, in increasing order of cost:
(1) Paginate the runs read, or narrow it per workflow — GitHub supports
repos/<slug>/actions/workflows/<file>/runs?per_page=1, which answers “is this
workflow’s latest run a failure” exactly and in one call per workflow,
independent of how busy the branch is. That is the smallest change that makes
the candidate rule mean what it says, and it removes the window for every
workflow rather than for scheduled ones alone.
(2) Failing that, have a scheduled check that must be actionable open or
refresh a GitHub issue on failure, so the signal lands in a store with no
window at all (issues:* is already a work source). This costs the workflow
issues: write and de-duplication logic, and is worth it only for checks
whose failures must not be missed.
(3) At minimum, record the window where the claim is made, which is what the
corrections above do.
gather-source-state.sh:174-176 already concedes the window in a comment —
“The 100-run window can drop a long-dormant workflow’s last run, which changes
the digest and buys a Co-Ordinator run. That is the safe direction” — and for
the fingerprint that is true: a spurious extra Co-Ordinator run is harmless.
It is not the safe direction for the candidate read, where dropping a run
means the work is never selected at all, and that consumer is not covered by
that comment.
Dedup-searched the register for “100-run”, “per_page”, “failed-runs” and
“window”: TD-PPagop-26082924 (#1036) and TD-PPagop-26082908 are the same
family — unpaginated 100-item reads trusted as complete — but both are about
the open-issue digest and the issue/tech-debt gatherers, and neither names
the workflow-runs read or the failed-runs candidate that depends on it.
Noticed in code review of https://github.com/Poetic-Poems/agent-ops/pull/1043 (finding 13), which asked for the claim to be confirmed before being relied on; confirmed false as stated, and measured.
Migrated to https://github.com/Pullwright/agent-ops/issues/2003.