Repository navigation
Description
Problem Description
The dry-run plan of devops review corpus generate lists one request, POST <embedding endpoint>/embeddings (plan_review_corpus_generate in src/devops_cli/review/review_plans.py). The real run makes no external request: it reads the source files, injects defects from the local templates with generate_corpus (src/devops_cli/ai/review/defects.py) and writes the corpus folder. So the plan names a request that the run never makes, and the command has the request-plan dry-run class where the rule of #412 gives a local command that writes files the no-external-request class with a preview that writes nothing.
Reproduction Steps
- Run
uv run devops review corpus generate src --dry-run. - Read the planned request.
- Read
corpus_generateinsrc/devops_cli/commands/review.pyandgenerate_corpusinsrc/devops_cli/ai/review/defects.py: no model client and no HTTP client.
Expected vs Actual Behavior
- Expected: the dry run shows the corpus folder and the files that the run would write, and lists no external request.
- Actual: the dry run lists an embedding request.
Environment Diagnostics
origin/main at release 0.127.0.
Logs, Traces, or Terminal Output
None.
Proposed Fix
Give review corpus generate and its ai review alias the no-external-request class with a local preview that writes nothing, as review export-feedback has. Delete plan_review_corpus_generate and _get_review_embedding_target, and update the requirement review-request-plans of openspec/specs/command-dry-run-class/spec.md and the lists of tests/commands/test_review_dry_run.py.
Alternatives check of 2026-11-28: none.
Tool: none found.
Reason: Searches for an open tool that classifies CLI dry runs found only unrelated web-platform docs. The need is a project-internal reclassification of review corpus generate and removal of its own plan helpers, which no library supplies.
Lacks:
- No tool assigns a project's dry-run classes
- No tool removes the command's unused plan helpers
- No tool renders a local preview of files a run would write
Proposed design
Problem statement
The review corpus generate dry run plans an embedding request that the real run never makes. The real run reads local source files, injects defects, and writes a corpus folder. The dry run must use the local no-external-request class, show the planned folder and files, and delete the unused plan code.
Acceptance criteria
Requirement: Corpus dry run class
The review corpus generate command SHALL use the no-external-request dry-run class.
Scenario: Local corpus dry run
- WHEN
uv run devops review corpus generate src --dry-runruns - THEN the command exits 0, lists the corpus output folder and the files it would write, and its request list is empty.
Requirement: Corpus dry run writes nothing
The dry run of review corpus generate MUST write no file.
Scenario: No files written
- WHEN
uv run devops review corpus generate src --dry-runruns - THEN the command creates no file and no folder.
Requirement: Alias dry run
The ai review alias of review corpus generate SHALL use the same no-external-request dry-run class.
Scenario: Alias local dry run
- WHEN
uv run devops ai review corpus generate src --dry-runruns - THEN the command exits 0, lists the corpus output folder and the files it would write, and its request list is empty.
Requirement: Unused plan helpers removed
The review dry-run plan module MUST NOT define plan_review_corpus_generate or _get_review_embedding_target.
Scenario: Plan helpers removed
- WHEN a source test inspects
src/devops_cli/review/review_plans.py - THEN the test finds no definition or call of
plan_review_corpus_generateor_get_review_embedding_target.
Requirement: Spec and test lists updated
The review-request-plans requirement and the dry-run test lists MUST record review corpus generate under no-external-request.
Scenario: Spec and test alignment
- WHEN
uv run pytest tests/commands/test_review_dry_run.py -qruns - THEN the test passes and asserts the command is in the
no-external-requestclass and not in therequest-planclass.
Existing Tool Considered
The alternatives check in the issue body records verdict none and no tool. No open, maintained tool or library covers the classification of a project-specific CLI dry-run. The change reuses the project's existing no-external-request dry-run class and removes the project-specific plan code; it adds no library.
Key questions
- Does
review corpus generatemake an external request?: No. The command reads local source files, injects defects withgenerate_corpus, and writes a corpus folder. It calls no model client and no HTTP client. [sources: src/devops_cli/commands/review.py:1950, src/devops_cli/ai/review/defects.py:1294] - Which dry-run class should
review corpus generateuse?: Use theno-external-requestclass with a local preview that writes nothing. The command writes local files and makes no external request. (best practice) [sources: src/devops_cli/review/review_plans.py:145, openspec/specs/command-dry-run-class/spec.md]- Rejected: Keep the
request-planclass. It names an embedding request that the run never makes. - Chosen: Use the
no-external-requestclass. It matches a local command that writes files and makes no external request.
- Rejected: Keep the
- Should the corpus plan helper and the embedding target helper be deleted?: Yes. Delete
plan_review_corpus_generateand_get_review_embedding_target. The corpus plan is their only caller. (best practice) [sources: src/devops_cli/review/review_plans.py:45, src/devops_cli/review/review_plans.py:145, src/devops_cli/commands/review.py:1950]- Rejected: Keep the unused helpers. They would stay dead code and keep the false request path.
- Chosen: Delete both helpers. The corpus plan is their only caller, so no other plan uses them.
- What should the local dry-run preview show?: Show the corpus output folder and the files that the real run would write. Write no file and no folder. (best practice) [sources: src/devops_cli/ai/review/defects.py:1294, src/devops_cli/commands/review.py:1950]
- Rejected: Show only the output folder. It hides the files that the run writes.
- Chosen: Show the output folder and the files, and write nothing. It matches the local write and the
no-external-requestclass.
- Which specification and test lists must change?: Update the
review-request-plansrequirement inopenspec/specs/command-dry-run-class/spec.mdand the dry-run class lists intests/commands/test_review_dry_run.py. (best practice) [sources: openspec/specs/command-dry-run-class/spec.md, tests/commands/test_review_dry_run.py]- Rejected: Update only the test lists. The specification would keep the wrong request-plan entry.
- Rejected: Update only the specification. The test lists would keep the wrong class.
- Chosen: Update both. The specification and the tests then agree with the command behavior.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both set dry-run classes for review commands, but #2248 assigned the classes while this fixes a misclassification of corpus generate.devops-cli-service commentedon Nov 17, 2026
Alternatives check: none
Reason: The issue is a misclassification inside the project's own dry-run plan code (
plan_review_corpus_generateinsrc/devops_cli/review/review_plans.py): the fix is to movereview corpus generateto the existingno-external-requestdry-run class and delete the plan function. Searches for an open tool or library that builds dry-run previews of local file writes for a CLI returned only unrelated HTTP and tutorial pages, so no external tool covers the need.Tool: none found
Lacks:
no-external-requestdry-run class forreview corpus generateand itsai reviewaliasplan_review_corpus_generateand_get_review_embedding_target, which is project-specific codeSearches run:
Sources:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Status set to Ready at 2620fae (see proposed design in issue body).
fix(review): switch corpus generate dry run to local preview (#5396)
devops-cli-service commentedon Nov 29, 2026
Released in v0.247.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.247.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:17 UTC