Repository navigation
Description
Problem or Motivation
An implement step restores the text of its own group and the checkboxes of other groups in the tasks.md of its change (#2774, #2767). It does not check the lines outside every numbered group. A model can add or change a line before the first ## <n>. heading, and the step commits that line.
Proposed Solution
Compare the text outside all numbered groups with the text before the run, and write it back with the same raw lines as the group restore.
Acceptance Criteria
- A line that the model adds or changes before the first numbered group does not reach the commit.
- A tick of a task prints no extra line.
Proposed design
Problem statement
The implement step restores the text of its own task group and the checkboxes of other groups in tasks.md. It does not verify or restore lines that fall outside every numbered group. A model can add or change a line before the first ## . heading, and the step commits that line into the change.
Acceptance criteria
Requirement: Preamble lines are not committed
The implement step SHALL restore the text outside all numbered groups to its value before the step ran.
Scenario: Model adds a line before the first group heading
- WHEN A model adds or changes a line before the first
## .heading during a step - THEN The committed tasks.md contains the original preamble text, not the model's edit
Requirement: Task tick produces no extra line
The implement step SHALL NOT print an extra line when it ticks a task checkbox.
Scenario: Ticking a task checkbox
- WHEN The step ticks a task checkbox in tasks.md and writes the file back
- THEN The output contains no extra line beyond the tick itself
Existing Tool Considered
No check has run. This is a fix to the project's own implement-step restore logic. No external tool or library covers this need because it is an internal bug in the step's file-restore function. The cost is the tokens to modify the restore function to capture and write back the preamble, plus the tokens to add a regression test.
Key questions
- How does the step restore the preamble text?: Capture the raw lines outside all numbered groups before the step runs. After the step, replace the preamble in the modified file with the captured lines, using the same raw-line write-back mechanism that the group restore already uses. (proposed)
- Chosen: Capture and restore raw preamble lines. The body's proposed solution. Reuses the existing group-restore write-back path. Minimal change.
- Rejected: Reject the commit if the preamble changed. Would fail the step instead of silently restoring. Loses the model's valid work in the group. Not the behavior the body asks for.
Open questions
- What constitutes 'text outside all numbered groups' in tasks.md? (missing verified source)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 30, 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.A model can commit unintended lines, but it requires the model to edit outside groups, so it is not a guaranteed failure.It prevents incorrect commits of model-added lines, which protects repository integrity.The fix mirrors the existing group-restore logic and adds one comparison for text outside groups.Both fix the implement step's handling of tasks.md content, but #2774 protects task text within a group while the candidate protects text outside all groups.devops-cli-service commentedon Oct 30, 2026
Refine cannot set this item to Ready at d264e6e until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
dan-petty commentedon Oct 30, 2026
PR #2792 (#2790) delivers this item, so no further change is needed.
Evidence at
2e9552f4onmain:_restore_tasksinsrc/devops_cli/roadmap/implement_step.pywritestasks.mdback to its text from before the run. It keeps only the ticks of the step's own group. Every other edit is undone, including a line before the first numbered group.tests/test_roadmap_implement_step_ticks.py, the caseoutside every group, adds the lineThe model was here.after# Tasks. The test asserts that the committed file equals the base text.test_the_step_prints_one_line_that_names_the_change_it_restoreschecks that the restore prints one line, and a tick alone prints none.Closing as completed.