Repository navigation
Description
Problem
Area 5 of the parent item.
- Intake writes "Related: #N" for a number that the body already names. Refine files a deferral with no
source(refine.py:3258, on purpose, so no sub-issue link is made), so_apart(intake.py:857) compares the new issue with its parent and says "Related: #" next to "Split from #." in the body._reason_lines(intake.py:1090) has no check for a number in the body. The Priority line repeats the value of thepriority/*label that intake writes in the same run. Live: fix(roadmap): Give read_issue, fix-plan and fix-checks every comment #6189 ("Open points left by fix(roadmap): Give stage and implement the person comments #6167" in the body, "Related: fix(roadmap): Give stage and implement the person comments #6167" in the comment); 34 of 57 sampled lines name an issue that the body names. - Retitle writes "- After:
<new title>" (messages.py:3123,retitle.py:428-446), which repeats the title it set in the same run (fix(security): Judge Trivy-config KSV-0017 in gpu-feature-discovery #6134, fix(security): Judge KSV-0118 in chart_render.yaml #6135).
Expected behavior
- A refine deferral candidate carries an
apartset onNewCandidate: the parent and the numbers inrefine.deferred._apartdoes not compare it with them. _reason_lineswrites no Related line for a number that the body references. Use the existing #N reference parser of the roadmap package.- A "Possible duplicate: #N" line always stays, also when the body names #N (rule: flag, never drop).
- The Priority line keeps the reason and the P0 granted or refused text, without the value that the label shows.
- A candidate with no lines left gets no comment (existing behavior,
intake.py:1268-1274). - The retitle comment keeps the reason, the length and limit, the source of the summary and "Before". It has no After line.
- Contract tests: the intake reason comment against the candidate body (exempt the Possible duplicate line), and the retitle comment against the title.
Source: #6193
Alternatives check of 2026-11-24: none.
Tool: none found.
Reason: Searches for a library that parses #N references, suppresses comment lines that repeat an issue body or title, or carries a parent/apart set returned no relevant project; the change stays inside the roadmap package's own code.
Lacks:
- No tool parses #N references from candidate bodies
- No tool suppresses a comment line that repeats the body or title
- No tool carries an apart set for duplicate detection
- No tool builds or contracts the intake and retitle comments
Proposed design
Problem statement
Intake and retitle comments repeat text that the issue body or title already holds. A refine deferral makes intake write Related: #<parent> next to Split from #<parent>, and the Priority line repeats the value of the priority/* label from the same run. The retitle comment repeats the new title in an After line. The fix removes the repeated text and keeps each line that flags a duplicate.
Acceptance criteria
Requirement: A refine deferral names its apart set
NewCandidate SHALL carry an apart set of issue numbers that duplicate detection skips.
Scenario: A refine deferral skips its parent
- WHEN a test builds a
NewCandidatewithapart={6167}and runs the duplicate shortlist on it - THEN the shortlist holds no issue 6167
Requirement: No Related line for a number in the body
_reason_lines SHALL write no Related: #N line for an issue number that the candidate body references.
Scenario: The body already names the related item
- WHEN a test calls
_reason_linesfor a candidate whose body holds#6167and whose related items hold 6167 - THEN the lines hold no
Related: #6167line
Requirement: A Possible duplicate line always stays
The reason comment MUST keep each Possible duplicate: #N line, also when the body references #N.
Scenario: The body names the duplicate number
- WHEN a test calls
_reason_linesfor a candidate whose body holds#6167and whose duplicate is 6167 - THEN the lines hold
Possible duplicate: #6167
Requirement: The Priority line drops the label value
The Priority line SHALL hold the reason and the P0 granted or refused text, and SHALL NOT copy the value of the priority/* label.
Scenario: A P0 grant shows one priority value
- WHEN a test calls
_reason_linesfor a candidate with a P0 grant and a judgement that gives the reason - THEN the Priority line holds the reason and the granted text, and the test counts one
P0in it
Requirement: No comment when no line is left
Intake SHALL write no reason comment when the line list is empty.
Scenario: Each line would repeat the body
- WHEN a test runs intake on a candidate whose only reason line would repeat the body
- THEN intake makes no comment request to the fake GitHub client
Requirement: The retitle comment has no After line
The retitle comment SHALL hold the reason, the length and the limit, the source of the summary and the Before line, and SHALL NOT hold an After line.
Scenario: A title changes in the same run
- WHEN a test runs retitle on an issue whose title changes from
oldtonew - THEN the comment holds the Before line with
oldand holds no- After:line
Requirement: Contract test of the intake comment against the body
A test SHALL fail when a line of the intake reason comment holds an issue number that the candidate body also holds, except a Possible duplicate: line.
Scenario: A related number is in the body
- WHEN the test builds the reason comment for a candidate whose body holds
#6167and whose related items hold 6167 - THEN the test passes, and it fails when the
Related: #6167line is put back
Requirement: Contract test of the retitle comment against the title
A test SHALL fail when a line of the retitle comment holds the new title.
Scenario: The new title is in the comment
- WHEN the test runs retitle for a new title and reads each comment line
- THEN no line of the comment holds the new title
Existing Tool Considered
The alternatives check of 2026-11-18 in the issue body gives the verdict none and names no tool. The block lists what no external tool does: it parses no #N reference, suppresses no repeated comment line and holds no parent/apart set. This change builds its own code, so here is the written cost: about 150 lines in three modules, an estimated 45k tokens to build, about 9k tokens each year to keep and fix, and about one day elapsed. The repository already holds the reference parser, so the build is smaller than a new dependency.
Key questions
- Which
#Nreference parser does_reason_linesuse to find a number in the body?: Reuse the existing#Nreference parser of the roadmap package. Do not add a second regular expression, because two parsers would disagree on a reference. (best practice) [sources: src/devops_cli/roadmap/intake/intake.py:1099]- Chosen: Reuse the existing roadmap parser. The issue names it, and one parser keeps intake and refine in agreement.
- Rejected: Add a new regular expression in intake. A second parser drifts from the first and adds code to keep.
- How does a refine deferral candidate tell
_apartwhich numbers to skip?: Add anapartfield toNewCandidate, empty by default. Refine sets it to the parent and the numbers inrefine.deferred, and_apartremoves those numbers from the shortlist. (best practice) [sources: src/devops_cli/roadmap/intake/intake.py:215, src/devops_cli/roadmap/intake/intake.py:866, src/devops_cli/roadmap/intake/intake.py:1232, src/devops_cli/roadmap/refine/refine.py:3258]- Chosen: A field on
NewCandidate. The candidate carries the numbers, so each caller keeps its current signature. - Rejected: A new parameter of
_shortlist. It threads the set through each caller of the shortlist. - Rejected: A module-level set. Hidden state leaks between candidates and tests.
- Chosen: A field on
- Does refine add a
sourceto a deferral so intake makes a sub-issue link?: No. Refine files a deferral with nosourceon purpose, so no sub-issue link is made. Theapartset, not a source, stops the Related line. A candidate is never a duplicate of the issue that it is split from. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:3258, CONTEXT.md]- Chosen: Keep the
sourceempty. A sub-issue link would make the parent and its deferral look like a duplicate pair. - Rejected: Set the
sourceto the parent. It adds a link that the split does not need and repeats the parent number.
- Chosen: Keep the
- How does
_reason_lineskeep a Possible duplicate line and drop a Related line for the same number?: Decide by the kind of the line. APossible duplicate:line always stays, and the body check applies to aRelated:line only. (best practice) [sources: src/devops_cli/roadmap/intake/intake.py:1099, CONTEXT.md]- Chosen: Check the kind of the line. The rule is flag and never drop, so a duplicate line is not a repeat.
- Rejected: Apply the body check to each line. It would drop a Possible duplicate line and lose a flag.
- What does the Priority line hold when the label value goes?: It holds the reason and the P0 granted or refused text. It holds no copy of the value that the
priority/*label shows, because intake writes that label in the same run. (best practice) [sources: src/devops_cli/roadmap/intake/intake.py:1278]- Chosen: Drop the label value. The label holds the value, so a second copy adds no fact.
- Rejected: Keep the label value. It repeats the label in the same run, which is the defect.
- What does the retitle comment keep when the After line goes?: It keeps the reason, the length and the limit, the source of the summary and the Before line. It has no After line, because the comment and the new title are in the same run. (best practice) [sources: tests/roadmap/test_roadmap_retitle.py]
- Chosen: Drop the After line. The title on the issue shows the new value.
- Rejected: Keep the After line. It repeats the title that the same run set (fix(security): Judge Trivy-config KSV-0017 in gpu-feature-discovery #6134, fix(security): Judge KSV-0118 in chart_render.yaml #6135).
- How do the two contract tests show that the comment and the body or title agree?: The intake test builds the reason comment and fails when a line holds a number that the body holds, except a
Possible duplicate:line. The retitle test fails when a comment line holds the new title. (best practice) [sources: tests/roadmap/intake/test_roadmap_intake_evidence.py, tests/roadmap/test_roadmap_retitle.py]- Chosen: Contract tests in the two test modules. A later change to a comment writer fails the test that holds the rule.
- Rejected: No contract test. The repeat would come back with no test to stop it.
- Does intake stay silent when no reason line is left?: Yes. The existing behavior writes no comment when the line list is empty. [sources: src/devops_cli/roadmap/intake/intake.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 17, 2026
Both reduce repeated information in intake comments, but the candidate also fixes retitle After lines and adds contract tests.devops-cli-service commentedon Nov 18, 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 (3)
Searches run:
Sources:
devops-cli-service commentedon Nov 19, 2026
Status set to Ready at 4624bc7 (see proposed design in issue body).
fix(roadmap): omit repeated text in intake and retitle comments (#6198)
test(roadmap): drop - After: check in retitle type test (#6198)
chore(main): release 0.219.0 (#7177)
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC