Development record
internal/core/lint fenceMask (lint.go), which about a dozen rules use to skip example text (citations, persona, context currency, delivery state, cross-store, subverbs and the rules in lint.go), is a private backtick-only toggle that diverges from mdrecord.Mask. It flips on any line whose trimmed text starts with three backticks. So a tilde-fenced example is linted as live prose, which gives false findings. And a three-backtick line inside a ~~~ block flips the mask on, so the live prose after the block is masked until the next backtick line, and a real finding there is silently missed. Probe at 70daf701: in lines [~~~, three-backtick-go, ~~~, blank, LIVE PROSE LINE], fenceMask marks the live line masked, and in [~~~, example prose, ~~~] it marks the example unmasked. Moving onto mdrecord.Mask is not a mechanical swap. mdrecord also masks HTML comments, so every rule would stop reading commented text, and it recognises only the 0-3 space fence indent. Both are per-rule decisions.
internal/core/lint fenceMask (lint.go), which about a dozen rules use to skip example text (citations, persona, context currency, delivery state, cross-store, subverbs and the rules in lint.go), is a private backtick-only toggle that diverges from mdrecord.Mask. It flips on any line whose trimmed text starts with three backticks. So a tilde-fenced example is linted as live prose, which gives false findings. And a three-backtick line inside a ~~~ block flips the mask on, so the live prose after the block is masked until the next backtick line, and a real finding there is silently missed. Probe at 70daf701: in lines [~~~, three-backtick-go, ~~~, blank, LIVE PROSE LINE], fenceMask marks the live line masked, and in [~~~, example prose, ~~~] it marks the example unmasked. Moving onto mdrecord.Mask is not a mechanical swap. mdrecord also masks HTML comments, so every rule would stop reading commented text, and it recognises only the 0-3 space fence indent. Both are per-rule decisions.
Grounds
- pursued: the capture's two probes (live prose after a tilde block holding a backtick line; a tilde-fenced example) mask correctly (TestFenceMaskReadsTildeFencesAndTheirContents) and links_resolve reports the live broken link after such a block (TestLinksResolveAfterATildeBlockHoldingABacktickLine), with record-lint and docs-lint still clean on the tree; a masked live line or a new blocker on the committed corpus would show it wrong
Frontmatter
| id | iss-2609250955209513 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609250955209513-internal-core-lint-fencemask-lint-go.md
open on GitHub ↗ · commit history ↗
mentions1
- dcn-26092500000000012026-09-25 — One fence rule for the tree (the run A orchestrator's technical ruling for the fences lane, recorded by the lane implementer). `internal/core/mdrecord` is the tree's one notion of fences and HTML comments: `Mask` and `Unclosed` follow CommonMark for a top-level fence, and `Read(lines, rule)` is the single pass every reading goes through. It is extended once, by a `Rule`: `TopLevel` is CommonMark's top level, and `ListNested` also opens a fence indented four or more columns, which only a list item can hold, closes it within three columns of its opener, and ends it at a column-0 line (fenced code never continues lazily). A run at one to three columns is read by `ListNested` exactly as `TopLevel` reads it, because whether it sits in a list item turns on the list around it and mdrecord does not parse lists; a committed issue record quotes a frontmatter block in a top-level fence whose indented closer is followed by a column-0 line, and the list-item reading refused it. That reading is kept unexported and consulted by `FencedUnderEveryRule`, which masks a line only where every reading agrees. The site reads `ListNested` (it renders fences in list items) with comments masked and refuses an unclosed fence or comment; the lint rules read `FencedUnderEveryRule` with comments left visible, because a mask that hides prose misses a finding silently. The reading exclusion floor fails closed: its verifier does not share the redactor's site walk, reads a line as code only where every reading agrees, lets no comment hide a heading (comment text travels in the bundle, so an excluded heading inside a comment is refused, not redacted by guess), and refuses a fence either rule leaves unclosed. `TestNoSecondFenceRule` in mdrecord is the armed guard: it names any non-test Go file that writes a fence delimiter and keeps state across lines, its allowlist is empty, and a stale entry fails it. Captures resolved on this ruling: iss-2609250955207041, iss-2609250955051598, iss-2609250955209513, iss-2609251044055902, iss-2609251045302499.