os-backlog: heading parser treats # lines inside code fences as headings #650
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#650
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
heading parsers do not skip fenced code, so
#lines inside a block become false sectionsProblem
Neither plugins/os-backlog/lib/backlog/issue_body/lines.rb (
find_heading_matches) nor plugins/os-sdlc/lib/os_sdlc/pipeline/ticket_shape/section.rb (bodies_for) tracks fence state. A#-prefixed line inside a fenced code block (seen in #629 and #626 bodies) is read as a section heading, creating false or duplicate sections. #563 FenceMask shipped for os-aidd-lint only (plugins/os-aidd-lint/lib/aidd_lint/fence_mask.rb); the backlog and os-sdlc parsers were not covered.Cases
# commentline, when either parser scans for headings, then that line is not counted as a heading.Approach
Add fence-state skipping to each parser directly. Cross-plugin sharing of FenceMask is a #699-class decision; a small local fence tracker in each parser is acceptable here.
Required work:
Lines#find_heading_matchesin plugins/os-backlog/lib/backlog/issue_body/lines.rbTicketShape::Section#bodies_forin plugins/os-sdlc/lib/os_sdlc/pipeline/ticket_shape/section.rb# not a headingcaseAcceptance criteria
# comment, when both parsers read it, then they report the same sections as for the body without that line.Non-goals
Sharing one FenceMask implementation across plugins is out of scope; that is #699's decision.
Origin
Resolution
Done: both heading parsers skip lines inside code fences via a FenceStack per plugin; parity test and IssueBody test cover a fenced heading line
Evidence: commit
cfdfcc30; os-backlog 245 runs 0 failures, os-sdlc 1427 runs 0 failuresFollow-ups: #699 decides whether one shared FenceMask replaces the two local FenceStack copies (open)