Skip to content

fix(github): devops pr check-readiness on a branch with no open pull request exits with a traceback #1372

Closed

Description

@dan-petty

Problem

Running uv run devops pr check-readiness with no number, on a topic branch that has no open pull request, exits with a full Rich traceback. The traceback runs through core/cli.py:176 (traced_fn), github/pr_monitor.py:220 (resolve_branch_pr_number) and pr_monitor.py:200 (_resolve_pr_via_gh_view). It ends with GitHubOperationError: No open pull request found for branch 'fix/913-deploy-stack-monitoring-perimeter'.

A missing PR is an expected condition: agents run readiness before they open a PR. It should be a one-line error with a non-zero exit, as other domain errors print.

Seen 2026-10-08 on release/v0.2.29 (910b823) plus the #913 commit, in a worktree.

Proposed remedy

Have check-readiness (and the other pr commands that resolve the branch's PR) report the GitHubOperationError through the CLI's domain-error handler, for example with the command's exit_on, instead of letting it escape as a traceback.

Acceptance criteria

  • An offline test with run_gh doubled and no PR for the branch: the command exits 1 and prints the one-line message, with no traceback.

Seen on 2026-10-08 by the implementers of #709, #795, #816, #868, #892 and #913 while preparing their v0.2.29 PRs. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.

Activity

  1. added
    type/bug
    scope/cli
    scope/github
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It breaks the documented agent workflow of running readiness before opening a PR, but the command still exits non-zero so it is not a silent failure or data-loss risk.
    • Value: Medium. Agents routinely invoke check-readiness before a PR exists, so the traceback is a recurring friction point in the normal workflow, though it does not corrupt state.
    • Effort: Low. The fix is to route the already-raised GitHubOperationError through the existing CLI domain-error handler (exit_on) in the pr command, with one offline test.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #1006, whose default exit path covers every DevOpsCLIError and removes any exit_on= this fix adds. Found by the 2026-10-08 backlog review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope/cliscope/githubsource/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions