Skip to content

fix(roadmap): every job block reader uses one marker rule #6736

Description

@dan-petty

Problem

PR #6720 (#6627) makes a job block marker bound a block only where CommonMark parses it as an HTML block, or as the whole last line of an HTML comment that the marker ends. An independent review of the PR found two cases that still go wrong (#6720 (comment)):

  1. A person opens a code fence or a <pre> block above a job block that already exists, and does not close it. The old block is then code, so job_block_bounds does not find it. The writer (refine_one_item in src/devops_cli/roadmap/refine/refine.py, and the alternatives writer in src/devops_cli/roadmap/alternatives.py) closes the open construct after the old block, then adds a new block. The old section stays in the body for good, as code in the text of the person, so the body shows two start markers. With the plain text search of origin/main before fix(roadmap): Find a job block marker only as an HTML block #6720, the job replaced the old block in place.
  2. _ends_section in src/devops_cli/roadmap/refine/refine.py (near line 1166, fix(roadmap): an alternatives block names no blocker of an item #6613) ends a Dependencies or Key questions section only at an HTML block whose whole content is a marker. It does not use the rule of fix(roadmap): Find a job block marker only as an HTML block #6720 for a marker on the last line of a comment. A body ## Dependencies / - #4989 / an open <!-- note / an alternatives block that lacks #5506 gives body_dependencies = [4989, 5506] on origin/main, and also with fix(roadmap): Find a job block marker only as an HTML block #6720. So the Lacks list of the alternatives block counts as blockers of the item.

Expected

Each reader of a job block uses one marker rule, the one of src/devops_cli/roadmap/body_hash.py. A write never leaves a second copy of the block of a job in the body.

Acceptance criteria

  • Test first: over three rounds of the refine write and of the alternatives writer, a body with an open fence or an open <pre> above an existing job block holds one job block after each round. The test fails on the base.
  • Test first: for the body of case 2, body_dependencies gives [4989]. The test fails on the base.

Dependencies

Alternatives check of 2026-11-22: none.
Tool: none found.
Reason: Searches returned only generic Markdown/HTML references and a general CommonMark parser; the need is an in-repo refactor so every job-block reader shares the existing marker rule, which no external tool provides.

Lacks:

  • One marker rule shared by every job block reader
  • Writer that never leaves a second copy of a job block
  • Section end rule that honors markers on comment last lines

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    effort/medium
    priority/p2-medium
    on Nov 22, 2026
  4. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    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 (4)

    Tools considered:

    Searches run:

    • CommonMark parser Python HTML block detection markdown-it-py, results: 5
    • Python library find HTML comment block boundaries in markdown body, results: 5
    • markdown-it-py PyPI CommonMark parser tokens html_block, results: 5
    • CommonMark spec HTML block comment end condition last line, results: 5

    Sources:

  5. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 22, 2026
  6. removed
    status/in-progress
    owner/agent
    on Nov 22, 2026
  7. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-22 23:15 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/mediumpriority/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