Skip to content

A heading inside a fenced block is a quotation, not a section — and §550's evidence had already been destroyed on master - #3203

Merged
gHashTag merged 2 commits into
masterfrom
loop/a-quotation-is-not-a-section
Sep 4, 2026
Merged

gHashTag merged 2 commits into
masterfrom
loop/a-quotation-is-not-a-section

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 4, 2026

Copy link
Copy Markdown
Owner

#3201 shipped a titles_lost guard so tri skill renumber refuses rather than deleting a section. It
refuses on titles. The damage that had already reached master was one level finer.

What was on master

§550 quotes three ## N. heading lines inside a fenced block, as the evidence for the duplicate it
describes. On 4d63859 those three lines were gone, and so was the closing fence — leaving an
unclosed fence with §551 inside it.

The guard did not fire because §550's title was still there. Only its body had been cut, and
cutting a body is invisible to a set of titles.

Repaired from 093367b7: §550 is byte-identical to what was written; 516 sections, ascending, no
duplicates, fence state closed at end of file.

The parser now knows what a fence is

skillnum::sections matched every line beginning ## N. . On master that is 518 lines, of which
3 are quotations. CommonMark's rule brings it to the truth:

An opening fence may carry an info string. A closing fence may not.

That rule is not decoration here. A naive toggle on every **mispairs 19 fences in this file**, because blocks quoting command output that contains a ```` numbers ```` line were read as closing
early — which flips the parity for everything after and puts three quarters of the file "inside" a
block. That is why fence parity gave nonsense as a health check, and why "the file has an odd number
of markers"
was never the right question.

The population is self-inflicted and will grow. This file's whole method is quoting the artefact
that proves the finding. Every new section that quotes a heading makes a heading-counting parser
wronger.

And writing the section did it again

The first draft of the paragraph documenting the damage quoted it as a fenced block containing a bare

`## 551.` became a real heading, the file went to **517** sections and `tri skill check` printed
`PROBLEMS`. Caught in one command, on the same commit, by the gate that exists for it. The example is
now indented rather than fenced: a fence quoting a fence has no safe spelling here.

## A guard is only as fine as the unit it compares

`titles_lost` catches a **dropped** section. It does not catch a **truncated** one, a reordered one,
or a body edited in place — and the loss here was exactly a truncated body. Worth stating out loud
whenever a guard is written: this one's unit is the section, not the line.

3 new tests, 2 mutants — one of which survived a first fixture that failed to discriminate, and was
killed only after the fixture was rewritten to the shape that actually occurs in the file (a fenced
block quoting output that itself contains a tagged fence). 729 crate tests.

SKILL 552. Refs #3195

SKILL 551 shipped a titles_lost guard so `tri skill renumber` refuses
rather than deleting a section. It refuses on TITLES. The damage that had
already reached master was one level finer.

SKILL 550 quotes three `## N.` heading lines inside a fenced block, as
the evidence for the duplicate it describes. On master 4d63859 those
three lines were gone and so was the closing fence, leaving an unclosed
fence with SKILL 551 inside it. The guard did not fire because 550's
title was still there; only its body had been cut, and cutting a body is
invisible to a set of titles.

Repaired from 093367b: 550 is byte-identical to what was written, 515
sections, ascending, no duplicates, fence state closed at end of file.

skillnum::sections now knows CommonMark's rule -- an OPENING fence may
carry an info string, a CLOSING fence may not. On master 518 lines match
`## N. ` and 3 are quotations, so the count becomes 515. The rule is not
decoration: a naive toggle on every ``` mispairs 19 fences in this file,
because blocks quoting command output that contains a "``` numbers" line
were read as closing early, which flips the parity for everything after.
That is why fence parity gave nonsense as a health check, and why "the
file has an odd number of markers" was never the right question.

The population is self-inflicted and will grow: this file's method is to
quote the artefact that proves the finding, so every new section that
quotes a heading makes a heading-counting parser wronger.

A guard is only as fine as the unit it compares. titles_lost catches a
dropped section, not a truncated one, not a reordered one, and not a body
edited in place. Worth stating whenever a guard is written.

SKILL 552.

Refs #3195
The first draft of SKILL 552 quoted the damage as a fenced block
containing a bare ``` line. That inner marker closes the outer block --
the exact rule the section is about -- so `## 551.` became a real
heading, the file went to 517 sections and `tri skill check` printed
PROBLEMS. Caught in one command on the same commit by the gate that
exists for it.

The example is indented rather than fenced. A fence quoting a fence has
no safe spelling here, and writing it as a fenced block would have added
a fourth quoted heading in the act of explaining why quoted headings are
a problem.

Refs #3195
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-04 21:48:27 UTC

Summary

Status Count
Total Open PRs 12
PRs with Failing Checks 11
PRs with All Checks Green 1
READY 0
FAILING 11
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9b8875f1c9d4 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 607bf94 into master Sep 4, 2026
37 checks passed
@gHashTag
gHashTag deleted the loop/a-quotation-is-not-a-section branch September 4, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant