Repository navigation
Description
Problem
with_record in src/devops_cli/roadmap/stores/store.py adds the record block as an HTML comment after the body. split_record reads the record only when CommonMark parses the last top-level block as an HTML block (_record_block_span, #2630). When the body ends inside an open construct, the record comment becomes part of that construct. Such a construct is a fenced code block with no closing fence, an HTML comment with no -->, or an HTML block of type 1, such as <pre>, with no end tag. Then split_record returns an empty record, and each later read of the item loses its job state.
Evidence: a script on the code of origin/main (2026-11-22), with no test helpers, writes a record with with_record and reads it with split_record:
closed fence record read back: {'implement.stopped': 'group 1'}
open backtick fence record read back: {}
open tilde fence record read back: {}
open <!-- record read back: {}
open <pre> record read back: {}
A scan of the 837 open issues on 2026-11-22 found 828 bodies with a record block, and each record reads back. So no item has the defect now. A body gets an open construct when a person edits it, or when a model writes a fence that it does not close. The review of PR #6720 found that the model text of refine can do this.
PR #6720 (#6627) adds close_open_block to src/devops_cli/roadmap/body_hash.py, and only the refine and alternatives writers call it. The store does not call it.
Expected
A job record that with_record writes reads back with split_record, also when the body leaves a construct open at its end. The text of the person keeps its rendered form.
Acceptance criteria
- Test first: for a body that ends in an open backtick fence, an open tilde fence, an open
<!--and an open<pre>,split_record(with_record(body, block))gives the record. The test fails on the base. - A test:
with_recordwrites a body with no open construct as before, with the same text.
Dependencies
- fix(roadmap): find a job block marker only as an HTML block #6627 (PR fix(roadmap): Find a job block marker only as an HTML block #6720) adds
close_open_block. Use it, and do not build a second parser.
Alternatives check of 2026-11-22: none.
Tool: none found.
Reason: Searches found only general Markdown parsers, such as markdown-it-py, which parse a body but neither append a record block nor read one back; the fix belongs in the store, through the close_open_block helper from #6627.
Lacks:
- No append or split of a job record block
- No closing of an open fence, comment or
<pre> - No rule that the appended comment stays a top-level block
Activity
dan-petty commentedon Nov 22, 2026
Both work on record block handling in the roadmap store, but #6627 fixes marker finding in block writers while the candidate fixes record reading when the body leaves a construct open at its end.devops-cli-service commentedon Nov 22, 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)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Released in v0.195.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.195.1
devops-cli-service commentedon Nov 22, 2026
Live since 2026-11-22 19:13 UTC