Repository navigation
Observe prolonged unassigned workflow jobs when requested - #894
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Code Review
This pull request introduces an opt-in assignment timeout feature for queued GitHub workflow jobs, allowing users to specify a timeout using --unassigned-timeout-seconds and optionally filter by job names with --unassigned-job-name. It adds logic to enrich job data with runner assignment fields from the REST API, track unassigned durations, and trigger a stop_run_unassigned_job action when the timeout is exceeded. The review feedback highlights a robustness issue in _record_unassigned_observation where transient API failures or missing metadata could prematurely reset the unassigned timer, and suggests modifying the logic to only clear the observation if the job is no longer queued or has been successfully assigned.
When a workflow has completed nested jobs but a required job remains queued without a runner, the watcher can otherwise remain idle indefinitely. Add an opt-in
--unassigned-timeout-secondsobservation, optionally restricted to exact job names, that returns an actionable stop after the same job has remained explicitly unassigned for the requested interval.Assignment metadata is read from the GitHub jobs API and joined by job ID. Missing metadata remains unknown. Observations and acknowledgements bind the run attempt, head SHA and job ID; a concurrent failed job remains visible. The default is disabled, and the helper does not mutate workflow or runner state or infer the cause of queuing.
Validation: independent semantic review is clean at
f73ac73cb8c86188e1235016f0dd09bae15a31ad. Hosted workflow-helper and downstream documentation checks passed in validation-lab, and all current-head PR checks are green. Regression coverage includes the REST-to-watcher join, nested completion with an unassigned job, missing and partial runner metadata, unknown-interval timer reset, simultaneous failure, and acknowledgement identity changes. No local test execution.