Repository navigation
Description
Problem
The line of a pending-person criterion in ## Criteria of tasks.md is Pending person: {criterion}, {reason}. The criterion and the reason can each hold a comma, so the line has no single split. Two readers split it in two different ways:
plan_read._criteriasplits at the first.,when the line holds one, else at the first,.implement_run._parse_tasks_criteriasplits at the first,.
So a pending-person criterion that holds a comma and does not end with a full stop reads back cut: part of the criterion moves into the reason. A criterion that holds ., inside (for example e.g., ) reads back cut too. criterion_problems hides the cut with _resolved (#4023), but the read-back check of the stage job (#5851) compares the entries exactly and fails the item with plan_unreadable.
Evidence
A round trip with no model call (render_change, then read_change) of the entry {"criterion": "A person runs the steps, and records the output", "group": "pending-person", "reason": "It needs the live cluster."} gives the criterion A person runs the steps and the reason and records the output, It needs the live cluster.. read_back_problems gives criteria.
#5952 found this form during the reproduction of the stage read-back failures. The criteria of #2202, #3655 and #3671 end with a full stop, so this form did not cause those failures.
Expected behavior
- A
pending-personentry reads back with the same criterion and reason for any one-line texts. plan_readand the implement step read the criteria with one reader.- A plan in the old line form still reads.
Acceptance criteria
- A round-trip test of a
pending-personentry whose criterion holds a comma and no final full stop gives the same entry. - A round-trip test of a criterion that holds
e.g.,gives the same entry. - The implement step reads the criteria of
tasks.mdwith the reader ofplan_read.
Source: #5952
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Alternatives check of 2026-11-24: none.
Tool: none found.
Reason: Searches found only generic JSON and Markdown reference pages, no maintained library that reads one-line tasks.md criteria back unchanged. The defect is two internal splitters, so the fix belongs in the project's own reader.
Lacks:
- One shared reader for the implement step
- Round trip of a criterion holding a comma
- Fallback that keeps the old line form readable
Proposed design
Problem statement
Two readers split the Pending person: {criterion}, {reason} line in tasks.md in different ways. A pending-person criterion that holds a comma and no final full stop reads back with part of the criterion in the reason. The stage read-back check then fails the item with plan_unreadable. The fix uses one reader in plan_read, a one-line JSON object for new plans, and a fallback for old plans.
Acceptance criteria
Requirement: Pending-person round trip with a comma
A pending-person criterion whose criterion text holds a comma and no final full stop SHALL read back with the same criterion and reason.
Scenario: Round trip of a comma criterion
- WHEN a test renders and reads a pending-person entry with criterion
A person runs the steps, and records the outputand reasonIt needs the live cluster. - THEN the read entry holds that criterion and that reason, and
read_back_problemsreports nocriteriaproblem.
Requirement: Pending-person round trip with an abbreviation
A pending-person criterion that holds e.g., SHALL read back with the same criterion and reason.
Scenario: Round trip of an abbreviation with a comma
- WHEN a test renders and reads a pending-person entry whose criterion holds
e.g., - THEN the read entry holds the same criterion and reason.
Requirement: One criteria reader for the implement step
The implement step MUST read the criteria of tasks.md with the criteria reader of plan_read.
Scenario: Implement step delegates criteria parsing
- WHEN a test patches the public criteria reader of
plan_readand runs the implement step criteria parse on atasks.md - THEN the patched reader receives the file and its result is the parsed criteria.
Requirement: New pending-person line encoding
render_change MUST write a pending-person criterion as one JSON object after Pending person: .
Scenario: Render a pending-person line
- WHEN a test renders a pending-person entry whose criterion and reason each hold a comma
- THEN the text after
Pending person:parses as JSON with keyscriterionandreasonand the original values.
Requirement: Old pending-person line form
A tasks.md that uses the old Pending person: {criterion}, {reason} line form MUST still read.
Scenario: Read an old pending-person line
- WHEN a test reads a
tasks.mdwithPending person: A person runs the steps., It needs the live cluster. - THEN the parsed entry holds criterion
A person runs the steps.and reasonIt needs the live cluster.
Existing Tool Considered
The alternatives check in the issue body records verdict none and names no tool; its Lacks: list is in the issue body. The proposal uses the standard-library json module for a one-line object after Pending person: and one public plan_read.read_criteria that the implement step imports, with a fallback for the old line form. The code cost is about 1,500 tokens and 20 minutes to write, test and keep the reader and fallback.
Key questions
- How should a
Pending person:line encode a criterion and a reason that can each hold a comma?: Write one JSON object with keyscriterionandreasonafterPending person:. Use the standard-libraryjsonencoder and decoder, which quotes commas and preserves both fields exactly. (best practice) [sources: src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/implement/implement_run.py]- Chosen: JSON object. The standard library gives unambiguous quoting and an exact round trip with no custom escape rules.
- Rejected: Escaped comma delimiter. It needs custom escaping and matching parsers, which adds code for the same result.
- Rejected: Length-prefixed fields. It is unambiguous but hard to read and write by hand in
tasks.md.
- Where should the one criteria reader live, and how should the implement step use it?: Add a public
read_criteriatosrc/devops_cli/roadmap/plan_read.py; make_criteriacall it, and import it insrc/devops_cli/roadmap/implement/implement_run.py. (best practice) [sources: src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/implement/implement_run.py, tests/roadmap/test_roadmap_plan_read.py]- Chosen: Public
read_criteriainplan_read. It gives one reader and avoids a private cross-module import. - Rejected: Import
_criteriadirectly. It couples the implement step to a private function and breaks on a rename. - Rejected: New module. It adds a layer for one small reader that belongs with the plan parser.
- Chosen: Public
- How should a plan in the old line form still read?: If the text after
Pending person:is not a JSON object, fall back to the old split: at the first.,when present, else at the first,. (best practice) [sources: src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/implement/implement_run.py]- Chosen: Fallback parser. It keeps old plans readable with no migration and no write access.
- Rejected: Reject old form. It breaks existing plans, including the full-stop form that chore(monitoring): Drop old label fallbacks from AI spend dashboard #2202, feat(roadmap): a dashboard and alerts for the pipeline #3655 and fix(roadmap): stage_ready backs off after a failed check #3671 use.
- Rejected: One-time migration. It needs a write step over existing plans and changes archived content.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 16, 2026
Both fix comma parsing in pending-person criteria, but #4023 corrected the plan reader while the candidate unifies the implement step reader with it.devops-cli-service commentedon Nov 17, 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 (10)
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at c49fd02 (see proposed design in issue body).
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.