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 15 gh project, views and pages commands that do not obey it:
- 10 commands make an external request, or possibly make one, and have no request plan.
- 5 commands make no external request and need only the
no-external-requestclass. - Already done, not in scope:
gh project reconcile.
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.
A command that makes no external request prints the generic Would run delegated command line under devops --dry-run and does not run, although running it is safe. Some of these commands have an echo-only --dry-run that prints only their arguments.
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. - Mark only: give the command the
no-external-requestclass.devops --dry-run <command>then runs it normally. - 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 project reconcilealready has a request plan (github/projects.py:reconcile_dry_run); use it as the model.gh project sync --dry-runreturns before any request but prints a description, not a request list. It gets a request plan here.gh project status,gh project template,gh views list,gh views specandgh pages verifyread only the local template or files. They get theno-external-requestclass.- 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 pages build |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh pages builds |
no | yes | request plan | gh api @ github.pages:get_pages_builds:86 |
gh pages status |
no | yes | request plan | gh api @ github.pages:get_pages_status:47 |
gh pages verify |
no | no | mark only | - |
gh project audit |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh project link |
no | yes | request plan | gh api @ github.projects:_get_authenticated_user:264 |
gh project list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh project status |
no | no | mark only | - |
gh project sync |
yes | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh project template |
no | no | mark only | - |
gh project workflows list |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh views audit |
no | yes | request plan | gh @ github.rate_limiter:run_gh:1774 |
gh views list |
no | no | mark only | - |
gh views spec |
no | no | mark only | - |
gh views sync |
no | yes | request plan | gh api (write) @ github.projects:_rename_default_view:1280 |
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). - For each mark-only command,
devops --dry-run <command>runs the command normally. Verified by tests with the process runner and the HTTP clients patched to fail. - 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
The dry-run rule says a dry run makes no external request and lists the requests a real run makes. Fifteen gh project, views and pages commands do not obey this rule. Some make requests without a request plan. Some make no request, but dry run does not run them. This item adds request plans or no-external-request marks so each command obeys the rule.
Acceptance criteria
- Criterion 1: Each command in the table is out of tests/fixtures/dry_run_gaps.json.
Verification: Run the dry-run class ratchet test and confirm it passes. - Criterion 2: For each request-plan command,
devops --dry-runanddevops --dry-runmake no external request and print the ordered requests.
Verification: Run tests with the process runner and the HTTP clients patched to fail. - Criterion 3: For each request-plan command with
--format jsonor--json, the dry run returns the real result type marked as a dry run.
Verification: Run tests that check the returned object, itsdry_runflag, and its planned requests. - Criterion 4: For each request-plan command, the plan holds the requests that the real run makes, in the same order.
Verification: Run the real command against a recording fake and compare its calls with the plan. - Criterion 5: For each mark-only command,
devops --dry-runruns the command normally.
Verification: Run tests with the process runner and the HTTP clients patched to fail. - Criterion 6: Echo-only previews of these commands are gone, with no shim.
Verification: Search the changed files forrender_dry_run_resultand@dry_run_commandand find no use for these commands. - Criterion 7: The new tests start no process and open no socket.
Verification: Run the new tests and confirm the test guards record no edge reach. - Criterion 8: The pull request records the test time.
Verification: Read the pull request and find the recorded test time. - Criterion 9:
uv run devops cipasses.
Verification: Runuv run devops ciand see a passing result.
Key questions
- Does this change fit in one pull request?: Yes. One pull request can deliver all 15 command changes and their tests. (proposed) [sources: CONTEXT.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- 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 in dry run mode for specific commands.This change implements a core rule about dry-run behavior and affects multiple commands.Users will see clear information about what requests would be made during dry runs.The candidate requires implementing request plans for many commands and updating test fixtures.Both items work on dry-run functionality but the candidate focuses on project, views and pages commands while item #2235 focuses on issues, milestones, labels and runs commands.dan-petty commentedon Oct 27, 2026
Status set to Ready at 63be7ed (see proposed design in issue body).
chore(main): release 0.24.0 (#2819)