Skip to content

Observe prolonged unassigned workflow jobs when requested - #894

Merged
GraciousGazelles merged 2 commits into
mainfrom
fix/unassigned-job-observation
Sep 24, 2026
Merged

GraciousGazelles merged 2 commits into
mainfrom
fix/unassigned-job-observation

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

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-seconds observation, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-24T22:36:23.757425Z 9f4c1df PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 45ddfad Sep 24, 2026
86 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/unassigned-job-observation branch September 24, 2026 23:21
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.

1 participant