Skip to content

fix(roadmap): read only the marked code spans of a Verification line #3596

Closed

Description

@dan-petty

Problem

The implement step reads every code span of a Verification: line as a command. In src/devops_cli/roadmap/step_files.py, _task_of collects the code spans of each Verification line. A code span that is prose, such as tagged_image in the plan of #2610, is then refused as a program that is not in the allowed list. The step stops the group.

Proposed change

Read as commands only the code spans that the plan marks as commands, and keep the other code spans as prose. The owner of the rule decides the marking. Name the rule in the docstring of _task_of.

Acceptance criteria

  1. A Verification line with a prose code span runs only its command, and the test in tests/roadmap/ pins it.
  2. A Verification line whose command is refused still stops the step with the reason of the step.

Related: #3276, #2610.

Source: #3276

Proposed design

Problem statement

The implement step reads every code span of a Verification: line as a command. A prose code span such as tagged_image is then refused as a program that is not in the allowed list, and the step stops the group. The change reads only the code spans that carry the $ mark as commands and keeps the other code spans as prose. The stage template writes the mark, so a new plan always carries it.

Acceptance criteria

Requirement: Marked command only

_task_of SHALL read a code span of a Verification: line as a command only when the span starts with $ , and SHALL keep every other code span as prose.

Scenario: A prose span beside a marked command

  • WHEN A task holds the Verification: line tagged_image splits the reference, and $ pytest tests/roadmap/test_step_files.py passes.
  • THEN GroupTask.verification is ('pytest tests/roadmap/test_step_files.py',).

Requirement: Prefix removed

The step MUST remove the $ prefix from a command before it reads the program of the command.

Scenario: A command of an allowed program

  • WHEN The Verification: line holds the code span $ devops roadmap claim.
  • THEN The command is devops roadmap claim, and the allowed-list check reads devops.

Requirement: Refused command stops the step

A marked command whose program is not in the allowed list MUST stop the step with the reason of the step.

Scenario: A program that is not allowed

  • WHEN The Verification: line holds the code span $ nosuchprogram --version.
  • THEN The step stops, and the reason of the stop names nosuchprogram as a program that is not in the allowed list.

Requirement: No mark, no command

A Verification: line whose code spans carry no $ mark MUST give the group no command.

Scenario: A plan written before the change

  • WHEN The Verification: line holds the code span pytest tests/roadmap/test_step_files.py with no mark.
  • THEN GroupTask.verification is empty.

Requirement: Stage template marks the command

The stage job SHALL write the $ mark before the verification command of the Verification: line of each task.

Scenario: A staged task

  • WHEN The stage job writes the tasks of a group.
  • THEN The Verification: line of each task holds $ <command>, and _task_of reads <command>.

Requirement: The docstring names the rule

The docstring of _task_of MUST state that only a code span that starts with $ is a command and that other code spans are prose.

Scenario: The docstring of the parser

  • WHEN A test reads the docstring of _task_of.
  • THEN The docstring holds the $ mark and the word prose.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers the need: markdown-it-py, already a dependency, gives the code spans of the line, and no tool reads a Verification: line or tells a marked inline span from prose. The change builds about 15 lines in _task_of and the stage template: about 3,000 tokens to build, keep and fix, and about 2 hours of elapsed work.

Key questions

  • Which mark tells a command from a prose code span on a Verification: line?: A code span that starts with $ is a command. The parser removes the two characters and reads the program. Any other code span is prose. (best practice) [sources: src/devops_cli/roadmap/step_files.py, openspec/changes/archive/2026-11-02-3262-stage-verify-line/proposal.md]
    • Chosen: $ prefix in the code span. The shell prompt marks a command line in documentation, so a reader needs no new rule.
    • Rejected: cmd: label in the code span. No document or tool uses this label, so it adds a private rule.
    • Rejected: First code span of the line. A line with two commands runs only the first, and a prose span in the first position is refused.
    • Rejected: First word in the allowed program list. No command is then ever refused, so the second acceptance criterion cannot hold.
  • What does a Verification: line give the group when no code span carries the mark?: No command. The step keeps every unmarked code span as prose. The stage template writes the mark from the same change, so a new plan always carries it. (best practice) [sources: src/devops_cli/roadmap/step_files.py, docs/adr/0001-github-is-the-roadmap-source.md]
    • Chosen: No command. The body keeps an unmarked code span as prose, and the project removes an old form instead of keeping it (ADR 0001).
    • Rejected: The first code span is a command. It keeps two rules, and a plan written after the change can still have its prose refused.
    • Rejected: Stop the step. A plan written before the change would stop the group, and only a person clears the stop.
  • Does the stage template write the mark?: Yes. stage_task_test puts $ before {verify}. _task_texts keeps its call, and FAILS_ON_BASE still reads fails on the base after the last backtick. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py, openspec/changes/archive/2026-11-02-3262-stage-verify-line/proposal.md]
    • Chosen: Change stage_task_test. The stage job writes every task, so a template with no mark gives every new group no command.
    • Rejected: Leave the template. No author step adds the mark, so a staged plan would never run its command.
  • Where does the parser collect the code spans of a Verification: line?: _task_of takes the inline tokens of a list item after the first, keeps each one that starts with Verification:, and collects every code span of each one. [sources: src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/step_files.py:101]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    on Nov 5, 2026
  2. added
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 5, 2026
  3. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The bug stops a step for plans that include prose code spans in a Verification line, but it does not block all work.
    • Value: Medium. It unblocks implement steps that currently stop on legitimate prose code spans in Verification lines.
    • Effort: Low. The change is local to _task_of and adds a filter on marked spans, with one test to pin the behaviour.
    • Related: feat(roadmap): check every active plan against the verification policy #3579, which asks for a different change. Both deal with Verification line code spans being refused, but the candidate changes how the step reads spans while #3579 adds a check across all active plans.
  4. added
    priority/p2-medium
    on Nov 5, 2026
  5. added
    status/ready
    and removed
    status/new
    on Nov 6, 2026
  6. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at bd65ef6 (see proposed design in issue body).

  7. added
    owner/agent
    status/in-progress
    and removed
    status/ready
    on Nov 7, 2026
  8. removed
    status/in-progress
    owner/agent
    on Nov 7, 2026
  9. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor
  10. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-07 12:09 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions