Repository navigation
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Description
Friction
- On 2026-10-17, 8 open items were superseded by refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150 and 2 more by refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151. Each should close as not planned, with a comment naming what superseded it.
devops gh issues edit --state closedcloses an issue as completed, because its payload carries nostate_reason. Nodevops ghcommand posts an issue comment.- AGENTS.md forbids bare
gh, so every not-planned close needs a person in the GitHub web UI. - It has already gone wrong: fix(review): the verifier sees masked windows around the cited lines, not the whole file and the linked-file skeletons #1017 and refactor(review): one finding verifier owns the verdict and its side effects #996 were closed on 2026-10-11 with "Superseded by refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150" but recorded as completed.
Evidence
Checked at main 3dd7fa6.
_build_issue_patch_payload(src/devops_cli/github/issues.py:452-481) sends only title, body, state, milestone and labels.devops gh issueshaslist,create,triage,statusandedit(src/devops_cli/commands/gh.py:958-1088), and nocloseorcomment.- The roadmap store already closes with a reason:
close_issue_args(src/devops_cli/roadmap/github_store.py:1258-1268) sendsstate_reason.CloseReason.NOT_PLANNEDis atsrc/devops_cli/roadmap/store.py:88. feat(release): release-please makes every release from main #1952 deletedclose_issue_argsandroadmap/migrate.py. On main, the store closes only a duplicate, with a comment (close_as_duplicate,src/devops_cli/roadmap/github_store.py:996).
Remedy
devops gh issues close <number> --reason completed|not-planned [--comment-file <path>]:- posts the comment first, then closes with
state_reason, both throughrun_ghand the rate limiter; - reuses
close_issue_argsrather than a second request builder; - reads the comment from a file (or
-for stdin), never from argv; --dry-runsends nothing and prints both requests.
- posts the comment first, then closes with
- An unknown reason exits 2, naming the allowed values.
- Labels stay as they are;
--remove-labeloneditalready removesstatus/blocked. - Priority under the owner's blocker rule (2026-10-17): no rule-driven raise. It blocks no filed item, so intake assigns it.
Acceptance criteria
- Tests first, offline, with
ghfaked at the process edge:- a not-planned close sends the comment POST, then a PATCH with
state=closedandstate_reason=not_planned; - a completed close sends
state_reason=completed; --dry-runsends nothing;- an unknown reason exits 2 and sends nothing.
- a not-planned close sends the comment POST, then a PATCH with
-
devops docs generate --sync-readmeoutput is committed, anddevops docs checkpasses. -
uv run devops cipasses.
Related
- refactor(review): the model verifier, the hallucination catalog and the model-claim guards are deleted, and person-recorded verdicts become suppressions #1150, refactor(review): the persona review stage, the legacy segment engine and review-time RAG are deleted, and devops review builds a model client only for the explanation stages #1151, feat(review): evidence-first code review — tools find, version-pinned facts ground, models explain and plan, fixes are re-checked #1137 (its frozen table names the items that close this way), fix(review): the verifier sees masked windows around the cited lines, not the whole file and the linked-file skeletons #1017, refactor(review): one finding verifier owns the verdict and its side effects #996.
Proposed design
Problem statement
The devops gh issues edit --state closed command closes an issue as completed. Its payload carries no state_reason. No devops gh command posts an issue comment. AGENTS.md forbids bare gh, so every not-planned close requires a person in the GitHub web UI. This has caused errors: issues #1017 and #996 were closed as completed when they should be not planned. A new devops gh issues close command closes an issue with a state_reason and an optional comment, both through run_gh.
Acceptance criteria
- Criterion 1: A not-planned close sends a comment POST, then a PATCH with
state=closedandstate_reason=not_planned.
Verification: Run the offline test withghfaked at the process edge. Assert the first call is a POST to the issue comments endpoint. Assert the second call is a PATCH whose body containsstate: closedandstate_reason: not_planned. - Criterion 2: A completed close sends a PATCH with
state_reason=completed.
Verification: Run the offline test. Assert the PATCH body containsstate: closedandstate_reason: completed. - Criterion 3:
--dry-runsends no request and prints both the comment POST and the close PATCH.
Verification: Run the offline test with--dry-run. Assert no HTTP calls were made. Assert the output contains both request descriptions. - Criterion 4: An unknown reason exits 2, names the allowed values, and sends no request.
Verification: Run the offline test with--reason invalid. Assert the exit code is 2. Assert the output namescompletedandnot-planned. Assert no HTTP calls were made. - Criterion 5:
devops docs generate --sync-readmeoutput is committed anddevops docs checkpasses.
Verification: Runuv run devops docs check. Confirm it exits 0. - Criterion 6:
uv run devops cipasses.
Verification: Runuv run devops ci. Confirm it exits 0.
Key questions
- Does
close_issue_argsexist on main for the new command to reuse?: No. feat(release): release-please makes every release from main #1952 deletedclose_issue_argsandroadmap/migrate.py. On main, the store closes only a duplicate viaclose_as_duplicate. The new command builds its own request. [sources: src/devops_cli/roadmap/github_store.py] - What is the order of API calls when closing with a comment?: Post the comment first, then close with
state_reason. Both go throughrun_ghand the rate limiter. (proposed) - How is the comment text supplied?: From a file path or
-for stdin. Never from argv. (proposed) - What happens when an unknown reason is given?: The command exits 2 and names the allowed values. It sends no request. (proposed)
- What does
--dry-rundo?: It sends no request. It prints both the comment POST and the close PATCH. (proposed)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/featureType feature: a new functionvalue/mediumValue Medium
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 18, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate proposes a new command-line feature to close issues with a reason and comment.It addresses a process issue in how superseded items are closed, but does not block other work or introduce immediate risks.Improves consistency and clarity of issue management for roadmap items, especially those superseded by newer ones.Requires implementing a new command with comment posting and state reason handling, plus tests and documentation updates.dan-petty commentedon Oct 28, 2026
Status set to Ready at 4da1e34 (see proposed design in issue body).
chore(main): release 0.13.0 (#2581)