Skip to content

fix(rerun-failed-jobs): read every page of the run's jobs, not just the first 30 - #1442

Merged
max-sixty merged 1 commit into
mainfrom
fix/rerun-failed-jobs-paginate
Sep 28, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/rerun-failed-jobs-paginate

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

rerun_failed_jobs.py could report a rerun as finished while leaving out re-run jobs it never saw. This PR makes it read every page of the run's jobs.

The script finds the new attempt's jobs by listing actions/runs/<id>/jobs?filter=latest and keeping the rows whose run_attempt matches. filter=latest returns the latest execution of every job in the run, including the passing jobs the rerun left alone, and the endpoint returns 30 rows per page by default. The script read only that first page. On a workflow with more than 30 jobs (a matrix of that size is common), a re-run job past row 30 was missing from the output, and the script still exited 0 on the jobs it did find. /tend-ci-runner:monitor-ci sends sessions to this script to decide whether a rerun cleared a red check, so a job that failed again could read as green. If every re-run job fell past the first page, the script instead reported lists no jobs yet — UNVERIFIED.

The fix requests per_page=100 with --paginate and collects jobs from every page. enrich_tend_outage_issues.py already reads the same endpoint this way.

The new test, test_rerun_reads_jobs_past_the_first_page, puts a failed re-run job on a second page that the fake gh serves only when the call passes --paginate. It fails on main: the output has success\tlint but not the failing job. It passes with the fix. To support it, the fake gh now finds the API path when --paginate comes before it. I also removed a stale comment saying the scripts pipe --jq through jq, which neither script does now.

`filter=latest` lists every job in the run, including the ones the rerun
left alone, and the endpoint returns 30 per page by default. On a run with
more than 30 jobs, a re-run job past the first page dropped out of the
report while the script exited 0 on the rest.

Also drops the fake gh comment's stale claim that the scripts pipe --jq.
@max-sixty
max-sixty merged commit 4081d7b into main Sep 28, 2026
11 checks passed
@max-sixty
max-sixty deleted the fix/rerun-failed-jobs-paginate branch September 28, 2026 07:09
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Sep 30, 2026
Upgrades the generated Tend workflows from 0.3.4 to 0.3.5
([compare](max-sixty/tend@0.3.4...0.3.5)).
The regenerated YAML changes little on its own: the action pin moves to
`max-sixty/tend/[email protected]`, and most of the behavior change arrives
through the new action's bundled skills and scripts.

What maintainers will notice:

- **Bot PRs get their review findings applied.** The review workflow now
decides whether to apply its own findings by who authored the PR, so a
review on a bot-authored PR follows through with a fix instead of
stopping at the comment (max-sixty/tend#1433).
- **Relayed PR-review mentions are named after the PR.** `tend-mention`
runs triggered through `tend-mention-relay` now get the PR title as
their run name rather than the event type, and the notifications poll
uses that name to tell which PR a live run is handling
(max-sixty/tend#1450). The relay job also skips when `TEND_ENABLED` is
`false`, instead of dispatching a run that does nothing
(max-sixty/tend#1452).
- **CI waits run to completion instead of a fixed cap.** CI polling and
integration-test waits now wait for checks to settle instead of timing
out at about 9 minutes, so a slow matrix reports its real result rather
than "unverified" (max-sixty/tend#1448, max-sixty/tend#1451).
- **Fewer truncated listings.** Pagination now reads every page of
notifications, failed-run jobs, and workflow listings
(max-sixty/tend#1435, max-sixty/tend#1442, max-sixty/tend#1457). The
inline pagination helpers in `tend-mention` and `tend-notifications` now
use `gh api --paginate --slurp`.
- **Weekly dependency review matches Dependabot and Renovate PRs
again.** It now matches on the `app/…` author login that `gh` reports
(max-sixty/tend#1441).
- **Nightly and review behavior.** Repo overlays can now skip advisory
checks, review findings are ranked by severity, and the nightly issue
sweep rotates across issues (max-sixty/tend#1450). `ci-fix` recurrence
comments now lead with what changed (max-sixty/tend#1446).

Also bumps the pinned `uv` from 0.12.17 to 0.12.19 in the pre-check
steps. `.config/tend.yaml` has no model pin, so there was no model to
update.

Co-authored-by: worktrunk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants