Repository navigation
Description
Problem
devops repos onboard gives the template answers only through its flags (--release-type, --release-flow, --scope, ...). The template of dan-petty/infra gets a code_coverage question (dan-petty/infra issue of 2026-11-23), and devops-cli needs it set to true, else row 10 removes its code_coverage rule (plan on #6784).
Proposed remedy
- A flag
--code-coverage/--no-code-coveragethat gives the answer, with the same rule as the other answer flags: it gives a value only before.copier-answers.ymlexists, and the command refuses a flag that differs from that file.
Acceptance criteria
- A test:
--code-coveragerenders a baseline whose ruleset holds thecode_coveragerule, and a differing flag after.copier-answers.ymlexists is refused. - docs/repos/onboard.md names the flag.
Dependencies
The dan-petty/infra template question and its release.
Alternatives check of 2026-11-30: in-use.
The repository already uses this tool.
Tool: copier-org/copier (https://github.com/copier-org/copier), MIT, last activity 2026-11-28, maintained.
Reason: Copier renders the template and passes answers with --data, and it records .copier-answers.yml. It gives no code_coverage flag and no refusal of a differing value, so devops-cli must add them.
Covers:
- Renders project templates from a questionnaire of answers
- Passes extra answers with the --data option
- Records answers in .copier-answers.yml for later updates
- Updates a rendered project from a newer template
Lacks:
- No --code-coverage flag of its own
- No refusal when a flag differs from the answers file
- No code_coverage question; the template owns it
- No ruleset or baseline check after the render
Proposed design
Problem statement
Add --code-coverage/--no-code-coverage to devops repos onboard; hold the item until the dan-petty/infra template release. The command gives the template answers only through flags. The template gets a code_coverage question, and devops-cli needs the answer true so row 10 keeps the code_coverage rule. The new flag follows the answers-file rule of the other answer flags. The baseline cannot hold the rule before the template release.
Acceptance criteria
Requirement: The command offers the code coverage answer flag
devops repos onboard SHALL offer --code-coverage and --no-code-coverage beside the other answer flags.
Scenario: The help output lists the code coverage flag
- WHEN A test runs
devops repos onboard --help. - THEN The output contains
--code-coverageand--no-code-coverage.
Requirement: The code coverage flag gives the true answer
devops repos onboard SHALL pass code_coverage=true to the template render when --code-coverage is given and .copier-answers.yml does not exist.
Scenario: The stub copier records the true code coverage answer
- WHEN A test runs the command with
--code-coverageon a repository with no.copier-answers.yml, with a stubcopierprogram onPATH. - THEN The stub records
code_coverage=truein the--dataarguments of its call.
Requirement: The no-code-coverage flag gives the false answer
devops repos onboard SHALL pass code_coverage=false to the template render when --no-code-coverage is given and .copier-answers.yml does not exist.
Scenario: The stub copier records the false code coverage answer
- WHEN A test runs the command with
--no-code-coverageon a repository with no.copier-answers.yml, with a stubcopierprogram onPATH. - THEN The stub records
code_coverage=falsein the--dataarguments of its call.
Requirement: The omitted flag adds no code coverage answer
The command MUST add no code_coverage value to the template render when neither --code-coverage nor --no-code-coverage is given.
Scenario: The stub copier records no code coverage answer
- WHEN A test runs the command with neither flag on a repository with no
.copier-answers.yml, with a stubcopierprogram onPATH. - THEN The stub records no
code_coveragevalue in the--dataarguments of its call.
Requirement: A differing code coverage flag is refused
The command MUST refuse a --code-coverage or --no-code-coverage value that differs from .copier-answers.yml, with exit status 2.
Scenario: A differing flag after the first render
- WHEN A test runs the command with
--no-code-coverageon a repository whose.copier-answers.ymlholdscode_coverage: true. - THEN The command exits 2, and its output names
code_coverageandcopier update --data code_coverage=false.
Requirement: A matching code coverage flag is accepted
The command MUST accept a --code-coverage value that matches code_coverage: true in .copier-answers.yml.
Scenario: A matching flag after the first render
- WHEN A test runs the command with
--code-coverageon a repository whose.copier-answers.ymlholdscode_coverage: true. - THEN The command reports no differing
code_coveragevalue and exits with a status other than 2.
Requirement: The generated command reference holds the flag
The change MUST regenerate docs/CLI_REFERENCE.md from the command, so that the command matrix holds --code-coverage.
Scenario: The docs row accepts the regenerated reference
- WHEN A run of
uv run devops ci --check --only docschecks the changed tree. - THEN The row exits 0 and reports no stale generated document.
Requirement: The onboard page names the flag
docs/repos/onboard.md MUST name --code-coverage/--no-code-coverage with the other answer flags in the section The baseline.
Scenario: The onboard page holds the flag
- WHEN A test reads
docs/repos/onboard.md. - THEN The section The baseline contains
--code-coverage/--no-code-coverage.
Requirement: Pending a person after the merge
After the template release, a person MUST confirm that a rendered baseline keeps the code_coverage rule.
Scenario: The live onboard run keeps the code coverage rule
- WHEN A person runs
uv run devops repos onboard <repo> --confirmon a repository with the template release and reads the rulesetmain. - THEN The command reports row 10
presentand the rulesetmainholds acode_coveragerule.
Existing Tool Considered
The alternatives check in the issue body records in-use for copier-org/copier (https://github.com/copier-org/copier), MIT, maintained. The block lists what Copier covers and lacks. The change adds only the named --code-coverage/--no-code-coverage flag and the answers-file refusal rule that the block lists as lacking. It passes the answer through Copier's --data option. The change builds no renderer.
Key questions
- How does the command give the
code_coverageanswer to the template?: Add the tri-state option--code-coverage/--no-code-coveragebeside the other answer flags. Addcode_coverageto the--dataarguments ofcopieronly when.copier-answers.ymldoes not exist. Refuse a given value that differs from the file with exit status 2. (best practice) [sources: docs/repos/onboard.md, src/devops_cli/github/onboard/baseline.py, CONTEXT.md]- Chosen: Tri-state flag beside the other answer flags. The page gives this rule for
--scope,--release-flowand--release-type; one rule for each answer flag is easy to keep. - Rejected: Read
code_coveragefrom.devops/project.tomlor the devops-cli config. The config holds operational keys only, and.copier-answers.ymlalready holds the template answers. - Rejected: Always pass
code_coverage=truewith no flag. The command would refuse each repository whose answers file holds another value and would answer a question that a person did not answer.
- Chosen: Tri-state flag beside the other answer flags. The page gives this rule for
- Which value does devops-cli need for
code_coverage?:true. Row 10 builds the rulesetmainfrom the rendered baseline. The answerfalsewrites a ruleset with nocode_coveragerule. (best practice) [sources: docs/repos/onboard.md]- Chosen: Use
true. Row 10 builds the rulesetmainfrom the rendered baseline, and devops-cli needs thecode_coveragerule. - Rejected: Use
false. The rendered ruleset would have nocode_coveragerule.
- Chosen: Use
- Which documents name the answer flags?:
docs/repos/onboard.mdnames them in the section The baseline.docs/CLI_REFERENCE.mdis generated and holds the command matrix, so the change regenerates it. Thedocsrow ofStatic Analysischecks the generated document. [sources: docs/repos/onboard.md, docs/CLI_REFERENCE.md, CONTEXT.md] - Does the work wait on the dan-petty/infra template release?: Yes. The baseline is the template at one ref. A render before the release gives no
code_coveragerule, and row 10 writes none. [sources: docs/repos/onboard.md]
Fit
Fits in one pull request.
Suspected block
The code_coverage question of the dan-petty/infra template and its release (dan-petty/infra issue of 2026-11-23).
Dependencies
None.
Activity
dan-petty commentedon Nov 23, 2026
Both touch the code_coverage rule, but #850 adds diff-cover to CI while the candidate adds an onboard flag to set the rule.devops-cli-service commentedon Nov 23, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 23, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (4)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence