Skip to content

fix(roadmap): refine --dry-run reads GitHub and calls the model although its help says it makes no request #1867

Closed

Description

@dan-petty

The command devops roadmap refine --dry-run --item 1854 is not request-free. Its help says: "Make no request and change no git ref: print what refine would plan and run, with placeholders." The owner rule says that a dry run makes zero external requests.

A builder ran the command once on 2026-10-22 as a smoke test. The run took 1 minute 10 seconds. It spent about 493 GraphQL points. It printed a plan that came from a model ("#1854 -> Ready"). So the run read GitHub and called the model.

The cost is real. An agent that trusts the help text spends GitHub budget and local inference time. A budget of 5,000 points an hour lasts for ten such runs.

Remedy: make --dry-run return the same-typed plan with placeholders and make no request. Cover it with a test that uses the shared fakes and fails when any GitHub or model call occurs. Check the other roadmap commands (intake, reprioritize, close, migrate) for the same defect.

Existing tool considered: none applies. This is a defect in project code.

Acceptance criteria:

  • devops roadmap refine --dry-run makes no GitHub request and no model call.
  • A test fails if the command makes either call.
  • The same test pattern covers the other roadmap commands that have --dry-run.

Where to look (added for the assignee):

  • refine_cmd in src/devops_cli/commands/roadmap.py (about line 507). With --dry-run the command still calls _open_roadmap (it reads GitHub) and plan_refine (it reads the repository, searches the web and calls the model). The flag only stops the final apply_refine step. The same code path serves --plan-style previews, so a plain run without --confirm is allowed to read and to call the model. Only --dry-run must not.
  • The other roadmap commands show the pattern to copy: dry_run_close (roadmap/close.py), dry_run_intake (roadmap/intake.py), dry_run_reprioritization (roadmap/reprioritize.py), dry_run_migration and dry_run_render each return the same-typed plan with placeholders and make no request. Refine has no function of this kind. tests/test_roadmap_dry_runs.py holds the tests for the existing ones: add the refine case there.
  • plan_refine and render_refine_plan are in src/devops_cli/roadmap/refine.py. is_dry_run is in src/devops_cli/dry_run.py.
  • The rule: a dry run makes zero external requests and returns the same-typed result with the would-be requests listed.

Hints for the test: use the shared fakes in tests/support/fakes/ for the GitHub store and the model. Make the fakes fail the test on any call. Run the command with --dry-run through the Typer test runner and assert on the whole printed plan.

Proposed design

Problem statement

The devops roadmap refine --dry-run command claims to make no external requests but actually reads from GitHub and calls the model, consuming GraphQL points and inference time. This behavior violates the documented contract of dry-run commands which should be request-free.

Acceptance criteria

  • Criterion 1: The devops roadmap refine --dry-run command makes no GitHub requests and no model calls.
    Verification: Run devops roadmap refine --dry-run --item 1854 and verify that no GraphQL requests are made and no model API calls occur using shared fakes that detect such calls.
  • Criterion 2: A test fails if the command makes either GitHub or model calls during a dry run.
    Verification: Write a test using shared fakes that intercepts any GitHub or model calls and asserts that none are made when --dry-run is used.
  • Criterion 3: The same test pattern covers other roadmap commands that have --dry-run.
    Verification: Apply the same testing approach to intake, reprioritize, close, and migrate commands with --dry-run flags to ensure they all behave consistently.

Key questions

  • What is the expected behavior of a --dry-run command according to the documentation?: According to the documentation, a dry run should make no request and change no git ref: print what refine would plan and run, with placeholders. [sources: src/devops_cli/roadmap/refine.py]
  • What external resources are being accessed during the dry-run of 'refine' command?: During the dry-run, the command reads GitHub and calls the model, consuming GraphQL points and inference time. [sources: src/devops_cli/roadmap/refine.py]
  • Should other roadmap commands like intake, reprioritize, close, and migrate also be checked for the same defect?: Yes, the issue explicitly states to check all roadmap commands for the same defect. (proposed) [sources: src/devops_cli/roadmap/refine.py]

Fit

Needs splitting into 5 items:

  1. Fix dry-run behavior in devops roadmap refine command
  2. Fix dry-run behavior in devops roadmap intake command
  3. Fix dry-run behavior in devops roadmap reprioritize command
  4. Fix dry-run behavior in devops roadmap close command
  5. Fix dry-run behavior in devops roadmap migrate command

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor

    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.

    • Type: type/bug. The candidate describes a defect where --dry-run makes external requests contrary to its help text.
    • Priority: P1-High. This is a violation of documented behavior that affects resource usage and trust in the tool.
    • Value: High. Fixing this ensures correct behavior for users who rely on --dry-run to avoid costs and external calls.
    • Effort: Medium. Requires changes to command logic, testing, and potentially other roadmap commands with similar issues.
  3. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Proposal needs splitting into 5 items at ae8c2d9 (see proposed design in issue body).

  4. added this to the v0.2.39 milestone on Oct 22, 2026
  5. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Proposal needs splitting into 5 items at ae8c2d9 (see proposed design in issue body).

  6. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1875, merged into release/v0.2.39 as b2b67df.

    Summary

    Make devops roadmap refine --dry-run request-free and model-call free, returning the planned requests with placeholders.

    Closes #1867

    7 file(s) changed.

    How it was verified

    Check runs at a05f9d0:

    • Audit Defect PR Hardening: skipping
    • Prune PR DevContainer Images: pass
    • DevContainer Image: skipping
    • Service Image: skipping
    • Dependency Freshness: skipping
    • devops-cli: pass
    • zizmor: pass
    • bandit: pass
    • CodeQL: pass
    • Fail-to-Pass Check: pass
    • Fail-to-Pass Self-Check: pass
    • Changed-Test Independence: pass
    • Rule Pack Tests: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Static Analysis: pass

    Acceptance Criteria of docs/agent/tasks/task-1867-roadmap-refine-dry-run.md:

    • devops roadmap refine --dry-run makes no GitHub request and no model call.
    • Tests fail if the command makes either a GitHub call or a model call.
    • The same test pattern in tests/test_roadmap_dry_runs.py covers refine alongside other roadmap jobs (reprioritize, migrate, render, intake, close).
    • Full devops ci quality gate passes with 100% passing status.
  7. added a commit that references this issue on Oct 23, 2026
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

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions