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 24 repos, branches, ssh and tls commands that do not obey it:
- 9 commands make an external request, or possibly make one, and have no request plan.
- 15 commands make no external request and need only the
no-external-requestclass.
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:
repos clone,repos clone-org,repos update,repos sync,branches updateandbranches syncuse GitPython (clone_from,fetch,pull). GitPython startsgititself, not throughcore.process.run_subprocess, so the process runner's dry-run guard does not stop it.ssh registerandssh rotatepost keys to GitHub through the GitHub session.tls enable-k8scallskubectl.ssh listhas an echo-only preview today (feat(cli): commands with no dry-run preview: read-only ones run, mutators gain one #886 names it). Remove that--dry-runoption with no shim when the command gets 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 |
|---|---|---|---|---|
branches clean |
yes | no | mark only | - |
branches jira |
no | no | mark only | - |
branches list |
no | no | mark only | - |
branches sync |
no | yes | request plan | gitpython .fetch() @ git.operations:fetch_all:164 |
branches update |
no | yes | request plan | gitpython .fetch() @ git.operations:fetch_all:164 |
repos clone |
yes (echo only) | yes | request plan | manual: GitPython Repo.clone_from (git/operations.py:clone_repo) |
repos clone-org |
yes (echo only) | yes | request plan | manual: GitHub org listing and GitPython Repo.clone_from |
repos list |
yes (echo only) | no | mark only | - |
repos sync |
yes (echo only) | yes | request plan | gitpython .fetch() @ git.operations:fetch_all:164 |
repos update |
yes (echo only) | yes | request plan | gitpython .fetch() @ git.operations:fetch_all:164 |
repos worktrees prune |
yes | no | mark only | - |
repos worktrees status |
no | no | mark only | - |
ssh audit |
yes (echo only) | no | mark only | - |
ssh generate |
yes (echo only) | no | mark only | - |
ssh list |
yes (echo only) | no | mark only | - |
ssh register |
yes (echo only) | yes | request plan | http: httpx2.AsyncClient @ http.client:new_async_http_client:186 |
ssh rotate |
yes (echo only) | yes | request plan | http: httpx2.AsyncClient @ http.client:new_async_http_client:186 |
ssh status |
yes (echo only) | no | mark only | - |
tls ca |
yes (echo only) | no | mark only | - |
tls cert |
yes (echo only) | no | mark only | - |
tls enable-k8s |
yes (echo only) | yes | request plan | kubectl create @ commands.tls:enable_k8s_cmd:508 |
tls homelab |
yes (echo only) | no | mark only | manual: generates a local TLS bundle; the analyzer matched a hostname list that starts with 'argocd' |
tls inspect |
no | no | mark only | - |
tls verify |
no | no | mark only | - |
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
Twenty-four repos, branches, ssh and tls commands do not follow the dry-run rule. Some make an external request under --dry-run. Some print only an argument echo or a generic line. The change makes each dry run make no external request and show the requests that a real run would make. It also runs safe commands normally under --dry-run.
Acceptance criteria
- Criterion 1: Each command in the issue table is out of tests/fixtures/dry_run_gaps.json.
Verification: Run the dry-run ratchet test and confirm it passes. - Criterion 2: Each request-plan command has the request-plan class.
Verification: Inspect the command decorator and confirm the class is request-plan. - Criterion 3: Each mark-only command has the no-external-request class.
Verification: Inspect the command decorator and confirm the class is no-external-request. - Criterion 4: Each request-plan command accepts --dry-run in both flag orders.
Verification: Rundevops --dry-runanddevops --dry-runand confirm both succeed. - Criterion 5: Each request-plan dry run makes no external request.
Verification: Run the command with the process runner and HTTP clients patched to fail and confirm no request is made. - Criterion 6: Each request-plan dry run prints the ordered PlannedRequest items.
Verification: Run the dry run and confirm the output lists argv, stdin, env, condition and repeat in order. - Criterion 7: Each request-plan dry run returns the real result type marked as a dry run.
Verification: Run the command with --format json or --json and confirm the result has the dry-run mark and planned requests. - Criterion 8: Each request-plan plan matches the real run requests in the same order.
Verification: Run a test that records calls from a fake runner or client and compares them with the plan. - Criterion 9: Each mark-only command runs normally under devops --dry-run.
Verification: Rundevops --dry-runwith the process runner and HTTP clients patched to fail and confirm it completes. - Criterion 10: Echo-only previews of these commands are removed without a shim.
Verification: Search the command modules for render_dry_run_result and@dry_run_commandfor these commands and confirm they are absent. - Criterion 11: Each table row matches the code.
Verification: Inspect each callback and its called functions and record the evidence in the pull request. - Criterion 12: The new tests start no process and open no socket.
Verification: Run the new tests under the test guards and confirm no process or socket reach is recorded. - Criterion 13: The pull request records the time of the new tests.
Verification: Read the pull request and confirm it has the test time. - Criterion 14: The repository CI passes.
Verification: Runuv run devops ciand confirm it passes.
Key questions
- Does this item fit one pull request?: Yes. It changes one command group and one test fixture set. (proposed) [sources: CONTEXT.md]
- What outside work blocks this item?: None. It waits only on sub-issue 00, which is a dependency. (proposed)
- Which issue must be done first?: Sub-issue 00, the dry-run class ratchet test. (proposed)
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 proposes new functionality to list requests during dry runs.This change affects the core dry-run rule compliance and is part of a larger inventory effort.Users need clear visibility into what external requests would occur during a dry run.The change requires modifying multiple commands, adding request planning logic, and updating test fixtures.Both items work on dry-run behavior but target different command groups: repos vs gh commands.dan-petty commentedon Oct 27, 2026
Status set to Ready at 69636b6 (see proposed design in issue body).
devops-cli-service commentedon Nov 1, 2026
Staged: branch
feat/2258-repos-branches-ssh-and-tls-commands, draft pull request #2972. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
These paths of the plan are no file on the default branch, and no group creates them:
tests/test_branches_dry_run.py,tests/test_repos_dry_run.py,tests/test_ssh_dry_run.py,tests/test_tls_dry_run.py,tests/test_roadmap_dry_runs.py. A person checks that the plan names them right.docs(openspec): plan #2258 plan dry-run for repos branches ssh tls (#…
docs(openspec): fix plan #2258 real paths, builders, honest classes (#…