Repository navigation
Description
Problem
When a person rejects a plan pull request, the evidence stays on the closed pull request. The issue gets only the comment returned per agent request. Refine then sets the issue to Ready again and can restate the false premise. So an item reads Ready while its evidence shows that nobody can build it as written. A person or an agent who reads only the issue does not see this.
These 4 issues read status/ready at 2026-11-04T17:30Z:
- feat(roadmap): Run
devops reviewon the diff before marking PR ready #3049, PR docs(openspec): plan #3049 Plan the review gate before the ready mark #3183:devops reviewfails closed in the runner, because the runner has nobwrapand no scanners. - feat(roadmap): a run console: follow a run and read its history #3076, PR docs(openspec): plan #3076 plan the roadmap follow console #3205: no source holds a history of runs.
- feat(roadmap): a comment by a person on an item starts a suspended row again #2754, PR docs(openspec): plan #2754 x #3167: each row except
intakegets a new input at each hour, so the premise does not hold. - fix(config): devops config unset --dry-run prints the credential that it would remove #2740, PR docs(openspec): plan #2740 Redact config unset dry-run value #3158: feat(config): preview requests in dry run for config commands #2963 removed the
--dry-runoption ofdevops config unset, but the issue text still says that the option prints a diff.
The stage job does not repeat these 4 plans today. devops roadmap explain gives held by a pushed branch for #3076. #3049, #2754 and #2740 first fail the title rule (98, 61 and 72 characters, limit 60). A repeat needs a deleted branch, as for #3388 after PR #3396.
The evidence comments ask a person to run devops roadmap return <n> --comment "<evidence>" --confirm, because the command "fails with 401 in an agent session". Nobody verified this 401 for this issue. If return works, it delivers the evidence with no new code. Frequency is low: in the window 2026-11-03T15:05Z to 2026-11-04T15:05Z, only PR #3396 closed unmerged.
The 4 issues need a separate action now. AGENTS.md rule 2 applies to them: return them with the evidence, or close them as rejected. This item does not do that.
Expected
The issue holds the reason for the rejection. Refine and the stage job read that reason as an input. The stage job takes the item again only after its body or a cited file changes. The branch of a closed plan pull request does not hold the item for good: the job deletes the branch, or it ignores the branch when the plan pull request is closed.
Acceptance criteria
- The pull request states whether
devops roadmap returnstill fails with 401 in an agent session, and it quotes the output. If the 401 remains, the pull request corrects that cause first. - A test: a closed unmerged plan pull request copies its last comment that is not by the Service and is over a set length to the issue, in a marked block.
- A test: a last comment of one word, such as
rejected, does not count as evidence. The job takes the comment before it (PR docs(openspec): plan #3049 Plan the review gate before the ready mark #3183, PR docs(openspec): plan #3076 plan the roadmap follow console #3205, PR docs(openspec): plan #2740 Redact config unset dry-run value #3158). - A test: the refine request and the stage request of that item hold the block.
- A test: the stage job leaves out the item until the body hash or a cited path changes, and
devops roadmap explainnames the pull request. - A test: after a body change, the stage job takes the item, and the branch of the closed plan pull request does not hold it.
Existing tool considered
The block_paths record and _cited_code_changed of src/devops_cli/roadmap/refine.py (lines 245 and 1574) cover the "changed since" check. devops roadmap return --comment (src/devops_cli/roadmap/return_item.py) delivers evidence to the issue. issue_holder (src/devops_cli/git/worktree_add.py:442) is the branch hold to change. No outside tool covers this flow.
Related
Related: #3387, #3418, #3388, #3049, #3076, #2754, #2740
Proposed design
Problem statement
When a person rejects a plan pull request, the evidence stays on the closed pull request. The issue gets only the comment returned per agent request. Refine then sets the issue Ready again and can restate the false premise. So an item reads Ready while its evidence shows that nobody can build it as written. A person or an agent who reads only the issue does not see this.
Acceptance criteria
Requirement: Rejection evidence on the item
The stage job SHALL copy the newest comment that a person wrote on a closed unmerged plan pull request to the item body, in a marked block.
Scenario: A closed plan pull request leaves its evidence
- WHEN a plan pull request closes unmerged and its newest comment of a person holds at least the set length
- THEN the item body holds the marked block with that comment and the number of the pull request
Requirement: A one-word comment is no evidence
The stage job SHALL skip a comment shorter than the set length and SHALL copy the newest comment that reaches the set length.
Scenario: A verdict word is skipped
- WHEN the newest comment of a person on the closed plan pull request is
rejected - THEN the block holds the comment before it, and the block holds no one-word verdict
Requirement: The block leaves out the body hash
The body hash that the jobs compare MUST leave out the rejection block and its record line.
Scenario: A written block keeps the body hash
- WHEN the stage job writes the rejection block to the item body
- THEN
body_hashesreturns the body hash that it returned before the write
Requirement: Both requests carry the block
The refine request and the stage request SHALL hold the rejection block under the key plan_rejection.
Scenario: Both requests hold the evidence
- WHEN the item body holds the rejection block
- THEN the
plan_rejectionkey of each request holds the block text and the pull request number
Requirement: The stage job waits for a change
The stage job SHALL leave out an item with a rejection block until its body hash or a cited path changes.
Scenario: An unchanged item stays out
- WHEN a stage round reads an item whose body hash and cited paths did not change since the block
- THEN the job leaves the item out, and
devops roadmap explainnames the closed pull request
Requirement: A change releases the item
The stage job SHALL take the item after its body changes, and the branch of the closed plan pull request MUST NOT hold it.
Scenario: The branch of a closed plan pull request holds nothing
- WHEN a person changes the body of an item whose plan pull request closed unmerged, and only the App wrote to its branch
- THEN the stage round takes the item, and the job deletes the branch from origin
Requirement: The copy needs no agent session
The stage job SHALL write the rejection evidence with the store's comment call and MUST NOT run devops roadmap return.
Scenario: The copy runs no subprocess
- WHEN the stage job copies the evidence of a closed plan pull request
- THEN the store's comment call writes the block, and no subprocess runs
devops roadmap return
Existing Tool Considered
No alternatives check has run on this item. No open, maintained tool or library covers this flow. The flow copies the review comment of a closed plan pull request onto its issue. It gates the stage job on the body hash and the cited paths, and it frees the branch. The change builds on the repository's own code: block_paths and _cited_code_changed in src/devops_cli/roadmap/refine.py, devops roadmap return in src/devops_cli/roadmap/return_item.py, and issue_holder in src/devops_cli/git/worktree_add.py. Written cost: about 80,000 tokens to build the copy, the block, the two requests and the branch rule. About 15,000 tokens each year keep and fix that code. The elapsed time is about 3 days.
Key questions
- Which code holds an item that a pushed branch names?:
issue_holderinsrc/devops_cli/git/worktree_add.pyreads the pushed branches, and the stage job leaves out the item that it names. Refine records the same wait as a block path. [sources: src/devops_cli/git/worktree_add.py, src/devops_cli/roadmap/stage.py, openspec/changes/archive/2026-10-29-2714-planned-items/proposal.md] - How does refine read a stage return today?:
_stage_returnreads the newest comment after refine's last comment that holds the stage marker, and only when the item holds no staged branch._returned_waitthen puts the item on a person after a second return on the same body. [sources: src/devops_cli/roadmap/refine.py, openspec/specs/roadmap-refine/spec.md] - Which actor copies the rejection evidence to the issue?: The stage job copies the evidence with the store's own comment call. No agent session runs
devops roadmap return. (best practice) [sources: src/devops_cli/roadmap/return_item.py, src/devops_cli/roadmap/refine.py, CONTEXT.md]- Chosen: The stage job's store call. It runs in the Service with the App token, so the unverified 401 of an agent session cannot stop it, and it needs no new command.
- Rejected:
devops roadmap returnrun by an agent. Nobody verified the 401 of the command in an agent session, and each rejection needs an agent session. - Rejected: A person runs
devops roadmap returnby hand. It puts the evidence on the issue only when a person acts, and the item reads Ready until then.
- Which comment of the closed pull request is the evidence?: The evidence is the newest comment that a person wrote and that holds at least 40 characters. (best practice) [sources: src/devops_cli/roadmap/refine.py, src/devops_cli/roadmap/trust.py]
- Chosen: Newest person comment of at least 40 characters. A verdict word such as
rejectedholds 8 characters, and a comment that names the cause holds more than 40. - Rejected: The last comment, whatever its length. PR docs(openspec): plan #3049 Plan the review gate before the ready mark #3183, PR docs(openspec): plan #3076 plan the roadmap follow console #3205 and PR docs(openspec): plan #2740 Redact config unset dry-run value #3158 end with a one-word verdict, which names no cause.
- Rejected: The body of the pull request. The reviewer's reason is in the comment thread, and the body holds the plan.
- Chosen: Newest person comment of at least 40 characters. A verdict word such as
- What ends the wait on a rejected plan?: A change of the body hash or of a cited path ends the wait. A reply comment does not end it, because the evidence is the input that the round needs. (best practice) [sources: src/devops_cli/roadmap/refine.py, src/devops_cli/roadmap/body_hash.py]
- Chosen: Body hash or cited path change. It is the check that
_cited_code_changedandbody_hashesalready make, and the issue asks for it. - Rejected: Any new comment. A comment that does not change the body leaves the false premise in place.
- Rejected: A person's label change. It needs a person for each rejected plan and records no reason.
- Chosen: Body hash or cited path change. It is the check that
- What does the job do with the branch of the closed plan pull request?: The job deletes the branch when only the App wrote to it. (best practice) [sources: openspec/specs/roadmap-stage/spec.md, src/devops_cli/git/worktree_add.py]
- Chosen: Delete the branch when only the App wrote to it. The stage job already deletes the staged branch of a closed item under the same rule, and the name is free for the next plan.
- Rejected: Ignore the branch when its pull request is closed. The branch stays on origin and the next plan meets a name that exists.
- Which job reads the closed plan pull request?: The stage round reads it, in the selection that already calls
issue_holderfor each Ready item. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/stage.py]- Chosen: The stage round. It reads every Ready item each round and already asks why a branch holds it.
- Rejected: A new row on the status lane. It adds a schedule row, settings and Service wiring for an event that the stage round already sees.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.The state inconsistency misleads readers of the issue, but the frequency is low with one affected PR in the observed window.It prevents a roadmap item from appearing Ready when its evidence shows the premise is false, which protects downstream agents and people.It needs changes to the return flow, the stage job branch rule, and the refine job, plus five specified tests.Both address the stage job being blocked by a branch hold, but #3387 fixes replacement of a failing draft plan while this item fixes evidence transfer and branch release after a PR is closed unmerged.devops-cli-service commentedon Nov 5, 2026
Status set to Ready at f481be8 (see proposed design in issue body).
Moved to new items: #3707.
docs(openspec): plan #3503 a rejected plan leaves its evidence
docs(openspec): archive #3503 a rejected plan leaves its evidence
devops-cli-service commentedon Nov 6, 2026
Released in v0.64.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.64.1
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 03:21 UTC