You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(roadmap): refine writes its section's end marker, so a re-refined item keeps one design section instead of two #1470
scope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
render_proposal_section (src/devops_cli/roadmap/refine.py:654-656) appends CONST_ROADMAP_REFINE_END_MARKER and then passes the whole section through sanitize_text, whose first step (:567) replaces that marker with [end-marker]. Every section refine writes therefore ends in [end-marker] and has no end marker.
extract_section_and_outside (:165-179) finds the start marker but no end marker, so it returns the whole body as "outside" and no section. The next refine of that item cannot replace its earlier section: it appends a second one.
It hits exactly the path a person is meant to take: answering an open question by editing the body makes the item's next refinement duplicate its design instead of replacing it.
Proposed remedy
Sanitize the model-written lines, then add the start and end markers around them, so the markers are never sanitized away. No other change.
Acceptance criteria
A round-trip test: extract_section_and_outside(body + render_proposal_section(...)) returns the section and the original body.
Refining an item twice, with a body edit between, leaves exactly one design section, the second run's.
Model text that contains the end marker is still neutralised (the existing sanitize_text test keeps passing).
Related finding from the same runs (2026-10-09): answerable facts stay open questions
Refining 10 P1 items in four managed repositories from the Service's pod readied 5. Three of the four left New had one open question each, every one a fact in the checkout that the model answered but cited without a path the validator accepts:
"Does Caddy route all apex-domain paths to event-stream?" (answered at caddy/Caddyfile:41-47, which the item's own body cites);
"Does the Pixelfed site block import the shared security_headers snippet?" (the model cited Caddyfile:54; the file is caddy/Caddyfile);
"Does the README already have an 'Offline Hosts & Returning a Node' section?" (README.md:216).
validate_proposal demotes a fact answer whose sources all fail _is_valid_source to an open question, which is right, but the model is never shown the tracked paths, so it cites bare file names. An item left this way is skipped as unchanged on every later run, so it stays New until a person edits its body, which today duplicates its section (this item).
Simplest fix, in the same module: have _is_valid_source accept a cited path that matches exactly one tracked file by its trailing path components (Caddyfile:54 -> caddy/Caddyfile:54) and record the resolved path, refusing an ambiguous one. Criterion: a fact answer citing Caddyfile:54 in a checkout with one caddy/Caddyfile is accepted with the full path; with two Caddyfiles it stays an open question.
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.
Priority: P2-Medium. It breaks the primary re-refine path (duplicate sections) but the item remains usable and the defect is cosmetic in output rather than a data-loss or security issue.
Value: Medium. It corrupts the refine output for any item refined more than once, which is the intended workflow, but does not block first-time refinement or other roadmap jobs.
Effort: Low. The fix is a single reordering: sanitize the model text first, then wrap it in markers, with no other code change needed.
Placed in v0.2.33 by the owner, 2026-10-09, to land before #1515: hourly refine would otherwise append a duplicate design section to every item it leaves New on each run (reproduced at b5ea6ff: 3 rounds gave 3 sections). Only the marker fix is required here; the path-resolution add-on in the later comment is optional.
Admitted to v0.2.33: after v0.2.33 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
Correction (2026-10-09): this issue's Problem says five issues here (#593, #599, #744, #991, #1177) already contain [end-marker]. They don't: the build's review read all five bodies, and none holds [end-marker] or a refine section. The list came from a code search that matched other text (#744 and #1177 only mention the markers in prose). The defect itself is confirmed (the new round-trip and refine-twice tests fail on the old code), and one item in a managed repository does hold two sections; that one is cleaned up by hand.
render_proposal_section now sanitizes the section's text and then wraps it in the start and end markers. Before, it appended the end marker first, so sanitize_text turned it into [end-marker]. extract_section_and_outside then found no section, and every later refine of the item appended another ## Proposed design section.
An end marker in the model's text is still neutralised to [end-marker]. Nothing else changed.
An item that already holds a section from before this fix (ending in [end-marker]; none in this repository, one in a managed repository) gets one correctly marked section on its next refine. Refine then skips it with "the section's hash differs from the one refine last recorded" until a person deletes the old section.
The optional path-resolution add-on from the issue's later comment is not part of this change.
Acceptance Criteria of docs/agent/tasks/task-1470-refine-keeps-its-end-marker.md:
Round trip: extract_section_and_outside(body + render_proposal_section(...)) returns the original body and the section's text, with the model's text holding an end marker (test_a_rendered_section_keeps_its_end_marker_when_the_model_writes_one).
Refining an item twice, with a body edit between, leaves exactly one design section, the second run's, and keeps the edit (test_refining_twice_with_a_body_edit_between_leaves_only_the_second_section).
Model text that contains the end marker is still neutralised (the round-trip test above; test_sanitize_text_markdown keeps passing).
scope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Activity
dan-petty commentedon Oct 9, 2026
Related finding from the same runs (2026-10-09): answerable facts stay open questions
Refining 10 P1 items in four managed repositories from the Service's pod readied 5. Three of the four left New had one open question each, every one a fact in the checkout that the model answered but cited without a path the validator accepts:
caddy/Caddyfile:41-47, which the item's own body cites);Caddyfile:54; the file iscaddy/Caddyfile);README.md:216).validate_proposaldemotes afactanswer whose sources all fail_is_valid_sourceto an open question, which is right, but the model is never shown the tracked paths, so it cites bare file names. An item left this way is skipped as unchanged on every later run, so it stays New until a person edits its body, which today duplicates its section (this item).Simplest fix, in the same module: have
_is_valid_sourceaccept a cited path that matches exactly one tracked file by its trailing path components (Caddyfile:54->caddy/Caddyfile:54) and record the resolved path, refusing an ambiguous one. Criterion: a fact answer citingCaddyfile:54in a checkout with onecaddy/Caddyfileis accepted with the full path; with twoCaddyfiles it stays an open question.dan-petty-bot commentedon Oct 9, 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.
It breaks the primary re-refine path (duplicate sections) but the item remains usable and the defect is cosmetic in output rather than a data-loss or security issue.It corrupts the refine output for any item refined more than once, which is the intended workflow, but does not block first-time refinement or other roadmap jobs.The fix is a single reordering: sanitize the model text first, then wrap it in markers, with no other code change needed.dan-petty commentedon Oct 9, 2026
Placed in v0.2.33 by the owner, 2026-10-09, to land before #1515: hourly refine would otherwise append a duplicate design section to every item it leaves New on each run (reproduced at b5ea6ff: 3 rounds gave 3 sections). Only the marker fix is required here; the path-resolution add-on in the later comment is optional.
dan-petty-bot commentedon Oct 9, 2026
Admitted to v0.2.33: after v0.2.33 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
dan-petty commentedon Oct 9, 2026
Correction (2026-10-09): this issue's Problem says five issues here (#593, #599, #744, #991, #1177) already contain
[end-marker]. They don't: the build's review read all five bodies, and none holds[end-marker]or a refine section. The list came from a code search that matched other text (#744 and #1177 only mention the markers in prose). The defect itself is confirmed (the new round-trip and refine-twice tests fail on the old code), and one item in a managed repository does hold two sections; that one is cleaned up by hand.fix(roadmap): refine writes its section's end marker, so a re-refined…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1525, merged into
release/v0.2.33as 29b3606.4 file(s) changed.
How it was verified
Check runs at 2d24972:
Acceptance Criteria of
docs/agent/tasks/task-1470-refine-keeps-its-end-marker.md:extract_section_and_outside(body + render_proposal_section(...))returns the original body and the section's text, with the model's text holding an end marker (test_a_rendered_section_keeps_its_end_marker_when_the_model_writes_one).test_refining_twice_with_a_body_edit_between_leaves_only_the_second_section).test_sanitize_text_markdownkeeps passing).changelog.d/1470.mdunder### Fixed.feat(release): v0.2.33 (#1537)