Skip to content

[finding] check-release-section-coverage's REAL_V17_HEADINGS fixture stops matching the shipped page once the v17 headings cascade #13757

Description

@claude

What

scripts/check-release-section-coverage.mjs holds a self-test fixture:

/**
 * The real v17 page heading set, trimmed to the lines that matter. Kept verbatim
 * so the matcher is judged against text that actually shipped.
 */
const REAL_V17_HEADINGS = [
  '## Highlights - 17.0.0',
  '## Highlights - 17.1.0',
  '# 17.0.0 in detail',
  '### Node.js 22 is the supported floor (#3825)',
  '## Landed since 17.0.0-rc.0',
].join('\n');

The comment claims currency in the present tense - "text that actually shipped". PR #13754
(for #12250) cascades the v17 page's headings down one level, so the shipped page will say
## 17.0.0 in detail, and after it merges no page in content/docs/releases/** carries a
body-level # heading at all. The fixture then describes text that shipped historically,
while its comment still reads as a statement about the current tree.

Why this is not a red, and why it is still worth a line

The gate stays GREEN either way, measured: the matcher it feeds, headingsNamingMinor, is
^#{1,6} - level-agnostic by construction - and nothing in the gate compares the fixture
against the live page. node scripts/check-release-section-coverage.mjs exits 0 on the
cascaded tree.

So this is drift in a comment's claim, not a defect. It is filed rather than fixed in that PR
because #12250 ships under the CLAUDE.md hard stop on content/docs/releases/ as a dedicated
docs-only PR with no riders, and a second gate script is a rider.

The reason it is worth recording at all: the file already keeps one deliberately historical
snapshot next to this one, PRE_10232_V17_HEADINGS, labelled as historical. Once
REAL_V17_HEADINGS is historical too but still labelled "actually shipped", the next reader
who diffs it against the live page cannot tell which of the two it is meant to be.

Options, for whoever picks this up

  1. Relabel the comment to say it is a historical snapshot, matching how PRE_10232_V17_HEADINGS
    is already described. Cheapest, and keeps an H1-bearing input as a deliberate
    level-agnosticism control - which is arguably worth MORE once no live page has one.
  2. Re-snapshot it from the cascaded page and note that the level-agnosticism control is lost
    unless a separate fixture keeps an H1.

Recommendation: option 1. The fixture's job is to exercise the matcher against realistic
multi-level heading text, and it still does that; only the comment is wrong.


Generated by Claude Code

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions