Skip to content

feat(ci): add wait flag to run status - #604

Merged
ImLunaHey merged 1 commit into
mainfrom
t3code/add-ci-status-wait-flag
Oct 1, 2026
Merged

ImLunaHey merged 1 commit into
mainfrom
t3code/add-ci-status-wait-flag

Conversation

@ImLunaHey

@ImLunaHey ImLunaHey commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Add --wait to wait for a CI run and return its final status.

depot ci status <run-id> --wait
depot ci status <run-id> --wait --output json
  • Poll every five seconds; write progress to stderr and final details to stdout.
  • Exit 0 for finished runs and 1 for failed or cancelled runs.
  • Stop on context cancellation or API errors; preserve behavior without --wait.
  • Cover polling, terminal states, JSON output, cancellation, and API errors.

Closes https://linear.app/depot/issue/DEP-4013


Note

Low Risk
CLI-only polling and exit-code behavior around existing status API calls; no auth or server changes.

Overview
Adds --wait to depot ci status so scripts can block until a run reaches a terminal state.

While the run is still in progress, the command polls ciGetRunStatus every five seconds, prints Run: <id> (<status>) progress lines to stderr, then emits the usual human or JSON result on stdout. With --wait, a finished run exits 0; failed or cancelled runs still print output but return a non-zero error (exit 1). Polling respects command context (cancel during sleep or the next request) and stops on API errors. Runs that are already terminal never sleep or re-fetch.

Tests use testing/synctest to assert interval timing, stderr vs stdout split, JSON final payload, immediate return without --wait or on terminal status, cancellation, and poll failure.

Reviewed by Cursor Bugbot for commit 21e02db. Bugbot is set up for automated code reviews on this repo. Configure here.

@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

DEP-4013

@cursor cursor 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.

Risk: low. Approved after Cursor Bugbot and Cursor Security Agent completed successfully with no findings that need human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@ImLunaHey
ImLunaHey merged commit de5e7da into main Oct 1, 2026
12 checks passed
@ImLunaHey
ImLunaHey deleted the t3code/add-ci-status-wait-flag branch October 1, 2026 08:27
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