Repository navigation
fix(workflows): drop hardcoded 60-min job timeout - #223
Merged
Merged
Conversation
A `tend-mention handle` run hit 58m51s against the 60-min cap doing real multi-step work (4 commits, 24 min waiting on slow `codecov/patch`). The constant had no principled basis — falling back to GitHub's 360-min default is the simpler fix than tuning a magic number, and removes a knob rather than adding one. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
Apr 10, 2026
tend-agent
left a comment
Collaborator
There was a problem hiding this comment.
One drive-by observation, not blocking: .github/workflows/review-reviewers.yaml still sets timeout-minutes: 60. It's hand-maintained (not generated) so it's legitimately out of this PR's scope, but it's a bot workflow running Claude against a matrix of adopter repos — the same rationale that motivated this change applies. Happy to push a follow-up commit to drop it there too if you'd like consistency across all bot workflows in the repo.
max-sixty
added a commit
that referenced
this pull request
Apr 10, 2026
The `review-runs` sweep currently can't see two related problems: its
lookback window was shorter than its cron interval, and it never
inspects job duration. Both come up in the same place, so bundled.
## Window fix
The window was `12 hours ago` but the cron runs daily at 07:47 UTC. Runs
completing between 12–24 hours before the sweep were silently skipped
forever. Widened to 24 hours (and the same change in the
`token-report.sh` call so its window matches).
## Long-running job detection
Added a scan after the Step 1 run listing: for each run, pull its jobs
via `/runs/{id}/jobs` and flag any that ran over 30 minutes. Tend
workflows typically finish in single-digit minutes, so anything past 30
is anomalous. At GitHub Actions' 360-min default cap (after #223 dropped
the `timeout-minutes` constant), a ~360-min `failure` is the runner-kill
signature.
Flagged jobs feed into the existing Step 3 session-log download and Step
6 summary. Treated as **structural** failures per `review-gates.md` —
one occurrence is enough to act.
Motivated by worktrunk run
[24254014913](https://github.com/max-sixty/worktrunk/actions/runs/24254014913):
a tend-mention `handle` job that ran 58:51 on a legitimate multi-commit
review (shell-integration fix, docs, codecov gaps, capitalization
snapshot), most of the tail spent in background `Task` polls waiting on
slow `codecov/patch`. `conclusion: success`, exit code 0 —
indistinguishable from a 3-minute happy path in today's sweep.
> _This was written by Claude Code on behalf of max-sixty_
Co-authored-by: Claude <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Apr 10, 2026
Same rationale as #223 — fall back to GitHub's 360-min default rather than maintaining an arbitrary constant. This is the hand-maintained `review-reviewers.yaml` (not generated by tend), which tend-agent flagged in the #223 review. Co-Authored-By: Claude <[email protected]> > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude <[email protected]>
2 of 3 tasks
tend-agent
pushed a commit
that referenced
this pull request
Apr 13, 2026
When `generator/pyproject.toml` exists (i.e. on the tend repo itself), Step 5 of the nightly skill now regenerates workflows via the in-tree generator instead of `uvx tend@latest`. Adopter repos without `generator/` fall through to the existing `uvx tend@latest` path unchanged. Motivation: PR #264 (from run 24330194038) ran `uvx tend@latest init` with PyPI's `tend` at 0.0.11 (released 2026-04-10). `main` has 10 generator commits landed since — #223 (drop hardcoded job timeouts), #225 (dedup review events), #227 (workflow_extra), #228 (paginate), #231 (inline-reply guidance), #233 (drop bot-author filter on issue_comment), #235 (prompt → skill), #254 (notifications freshness gate + bot-closed-PR drop), etc. Regenerating against the stale wheel reverted each of these. Maintainer flagged the PR as regressions; diagnosis confirmed the PyPI lag. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
tend-mention handlerun in max-sixty/worktrunk hit 58m51s against the 60-min cap doing real multi-step work — 4 commits across a shell-integration fix, docs, codecov coverage gaps, and a snapshot refresh, with ~24 min spent waiting on slowcodecov/patch. A clean near-miss on legitimate work, not a hang.The 60-minute constant had no principled basis. Rather than tuning the magic number to 120 (or 180, or 240), this drops the line entirely and falls back to GitHub's 360-min default. That removes a knob instead of adding one, which is the right direction given the repo's "no new options" rule.
Trade-off: worst-case runaway exposure goes from 1h to 6h per stuck job. The motivating incident was a near-miss on real work, not a runaway, so this seems acceptable — and a stuck job is bounded and observable either way.
Per-workflow override is a separate question to consider: there's currently no pass-through mechanism in
WorkflowConfigfor arbitrary job-level YAML keys. If we want one, that's its own design discussion.Co-Authored-By: Claude [email protected]