Fix hard-wrap autocorrect joining lines inside fenced code blocks #297
Labels
No labels
P0
P1
P2
P3
bug
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
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#297
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?
Spec: hard-wrap autocorrect must treat fenced code blocks as opaque
Problem Statement
Running the os-aidd-lint fixer over an AiDD artifact that contains fenced code blocks nested inside list bullets silently destroys those blocks: multi-line yaml/bash/python examples are joined into a single unreadable line. The damage is silent — the fixer reports a successful hard-wrap correction, and the corruption is only noticed later by a human reading the doc (observed 2026-08-06; three files corrupted, repaired by hand).
Solution
The fence-detection mask recognizes fenced code blocks regardless of indentation, so the hard-wrap cop (and any other consumer of the document's skip mask) treats fence contents as opaque. Running the fixer over a document with bullet-nested code fences leaves every fenced line byte-identical; prose unwrapping continues to work exactly as before.
User Stories
~~~) fences given the same protection as backtick fences at any indentation, so that fence style doesn't change safety.Implementation Decisions
Testing Decisions
Out of Scope
Further Notes
Fixing the mask hardens every current and future consumer of the skip mask in one place — table masking and any future autocorrectable cop get indentation-safe fence detection for free.
Work starting via /os-sdlc:implement pipeline on branch fix/297-fence-mask-indented-fences.
Resolution
Done: Fence mask now recognizes indented backtick/tilde fences; hard-wrap autocorrect and offense detection treat their contents as opaque; six regression tests added.
Evidence: Commits
d9d90ad+84adac5on main; full suite green (492 runs, 0 failures); opus reviewer approved with no blocking findings.Follow-ups: Nested-fence toggle edge captured as issue #298; charter-hash bookkeeping landed as
84adac5; all other reviewer suggestions applied.