From d15e1450db6806f9b7abb67b50bb92c2e47067a5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 23:31:51 +0000 Subject: [PATCH 1/3] feat(ci): uv, test, pipeline, serve, mcp and ci fail-to-pass commands list their requests in a dry run and make none The uv, test, pipeline, serve, mcp and ci fail-to-pass commands get a dry-run class. Each request-plan command prints the numbered requests of the real run, built by the same argument builders that the run uses. The commands that make no external request say what they would do. The 16 paths leave tests/fixtures/dry_run_gaps.json. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PeiMDqeFH7LNHG89eY7S68 --- README.md | 2 +- docs/CLI_REFERENCE.md | 17 ++- docs/commands/mcp.md | 2 + docs/commands/serve.md | 1 + docs/commands/uv.md | 14 +- .../design.md | 2 +- .../proposal.md | 4 +- .../specs/command-dry-run-class/spec.md | 2 +- .../tasks.md | 48 +++---- src/devops_cli/ai/mcp/server.py | 14 +- src/devops_cli/ci/fail_to_pass.py | 109 ++++++++++++-- src/devops_cli/commands/ci.py | 11 +- src/devops_cli/commands/mcp.py | 46 +++++- src/devops_cli/commands/pipeline.py | 25 ++-- src/devops_cli/commands/serve.py | 61 +++++--- src/devops_cli/commands/test_cmd.py | 133 ++++++++++-------- src/devops_cli/commands/uv.py | 77 ++++++++-- src/devops_cli/docker/sandbox.py | 25 ---- src/devops_cli/git/operations.py | 35 +++-- src/devops_cli/lang/en/messages.py | 35 +++++ tests/ai/mcp/test_mcp.py | 91 ++++++++++++ tests/ci/test_fail_to_pass.py | 95 ++++++++++++- tests/commands/test_load_and_pipeline.py | 79 +++++++++-- tests/commands/test_memory_profiler.py | 26 +++- tests/commands/test_sandbox_lifecycle.py | 16 --- tests/commands/test_sandbox_networking.py | 5 - tests/commands/test_test_runner.py | 48 +++++-- tests/commands/test_uv.py | 91 ++++++++++++ tests/commands/test_workload_sandbox.py | 103 ++++++++------ tests/core/test_main_dry_run.py | 49 +++---- tests/fixtures/dry_run_gaps.json | 18 +-- .../invariants/test_dry_run_class_ratchet.py | 29 ++-- tests/server/test_server.py | 60 ++++++++ tests/support/dry_run_stub.py | 26 ++++ 34 files changed, 1057 insertions(+), 342 deletions(-) create mode 100644 tests/support/dry_run_stub.py diff --git a/README.md b/README.md index fc86273833..a6a4feae1c 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ k8s/. | | [**uv**](docs/commands/uv.md) | `devops uv sync [OPTIONS]` | Sync project dependencies into the virtual environment. | | | `devops uv lock [OPTIONS]` | Regenerate the uv lockfile. | | | `devops uv python-install [OPTIONS]` | Install project Python version with uv. | -| | `devops uv run` | Run an arbitrary command using `uv run`. | +| | `devops uv run [OPTIONS]` | Run an arbitrary command using `uv run`. | | [**scan**](docs/commands/scan.md) | `devops scan trivy [OPTIONS] ` | Run Aqua Trivy vulnerability, secret, and misconfiguration scan. | | | `devops scan secrets [OPTIONS] ` | Run Gitleaks secret pre-filter scan across workspace or targets. | | | `devops scan workflows [OPTIONS] ` | Audit GitHub Actions workflows with zizmor offline: template injection, unpinned actions diff --git a/docs/CLI_REFERENCE.md b/docs/CLI_REFERENCE.md index 98a7c21b35..663f72e241 100644 --- a/docs/CLI_REFERENCE.md +++ b/docs/CLI_REFERENCE.md @@ -3232,6 +3232,7 @@ devops uv sync [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--frozen` | `boolean` | - | Do not update lockfile. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | ### `devops uv lock` @@ -3246,6 +3247,7 @@ devops uv lock [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--upgrade` | `boolean` | - | Upgrade dependencies while locking. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | ### `devops uv python-install` @@ -3260,6 +3262,7 @@ devops uv python-install [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--version`, `-v` | `string` | - | Python version to install (defaults to .python-version). | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | ### `devops uv run` @@ -3270,10 +3273,19 @@ Run an arbitrary command using `uv run`. Example: devops uv run -- pytest -q +A dry run lists the one `uv run` command and starts nothing. What that command does is +not a request of devops-cli, so the plan does not list it. + ```bash -devops uv run +devops uv run [OPTIONS] ``` +**Options:** + +| Option / Flag | Type | Default | Description | +|---|---|---|---| +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | + --- ## devops scan @@ -6400,6 +6412,7 @@ devops mcp serve [OPTIONS] | `--host`, `-h` | `string` | `127.0.0.1` | Host interface for SSE transport. | | `--port`, `-p` | `integer` | `8000` | Port number for SSE transport. | | `--allow-remote` | `boolean` | - | Permit binding SSE transport to non-loopback network interfaces. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | ### `devops mcp tools` @@ -6422,6 +6435,7 @@ devops mcp export-schemas [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--output-dir`, `-o` | `path` | - | Destination directory for tool schema JSON files. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- @@ -9273,6 +9287,7 @@ devops serve [OPTIONS] | `--log-level`, `-l` | `string` | `info` | Logging level (debug, info, warning, error). | | `--docs` / `--no-docs` | `boolean` | `True` | Enable or disable Swagger UI (/docs) and ReDoc (/redoc). | | `--service`, `-s` | `boolean` | - | Run continuous background service with GitHub webhook verification and per-repository status, triage and model lanes. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- diff --git a/docs/commands/mcp.md b/docs/commands/mcp.md index 7b764820b3..b2c66fb2b0 100644 --- a/docs/commands/mcp.md +++ b/docs/commands/mcp.md @@ -20,6 +20,7 @@ devops mcp serve [OPTIONS] | `--host`, `-h` | `string` | `127.0.0.1` | Host interface for SSE transport. | | `--port`, `-p` | `integer` | `8000` | Port number for SSE transport. | | `--allow-remote` | `boolean` | - | Permit binding SSE transport to non-loopback network interfaces. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- @@ -46,5 +47,6 @@ devops mcp export-schemas [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--output-dir`, `-o` | `path` | - | Destination directory for tool schema JSON files. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- diff --git a/docs/commands/serve.md b/docs/commands/serve.md index 2d969f2af0..6fb20f06d2 100644 --- a/docs/commands/serve.md +++ b/docs/commands/serve.md @@ -23,5 +23,6 @@ devops serve [OPTIONS] | `--log-level`, `-l` | `string` | `info` | Logging level (debug, info, warning, error). | | `--docs` / `--no-docs` | `boolean` | `True` | Enable or disable Swagger UI (/docs) and ReDoc (/redoc). | | `--service`, `-s` | `boolean` | - | Run continuous background service with GitHub webhook verification and per-repository status, triage and model lanes. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- diff --git a/docs/commands/uv.md b/docs/commands/uv.md index 1b0bea1a71..c26b65c0f6 100644 --- a/docs/commands/uv.md +++ b/docs/commands/uv.md @@ -17,6 +17,7 @@ devops uv sync [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--frozen` | `boolean` | - | Do not update lockfile. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- @@ -33,6 +34,7 @@ devops uv lock [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--upgrade` | `boolean` | - | Upgrade dependencies while locking. | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- @@ -49,6 +51,7 @@ devops uv python-install [OPTIONS] | Option / Flag | Type | Default | Description | |---|---|---|---| | `--version`, `-v` | `string` | - | Python version to install (defaults to .python-version). | +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | --- @@ -61,8 +64,17 @@ Run an arbitrary command using `uv run`. Example: devops uv run -- pytest -q +A dry run lists the one `uv run` command and starts nothing. What that command does is +not a request of devops-cli, so the plan does not list it. + ```bash -devops uv run +devops uv run [OPTIONS] ``` +**Options:** + +| Option / Flag | Type | Default | Description | +|---|---|---|---| +| `--dry-run` | `boolean` | - | Preview execution plan without mutating external state. | + --- diff --git a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/design.md b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/design.md index fe56028165..274cde8e6c 100644 --- a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/design.md +++ b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/design.md @@ -7,7 +7,7 @@ - **`test sandbox` reuses `plan_docker_sandbox` and `declared_controls()`, as `docker sandbox` does.** Both commands use `WorkloadSandboxRunner`. The workspace check stays before the plan, so the tests of #1383 keep passing. `build_dry_run_details` has no caller after this, so it goes with the tests that call only it. The rootless user note that it printed does not appear in the plan of `docker sandbox` either. - **`test run` keeps its git reads for `--changed`.** The targets are the input of the plan. They come from local `git diff` and `git status` calls, as the targets of `ci mutate --changed` do. No call leaves the machine. The existing tests of `--changed` already run on a real repository. - **`test profile-memory` is `no-external-request`, with a local preview.** The built-in targets run in memory (`httpx2.ASGITransport`, `list_mcp_tools()`). A target `module:function` runs user code, which can make any request. A dry run therefore runs nothing. It prints the target, the iteration count, the limits and the path of the report that the run would write. It writes nothing. -- **`ci fail-to-pass` is `request-plan`, and its plan starts no git call.** The real run starts ten processes. The plan lists them with placeholders ``, `` and ``, and gives a condition to the steps that run only when the diff holds a changed test file. The pure argument builders live next to the code that runs them. The two git reads in `src/devops_cli/git/operations.py` get a builder each, and the behavior of those two functions does not change. The class sits on the callback, so `format fail-to-pass` and `lint fail-to-pass` leave the gap list too. +- **`ci fail-to-pass` is `request-plan`, and its plan starts no git call.** The real run starts ten processes. The plan lists them with placeholders ``, `` and ``, and gives a condition to the steps that run only when the diff holds a changed test file. The pure argument builders live next to the code that runs them. The two git reads in `src/devops_cli/git/operations.py` get a builder each, and the behavior of those two functions does not change. The class sits on the callback, so `format fail-to-pass` and `lint fail-to-pass` leave the gap list too. - **A server dry run lists the bind and the start.** `serve` and `mcp serve` start a server that makes no outbound request until a client calls it. A mark-only class would start a blocking server under `devops --dry-run`. The plan has two requests, bind and start, and reads its values from the same function as the real call (`uvicorn.run` options, `run_mcp_server` arguments). `mcp serve --transport sse` applies the same loopback check as the real run, through one shared function. `serve --service` does not load settings or read credentials in a dry run. The real run reports the configuration errors. - **`mcp export-schemas` is a local preview, and `mcp tools` is mark-only.** The export writes files and makes no request. The preview counts the tools with the same listing and prints the directory. `mcp tools` only reads the registry. - **The proxy tests use a stub app, not `serve`.** Three tests use `serve` as the example of a command with no class and no `--dry-run`. Every later child of #886 would break them the same way. A stub module in `tests/support/dry_run_stub.py` gives them a command that stays unclassified. diff --git a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/proposal.md b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/proposal.md index bd8c7b7d6e..0c3e0d24b0 100644 --- a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/proposal.md +++ b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/proposal.md @@ -58,12 +58,12 @@ None. Checked on 2026-11-01 against `origin/main` at commit `4734035c`, with the commands below. 1. The 14 commands exist and are in the gap list. `PYTHONPATH=. uv run python` with `_collect_reachable_commands()` of `tests/invariants/test_dry_run_class_ratchet.py` gives, for each of them, its callback, whether it declares `--dry-run`, and its class. All 14 have class `None`. Eight declare no `--dry-run`: `mcp export-schemas`, `mcp serve`, `mcp tools`, `serve`, `uv lock`, `uv python-install`, `uv run` and `uv sync`. Six declare it, and print the echo: `ci fail-to-pass`, `pipeline`, `test load`, `test profile-memory`, `test run` and `test sandbox`. -2. One callback serves three paths. The same script prints `devops_cli.commands.ci fail_to_pass` for `ci fail-to-pass`, `format fail-to-pass` and `lint fail-to-pass`. The class sits on the callback, so the ratchet test demands that all three leave the gap list: `Command 'x' has dry-run class ... but is still listed`. The first plan missed this. No other path of this item shares a callback. +2. One callback serves three paths. The same script prints `devops_cli.commands.ci fail_to_pass` for `ci fail-to-pass`, `format fail-to-pass` and `lint fail-to-pass`. The class sits on the callback, so the ratchet test demands that all three leave the gap list: `Command 'x' has dry-run class ... but is still listed`. The first plan missed this. No other path of this item shares a callback. A user cannot start the two extra paths: `format` and `lint` are root-level commands (`CONST_CLI_ROOT_LEVEL_COMMANDS`), so `devops format fail-to-pass --base main` runs the `format` command and fails with `No such option: --base`. For that reason the tests run the plan through `ci fail-to-pass` only. 3. Today's output. `uv run devops uv lock --dry-run` prints `No such option: --dry-run`. `uv run devops --dry-run uv lock`, `--dry-run mcp tools` and `--dry-run serve` print `Would run delegated command: devops `. `uv run devops test load --dry-run` prints a JSON echo with `"action": "execute_k6_load_test"` and a `simulated_metrics` object. `uv run devops pipeline --dry-run` prints `"status": "SIMULATED_SUCCESS"`. 4. The line numbers in the issue table are stale. `commands.test_cmd:run_test_cmd:162` is now a line of the target selection. The `uv run` call is later in the same function. The symbols are right: `run_test_cmd` runs `run_subprocess(["uv", "run", *test_args])`. The sources of the issue to read are `tests/roadmap/test_roadmap_dry_runs.py` (the plan comparison pattern) and `tests/invariants/test_dry_run_class_ratchet.py`. `tests/test_roadmap_dry_runs.py` does not exist (`git cat-file -e origin/main:tests/test_roadmap_dry_runs.py` fails). 5. Nothing newer did or removed the work. `git log --since=2026-10-25` on the six command files and on `src/devops_cli/ci/fail_to_pass.py` shows no commit that adds a dry run or deletes a command. The newer commits are #2589 and #2353 (fail-to-pass replay), #2588 (sandbox seccomp option), #2515 and #2354 (Service). Open issues: #2258 plans four other command groups, and no open issue plans these 14 commands. Sibling plans touch the same gap file and the same spec but name other paths and other requirement names. 6. `test profile-memory` makes no external request. `src/devops_cli/telemetry/memory_profiler.py` runs the `http-pool` target against `httpx2.ASGITransport(app=_dummy_app)`, an in-memory transport. The `fastmcp` target calls `list_mcp_tools()`. `uv run devops test profile-memory http-pool --iterations 2 --format json` prints `"initial_sockets": 0` and `"final_sockets": 0`. The issue row (`http .send()`) is wrong for the built-in targets. A target `module:function` runs a function of the user, so a dry run cannot run it. The class is `no-external-request`, with a local preview. -7. `ci fail-to-pass` makes no network request either. `git grep -n "fetch\|pull\|clone" -- src/devops_cli/ci/fail_to_pass.py` finds only a docstring line. A missing base ref raises `GitOperationError` through `_verify_commit`; the command never fetches. The real run starts `git merge-base`, two `git rev-parse --verify`, `git diff --name-status`, `git ls-files --others`, `git worktree add`, `git archive`, `python -m pytest`, `git worktree remove` and `git worktree prune`. It is a request-plan command like `ci mutate`, which is `request-plan` on main for the same reason (it starts local processes). The test `test_fail_to_pass_dry_run_and_no_changed_tests` in `tests/ci/test_fail_to_pass.py` says the dry run starts no git call, so the plan uses placeholders for ``, `` and ``. +7. `ci fail-to-pass` makes no network request either. `git grep -n "fetch\|pull\|clone" -- src/devops_cli/ci/fail_to_pass.py` finds only a docstring line. A missing base ref raises `GitOperationError` through `_verify_commit`; the command never fetches. The real run starts `git merge-base`, two `git rev-parse --verify`, `git diff --name-status`, `git ls-files --others`, `git worktree add`, `git archive`, `python -m pytest`, `git worktree remove` and `git worktree prune`. It is a request-plan command like `ci mutate`, which is `request-plan` on main for the same reason (it starts local processes). The test `test_fail_to_pass_dry_run_and_no_changed_tests` in `tests/ci/test_fail_to_pass.py` says the dry run starts no git call, so the plan uses placeholders for ``, `` and ``. 8. `uv run` and `pipeline` can list a plan. The real run passes one list to one process: `_run(["uv", "run", *ctx.args])` in `src/devops_cli/commands/uv.py`, and `build_dagger_cmd(...)` in `src/devops_cli/commands/pipeline.py`. The plan holds that one request. What `uv run` or `dagger call` does inside is not a request of devops-cli, so the plan does not list it. The resolver inserts `--dry-run` right after the command path (`_build_forwarded_args` in `src/devops_cli/core/command_resolver.py`), so `devops --dry-run uv run -- pytest` gives `uv run --dry-run -- pytest` and the tokens after `--` reach the plan unchanged. 9. The uv argument list needs `prepare_tool_cmd`. `DefaultProcessRunner.prepare_cmd` calls `prepare_tool_cmd`, which adds `--preview-features malware-check,check-command` after `uv` (`src/devops_cli/core/process.py`). The plan must apply it, as `_planned_request_for_cmd` in `src/devops_cli/commands/ci.py` does, or the plan drifts from the run. 10. `test sandbox` already has a model. `docker sandbox` in `src/devops_cli/commands/docker.py` builds its plan with `plan_docker_sandbox` and `WorkloadSandboxRunner.declared_controls()`, and it checks the workspace first. `test sandbox` has the same runner and the same flow. The tests of #1383 (`test_sandbox_dry_runs_refuse_invalid_workspaces`) pin the workspace check for both commands. diff --git a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/specs/command-dry-run-class/spec.md b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/specs/command-dry-run-class/spec.md index 851c898fc3..2820d54892 100644 --- a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/specs/command-dry-run-class/spec.md +++ b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/specs/command-dry-run-class/spec.md @@ -78,7 +78,7 @@ The commands `mcp serve` and `serve` SHALL carry the `request-plan` dry-run clas - **THEN** the plan prints a bind request for `127.0.0.1:9000` and a start request that names 2 workers ### Requirement: ci-fail-to-pass-request-plans -The command `ci fail-to-pass`, and the paths `format fail-to-pass` and `lint fail-to-pass` that share its callback, SHALL carry the `request-plan` dry-run class. Under `--dry-run` the command SHALL start no process, git call included. It SHALL print the ordered requests of the replay, built by the argument builders that the replay uses, with the placeholders ``, `` and ``. +The command `ci fail-to-pass`, and the paths `format fail-to-pass` and `lint fail-to-pass` that share its callback, SHALL carry the `request-plan` dry-run class. Under `--dry-run` the command SHALL start no process, git call included. It SHALL print the ordered requests of the replay, built by the argument builders that the replay uses, with the placeholders ``, `` and ``. #### Scenario: Dry run on ci fail-to-pass - **WHEN** a user runs `devops ci fail-to-pass --base main --dry-run` with the process fake patched to fail on any call diff --git a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/tasks.md b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/tasks.md index 375dbdd27a..a1db0d0638 100644 --- a/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/tasks.md +++ b/openspec/changes/2260-uv-test-pipeline-serve-mcp-and/tasks.md @@ -4,72 +4,72 @@ Reads: `src/devops_cli/commands/uv.py`, `tests/commands/test_uv.py`, `tests/support/fakes/process.py`, `src/devops_cli/core/process.py` (lines 474 to 480, `prepare_tool_cmd`), `src/devops_cli/dry_run/requests.py`. Changes: `src/devops_cli/commands/uv.py`, `tests/commands/test_uv.py`, `tests/fixtures/dry_run_gaps.json`. -- [ ] 1.1 In `tests/commands/test_uv.py`, write the failing tests. For each of the four commands, run `devops uv --dry-run` and `devops --dry-run uv ` through `devops_cli.main.app` with a process fake that fails on any call. Assert exit code 0, zero process calls, and one numbered request whose argv is `prepare_tool_cmd` of the real argv (with `--frozen`, `--upgrade`, and the version from `--version` or `.python-version`). For `uv run`, assert that the tokens after `--`, even `--dry-run`, reach the plan unchanged. Add one test per command that runs the real command against the process fake and compares the recorded argv with the plan. Verify with `uv run devops ci test tests/commands/test_uv.py`. The new tests must fail on the base because `--dry-run` is not an option of the four commands (exit code 2) -- [ ] 1.2 In `src/devops_cli/commands/uv.py`, build the argument list of each command in one function that both the real run and the plan call. Add `--dry-run` (`HELP.options.dry_run`) and `@dry_run_class("request-plan")` to the four commands. Under a dry run, print one `PlannedRequest` per command with `render_request_plan`, after the checks for a missing command, a missing version and an invalid version. Remove the paths `uv lock`, `uv python-install`, `uv run` and `uv sync` from `tests/fixtures/dry_run_gaps.json`. Verify with `uv run devops ci test tests/commands/test_uv.py tests/invariants/test_dry_run_class_ratchet.py` +- [x] 1.1 In `tests/commands/test_uv.py`, write the failing tests. For each of the four commands, run `devops uv --dry-run` and `devops --dry-run uv ` through `devops_cli.main.app` with a process fake that fails on any call. Assert exit code 0, zero process calls, and one numbered request whose argv is `prepare_tool_cmd` of the real argv (with `--frozen`, `--upgrade`, and the version from `--version` or `.python-version`). For `uv run`, assert that the tokens after `--`, even `--dry-run`, reach the plan unchanged. Add one test per command that runs the real command against the process fake and compares the recorded argv with the plan. Verify with `uv run devops ci test tests/commands/test_uv.py`. The new tests must fail on the base because `--dry-run` is not an option of the four commands (exit code 2) +- [x] 1.2 In `src/devops_cli/commands/uv.py`, build the argument list of each command in one function that both the real run and the plan call. Add `--dry-run` (`HELP.options.dry_run`) and `@dry_run_class("request-plan")` to the four commands. Under a dry run, print one `PlannedRequest` per command with `render_request_plan`, after the checks for a missing command, a missing version and an invalid version. Remove the paths `uv lock`, `uv python-install`, `uv run` and `uv sync` from `tests/fixtures/dry_run_gaps.json`. Verify with `uv run devops ci test tests/commands/test_uv.py tests/invariants/test_dry_run_class_ratchet.py` ## 2. pipeline Reads: `src/devops_cli/commands/pipeline.py`, `tests/commands/test_load_and_pipeline.py`, `src/devops_cli/config/commands.py` (lines 474 to 485, `build_dagger_cmd`). Changes: `src/devops_cli/commands/pipeline.py`, `tests/commands/test_load_and_pipeline.py`, `tests/fixtures/dry_run_gaps.json`. -- [ ] 2.1 In `tests/commands/test_load_and_pipeline.py`, replace `test_pipeline_run_dry_run` (it asserts `DRY_RUN` in the echo). Write the failing tests: `devops pipeline --dry-run` and `devops --dry-run pipeline `, with `run_subprocess` and `shutil.which` patched to fail, print one request `dagger call -m ` with the `--function` name and the `--args` values. Add a test that runs the real command against a recorded `run_subprocess` and compares its argv with the plan. Assert that the output holds no `SIMULATED_SUCCESS`. Verify with `uv run devops ci test tests/commands/test_load_and_pipeline.py`. The new tests must fail on the base because the output is the old echo -- [ ] 2.2 In `src/devops_cli/commands/pipeline.py`, replace the `render_dry_run_result` block with a request plan built from `build_dagger_cmd(pipeline_path.resolve(), function_name, args)`, the call that the real run makes. Add `@dry_run_class("request-plan")`, keep the path and name checks before the plan, and remove the import of `render_dry_run_result`. Remove the path `pipeline` from `tests/fixtures/dry_run_gaps.json`. Verify with `uv run devops ci test tests/commands/test_load_and_pipeline.py tests/invariants/test_dry_run_class_ratchet.py` +- [x] 2.1 In `tests/commands/test_load_and_pipeline.py`, replace `test_pipeline_run_dry_run` (it asserts `DRY_RUN` in the echo). Write the failing tests: `devops pipeline --dry-run` and `devops --dry-run pipeline `, with `run_subprocess` and `shutil.which` patched to fail, print one request `dagger call -m ` with the `--function` name and the `--args` values. Add a test that runs the real command against a recorded `run_subprocess` and compares its argv with the plan. Assert that the output holds no `SIMULATED_SUCCESS`. Verify with `uv run devops ci test tests/commands/test_load_and_pipeline.py`. The new tests must fail on the base because the output is the old echo +- [x] 2.2 In `src/devops_cli/commands/pipeline.py`, replace the `render_dry_run_result` block with a request plan built from `build_dagger_cmd(pipeline_path.resolve(), function_name, args)`, the call that the real run makes. Add `@dry_run_class("request-plan")`, keep the path and name checks before the plan, and remove the import of `render_dry_run_result`. Remove the path `pipeline` from `tests/fixtures/dry_run_gaps.json`. Verify with `uv run devops ci test tests/commands/test_load_and_pipeline.py tests/invariants/test_dry_run_class_ratchet.py` ## 3. test load and test run Reads: `src/devops_cli/commands/test_cmd.py` (lines 1 to 310), `src/devops_cli/config/commands.py` (lines 457 to 471, `build_k6_cmd`), `tests/commands/test_load_and_pipeline.py`, `tests/commands/test_test_runner.py` (the function `_changed_run`, the test `test_test_run_dry_run`, and the fixtures they use). Changes: `src/devops_cli/commands/test_cmd.py`, `tests/commands/test_load_and_pipeline.py`, `tests/commands/test_test_runner.py`, `tests/fixtures/dry_run_gaps.json`. -- [ ] 3.1 Write the failing tests. In `tests/commands/test_load_and_pipeline.py`, replace `test_test_load_dry_run`: `devops test load