Skip to content

fix(ai): devops ai analyze pr runs for real under its own --dry-run #2314

Closed

Description

@dan-petty

Problem Statement

In src/devops_cli/commands/analyze.py:460, devops ai analyze pr declares --dry-run.
At lines 523 to 524, the command calls session.client.get_pull and session.client.get_pull_files.
These calls execute gh pr view and contact the GitHub REST and GraphQL APIs.
Execution contacts the remote GitHub service before checking the dry-run state.
Under #412 and #986, contacting the remote service under --dry-run is external communication.

Proposed Solution

Check dry_run or is_dry_run() and render the preview before contacting GitHub API.
Use render_dry_run_result(command="devops ai analyze pr", ...) to show the planned action.
Ensure the command starts zero child processes and issues zero network calls.

Source: #986

Activity

  1. added
    source/agent
    type/bug
    on Oct 26, 2026
  2. dan-petty commented on Oct 26, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/bug. The candidate fixes a bug where the command did not obey the dry-run rule.
    • Priority: P1-High. The fix ensures commands follow the project's dry-run rule and prevent unintended external calls.
    • Value: High. The change improves safety and prevents unintended resource usage during dry runs.
    • Effort: Medium. The fix requires checking dry-run state and rendering preview before API calls.
    • Possible duplicate: feat(ai): ai model and gateway commands list their requests in a dry run and make none #2241, which may ask for the same change. The model names devops ai analyze pr command checks dry-run state before contacting GitHub API as the change that both ask for. Both items ask for the same change to make ai commands follow the dry-run rule. A person closes one of the two if that is so.
  3. added a commit that references this issue on Oct 26, 2026
    c402b6d
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

    source/agenttype/bug

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions