Repository navigation
Description
Part of #886. Depends on sub-issue 00 (the dry-run class ratchet test).
Problem or Motivation
The owner's dry-run rule (#412) says that a dry run makes no external request and returns the requests that the real run would make. The #886 inventory (2026-10-25, commit 1bb164b) found 16 gh issues, milestones, labels and runs commands that do not obey it:
- 16 commands make an external request, or possibly make one, and have no request plan.
- Already done, not in scope:
roadmap intake,roadmap refine,roadmap return.
A command without a request plan either prints the generic Would run delegated command line under devops --dry-run, or fails with No such option: --dry-run, or prints an echo of its arguments. None of these shows the requests.
Proposed Solution & Architectural Design
For each command in the table:
- Request plan: add
--dry-runif it is missing. The dry run makes no external request, reads included. It returns the command's real result type, marked as a dry run, with the orderedPlannedRequestitems (argv, stdin and env with<placeholders>, plusconditionandrepeat). Build eachPlannedRequestfrom the same argument builder that the real run uses, so that the plan cannot drift from the run. Print it withrender_request_plan. Give the command therequest-planclass. - Remove an echo-only preview (
render_dry_run_resultor@dry_run_command) when the command gets its new dry run, with no shim. - Remove the command's paths from
tests/fixtures/dry_run_gaps.json.
Notes from the inventory:
gh milestones *read through the roadmap store.roadmap/request_plan.py:StoreRequestsalready gives the store's requests asPlannedRequestitems; reuse it.roadmapandsurveyhave fewer than 5 commands that need work, so they join this GitHub group.surveyhas a partial plan today: its intake emission is planned, butinspect_all_dependencies()still runs in a dry run.- The table comes from a static walk of each callback and the functions that it calls. Check each row against the code before you change it. If a row is wrong, change the class to match the code, and record the evidence in the pull request.
| Command | --dry-run today |
External request | Work | Evidence |
|---|---|---|---|---|
gh issues create |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh issues edit |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh issues list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh issues status |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh issues triage |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh labels audit |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh labels list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh labels sync |
yes | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh milestones close |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh milestones edit |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh milestones list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh milestones status |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh runs list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh runs view |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
roadmap run |
yes | yes | request plan | gh gh @ github.rate_limiter:_detect_resource:464 |
survey |
yes (partial plan) | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
Target Subsystem
SDLC, Git & PR Governance
Existing Tool Considered
The work uses what the repository has: devops_cli.dry_run.requests.PlannedRequest and render_request_plan (#741), the dry-run class decorator and ratchet test from sub-issue 00, and the test guards in tests/conftest.py and tests/test_roadmap_dry_runs.py. No new dependency is necessary.
Acceptance Criteria
- Each command in the table is out of
tests/fixtures/dry_run_gaps.json, and the ratchet test passes. - For each request-plan command,
devops <command> --dry-runanddevops --dry-run <command>make no external request and print the ordered requests. Verified by tests with the process runner, the HTTP clients and the other clients patched to fail. - For each request-plan command with
--format jsonor--json, the dry run returns the real result type marked as a dry run, with the planned requests. Verified by tests. - For each request-plan command, the plan holds the requests that the real run makes, in the same order. Verified by a test that runs the real command against a fake runner or client that records each call, and compares the calls with the plan (the pattern of
tests/test_roadmap_dry_runs.py). - Echo-only previews of these commands are gone, with no shim.
- The new tests start no process and open no socket. The pull request records their time.
-
uv run devops cipasses.
Source: #886
Proposed design
Problem statement
Sixteen gh issues, milestones, labels and runs commands, plus roadmap run and survey, make external requests but their dry run does not list those requests. They print a generic line, fail with an unknown option, or echo their arguments. The dry-run rule (#412) requires that a dry run makes no external request and returns the ordered requests the real run would make. This item adds a request plan to each command so its dry run obeys that rule.
Acceptance criteria
- Criterion 1: Each command in the table is removed from tests/fixtures/dry_run_gaps.json, and the ratchet test passes.
Verification: Run the ratchet test (the test that reads tests/fixtures/dry_run_gaps.json and fails if a listed command lacks the request-plan class). Confirm it passes with all 16 commands removed. - Criterion 2: For each request-plan command, devops --dry-run and devops --dry-run make no external request and print the ordered requests.
Verification: Run tests with the process runner, HTTP clients, and other clients patched to fail on any call. Assert the exit code is 0 and the output contains the planned request lines. - Criterion 3: For each request-plan command with --format json or --json, the dry run returns the real result type marked as a dry run, with the planned requests.
Verification: Run tests that invoke each command with --dry-run --format json and assert the result object has dry_run=True and a requests list of PlannedRequest items. - Criterion 4: For each request-plan command, the plan holds the requests that the real run makes, in the same order.
Verification: Run a test that executes the real command against a fake runner or client that records each call, then compares the recorded calls with the plan. Follow the pattern of tests/test_roadmap_dry_runs.py. - Criterion 5: Echo-only previews of these commands are removed, with no shim.
Verification: Search the source for render_dry_run_result and@dry_run_commandreferences to the 16 commands. Confirm none remain. Confirm no compatibility shim wraps the new dry run. - Criterion 6: The new tests start no process and open no socket. The pull request records their time.
Verification: Run the new tests under the session guards in tests/conftest.py (prevent_external_network_calls, refuse_real_programs). Confirm no RuntimeError or ConnectionRefusedError is raised. Record wall-clock time in the pull request description. - Criterion 7: uv run devops ci passes.
Verification: Run uv run devops ci in the pull request branch. Confirm all checks report passing.
Key questions
- Which commands need a request plan?: The 16 commands listed in the body table: gh issues create, gh issues edit, gh issues list, gh issues status, gh issues triage, gh labels audit, gh labels list, gh labels sync, gh milestones close, gh milestones edit, gh milestones list, gh milestones status, gh runs list, gh runs view, roadmap run, and survey. [sources: src/devops_cli/github/rate_limiter.py:1774]
- How should gh milestones commands build their request plan?: Reuse StoreRequests from roadmap/request_plan.py, which already gives the store's requests as PlannedRequest items. The milestones commands read through the roadmap store. [sources: src/devops_cli/roadmap/request_plan.py]
- Why do roadmap run and survey join this GitHub group?: They have fewer than 5 commands that need work, so they join the GitHub group rather than forming their own issue. (proposed)
- What is survey's current dry-run state?: Survey has a partial plan today: its intake emission is planned, but inspect_all_dependencies() still runs in a dry run. The work must stop that call and add it to the plan. [sources: src/devops_cli/github/rate_limiter.py:1774]
- What is the evidence for each command's current behavior?: All 16 commands route through gh at github.rate_limiter:run_gh:1774, except roadmap run which also touches github.rate_limiter:_detect_resource:464. The table in the body records this per row. [sources: src/devops_cli/github/rate_limiter.py:1774, src/devops_cli/github/rate_limiter.py:464]
- Is this issue a duplicate of feat(pr): pr commands list their requests in a dry run and make none #2234?: No. Both are parts of feat(cli): commands with no dry-run preview: read-only ones run, mutators gain one #886, but feat(pr): pr commands list their requests in a dry run and make none #2234 changes the pr commands and this item changes gh issues, gh milestones, gh labels, gh runs, roadmap run, and survey. The agent that split feat(cli): commands with no dry-run preview: read-only ones run, mutators gain one #886 filed both. (proposed)
Fit
Fits in one pull request.
Suspected block
The dry-run class ratchet test from sub-issue 00 of #886 must be delivered first, because this issue removes entries from tests/fixtures/dry_run_gaps.json and the ratchet test enforces that file.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 25, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate adds new functionality to list requests during dry runs for GitHub commands.This change is part of a larger initiative (#886) and affects core dry-run behavior.Improves developer experience by showing planned requests in dry runs for many common GitHub commands.Requires implementing request plans for 16+ commands and updating related infrastructure.gh issues, milestones, labels and runs commands list their requests in a dry run and make noneas the change that both ask for.Both items ask for the same change to list requests in a dry run for GitHub commands.A person closes one of the two if that is so.dan-petty commentedon Oct 25, 2026
Not a duplicate of #2234. Both are parts of #886, and each part changes a different set of commands: #2234 changes the
prcommands, and this item changesgh issues,gh milestones,gh labels,gh runs,roadmap runandsurvey. The agent that split #886 filed both.dan-petty commentedon Oct 27, 2026
Refine cannot set this item to Ready at 63be7ed until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
feat(gh): preview requests in dry run for issues, labels, runs
chore(main): release 0.25.0 (#2829)