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 19 docker and sandbox commands that do not obey it:
- 19 commands make an external request, or possibly make one, and have no request plan.
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:
- Each command talks to the container engine (
dockerSDK orpodman), and some pull or push images. A plan lists the engine calls. - 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 |
|---|---|---|---|---|
docker analyze-layers |
yes (echo only) | yes | request plan | manual: dive reads the image from the container engine |
docker build |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker cache |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker images |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker prune |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker push |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker sandbox |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker sign |
yes (echo only) | yes | request plan | cosign sign @ config.commands:build_cosign_sign_cmd:424 |
docker stats |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
docker verify |
yes (echo only) | yes | request plan | cosign json @ config.commands:build_cosign_verify_cmd:450 |
sandbox deploy |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
sandbox exec |
no | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
sandbox logs |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
sandbox metrics |
yes (echo only) | yes | request plan | http: httpx2.HTTPTransport @ http.client:egress_transport:106 |
sandbox network-policy |
no | yes | request plan | socket: socket.getaddrinfo @ sandbox.models:_resolve_local_dns:274 |
sandbox probe |
yes (echo only) | yes | request plan | http: httpx2.HTTPTransport @ http.client:egress_transport:106 |
sandbox status |
no | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
sandbox stop |
yes (echo only) | yes | request plan | docker-sdk: docker.DockerClient @ docker.engine:DockerEngineService.client:416 |
sandbox traces |
yes (echo only) | yes | request plan | http: httpx2.HTTPTransport @ http.client:egress_transport:106 |
Target Subsystem
Security & Vulnerability Scanners
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
The dry-run rule says a dry run makes no external request and lists the requests a real run makes. 19 docker and sandbox commands do not follow this rule. They make engine, HTTP, or DNS calls, or they print only an echo. This item adds a request plan to each command.
Acceptance criteria
- Criterion 1: Each command gets the request-plan class.
Verification: Inspect the command source and confirm the class is present. - Criterion 2: Every command in the table is out of tests/fixtures/dry_run_gaps.json.
Verification: Run the dry-run ratchet test and confirm it passes. - Criterion 3: For each command, devops --dry-run and devops --dry-run make no external request, reads included.
Verification: Run the command with the process runner, HTTP clients, and other clients patched to fail. Confirm no request occurs. - Criterion 4: Each dry run prints the ordered PlannedRequest items.
Verification: Run the dry run and confirm render_request_plan shows the ordered requests. - Criterion 5: For each command with --format json or --json, the dry run returns the real result type marked as a dry run.
Verification: Run the command in JSON mode and confirm the result is marked dry_run and holds the planned requests. - Criterion 6: The plan holds the requests that the real run makes, in the same order.
Verification: Run the real command against a fake runner or client that records calls. Compare the recorded calls with the plan. - Criterion 7: Echo-only previews of these commands are removed, with no shim.
Verification: Search the code for render_dry_run_result and@dry_run_commandfor these commands. Confirm they are absent. - Criterion 8: The new tests start no process and open no socket.
Verification: Run the new tests and confirm the process and socket guards record no reach. - Criterion 9: The pull request records the time of the new tests.
Verification: Read the pull request description and confirm it lists the test time. - Criterion 10: uv run devops ci passes.
Verification: Run uv run devops ci and confirm it exits 0.
Key questions
- Does the repository already provide PlannedRequest and render_request_plan?: Yes. The repository has both. [sources: CHANGELOG.md:1294, tests/test_roadmap_dry_runs.py]
- Do the test guards stop external requests and real processes?: Yes. The test floor patches sockets, DNS, and subprocess starts. [sources: tests/conftest.py, tests/test_roadmap_dry_runs.py]
- Does this item depend on another roadmap item?: Yes. It depends on sub-issue 00. (proposed)
- Can one pull request deliver the whole change?: Yes. The same pattern applies to each command. (proposed)
- Is there a suspected block outside the roadmap?: No. The wait is sub-issue 00. (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 adds new functionality to list requests in dry runs for docker and sandbox commands.This change fixes a core rule violation for docker and sandbox commands, affecting correctness and testing.Users depend on dry-run behavior to see what would happen without making changes.The candidate requires significant code changes to implement request plans for multiple docker and sandbox commands.Both items work on dry-run behavior but target different command groups: docker/sandbox vs review commands.dan-petty commentedon Oct 27, 2026
Status set to Ready at d594b55 (see proposed design in issue body).
chore(main): release 0.33.0 (#2907)