Repository navigation
Description
Problem Description
acceptance_criteria in src/devops_cli/roadmap/stage/stage_criteria.py keeps a criteria list open up to the next heading. It removes only the refine block from the body, not the alternatives block. Thus the Covers and Lacks list items of an alternatives block that follows a person's Acceptance criteria list become acceptance criteria of the item.
The stage job uses these lists in criterion_problems (stage_change.py). It refuses a plan that does not map the Lacks lines as criteria. The lists also go to check_completeness (stage_ready.py, watch_row.py) and to implement_run.py. implement_step.issue_inputs reads section_text after _without_comments, so the text of the alternatives block also goes into the last section of the person's text.
#6613 fixes the same defect in _section_tokens of refine.py (the Dependencies and Key questions readers). It does not change these readers.
Reproduction Steps
- Read the open items read-only with
GitHubRoadmapStore("dan-petty/devops-cli").open_items(). - For each item, compare
acceptance_criteria(body)withacceptance_criteria(without_alternatives(body)).
Expected vs Actual Behavior
Expected: the two lists are the same, because the alternatives block holds no criterion of a person.
Actual, on 2026-11-21: 6 of 816 open items give a longer list with the alternatives block: #4141 (+8), #5542 (+3), #5922 (+7), #6342 (+6), #6469 (+3) and #6523 (+3). An example from #6523 is the Lacks line "No tool compares a stored rules version with the current one".
Proposed fix
End a section at a job block marker (CONST_ROADMAP_REFINE_*_MARKER, CONST_ROADMAP_ALTERNATIVES_*_MARKER) in acceptance_criteria and in the section_text readers, or let them read without_alternatives(body). Use the same rule as _JOB_BLOCK_MARKERS in refine.py (#6613).
Source
Source: #6624
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches found only general Markdown parsers and documentation; none knows the project's job-block marker constants or the acceptance_criteria and section_text readers, so no library covers this internal fix.
Lacks:
- No awareness of the project's job-block marker constants
- No acceptance-criteria or section_text reader semantics
- No replacement for reading without_alternatives(body)
Proposed design
Problem statement
The stage acceptance criteria reader continues a person's list through an alternatives block. Covers and Lacks items then become criteria, and the stage job refuses a plan that does not map them. The implement section reader also puts the alternatives text into the person's last section. The fix ends both readers at the job block markers.
Acceptance criteria
Requirement: Stage criteria stop at alternatives marker
The acceptance_criteria reader in stage_criteria.py SHALL end an open acceptance-criteria section at a job block start marker.
Scenario: Alternatives block follows a person's criteria list
- WHEN
acceptance_criteria(body)reads a body withFirst criterionandSecond criterionunderAcceptance criteria, then<!-- devops-roadmap-alternatives:start -->and aLacks:item. - THEN The result is
['First criterion', 'Second criterion']and holds noLacks:item.
Requirement: Stage check ignores alternatives lines
The stage criterion check SHALL NOT require a plan to map a Covers or Lacks line from the alternatives block.
Scenario: Plan maps only the person's criteria
- WHEN
criterion_problemsruns on a body with one person criterion and an alternatives block that holds aLacks:item, and the plan maps only the person criterion. - THEN
criterion_problemsreturns no problem that names theLacks:item.
Requirement: Implement section text stops at job markers
The implement-step section reader SHALL end the person's section text at each job block start marker.
Scenario: Job blocks follow the last person section
- WHEN
implement_step.issue_inputsreads a body whose last person section is followed by the refine start marker and by the alternatives start marker. - THEN The section text for that issue holds no text from either job block.
Requirement: Person criteria still read with no job block
The acceptance_criteria reader SHALL return every top-level item under a person's Acceptance criteria heading when the body holds no job block.
Scenario: Body has only a person's criteria list
- WHEN
acceptance_criteria(body)reads a body with anAcceptance criteriaheading and two top-level items, and no job block marker. - THEN The result holds both items in source order.
Existing Tool Considered
The alternatives check of 2026-11-21 returned none; the block in the issue body names no tool. The project builds the fix itself: one marker rule in two readers, about 2,000 build tokens, about 1,000 tokens per later fix, and about 2 hours elapsed.
Key questions
- How should the stage and implement readers find the end of a person's section?: End the section at the job block start markers, using the same marker set as
_section_tokensinrefine.py. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:1175, src/devops_cli/roadmap/refine/refine.py:1223, src/devops_cli/roadmap/stage/stage_criteria.py:231]- Chosen: Reuse the job-block marker boundary from refine.py. fix(roadmap): an alternatives block names no blocker of an item #6613 already applies this boundary to the Dependencies and Key questions readers, so one rule keeps the readers aligned.
- Rejected: Strip the alternatives block from the body before parsing. A global strip duplicates boundary logic and does not help a section reader stop at each job block marker.
- Rejected: Match only the alternatives heading. The alternatives block is an HTML comment pair, not a heading, so heading matching misses the marker.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 21, 2026
Both stop a section reader at the alternatives block marker; #6613 fixes Dependencies and Key questions readers in refine.py, the candidate fixes acceptance_criteria and section_text readers in stage_criteria.py and implement_step.py.devops-cli-service commentedon Nov 21, 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 (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 25, 2026
Released in v0.218.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.218.1
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 07:43 UTC