Skip to content

S259 — fix 8 dead TOC anchors that have kept the docs site unpublished since fd77141 - #97

Merged
detain merged 1 commit into
masterfrom
fix-client-windows-anchors
Aug 7, 2026
Merged

S259 — fix 8 dead TOC anchors that have kept the docs site unpublished since fd77141#97
detain merged 1 commit into
masterfrom
fix-client-windows-anchors

Conversation

@detain

@detain detain commented Aug 7, 2026

Copy link
Copy Markdown
Owner

S259 — turn the docs pipeline green again

master has been red for three commits and both jobs fail — Build Docs and Deploy Docs. Since Deploy Docs is the GitHub Pages publishing path, the live site has not updated since fd77141: the roku rewrite (c4619dd) and both windows commits (75f7139, 376fbad) are merged but unpublished.

The defect

VitePress prefixes an emitted heading id with _ when the slug would start with a digit. The built HTML has id="_1-architectural-rule"id="_8-building-and-releasing"; the TOC at docs/dev/client-windows.md:14-21 linked #1-…#8-…. Eight dead anchors, one missing underscore each.

This was a divergence from a convention already written down in this repo — .claude/rules/docs-authoring.md documents ## 1. Overview -> id="_1-overview" verbatim, and docs/dev/client-roku.md:8-18 already follows it.

Evidence

Both figures from a clean worktree (tracked files only, as CI checks out), exit code read from an unpiped command:

tree exit corpus dead
376fbad control 1 157 pages, 3463 unique fragment links 8
ff9d29b this PR 0 157 pages, 3455 unique fragment links 0

The gate prints its own corpus, so the zero is not a gate that inspected nothing:

157 page(s), 3455 unique #fragment link(s) checked
(407 off-site, 4810 without a fragment, 3 bare "#" skipped)

It also hard-fails with "The scanner is broken, not the docs" when the candidate set is empty, so a zero-corpus run cannot pass silently.

Two accounting notes

  • Unique links drop by exactly 8 across what looks like a count-neutral rename. VitePress emits its own header-anchor link per heading and the gate keys on (file, href), so each corrected TOC href is now byte-identical to the generated one and dedupes. href="#_1-architectural-rule" occurs 2× in the built page — positive evidence the TOC now targets exactly what VitePress generates.
  • A local build reports 159 pages, not 157: gitignored docs/old/ holds 2 pages absent from a fresh checkout. Every figure above is from a clean worktree for that reason.

Scope

grep -rnE '\]\(#[0-9]' returns exactly these 8 hits repo-wide; the cross-page form returns zero. No other page needed the change and none was touched — pages already using #_N- were left alone.

Deliberately shipped alone rather than folded into the MCP-docs branch, so the red→green flip on Build Docs is attributable.

🤖 Generated with Claude Code

VitePress prefixes a heading id with `_` when the slug would start with a
digit, so `## 1. Architectural Rule` emits `id="_1-architectural-rule"`. The
Table of Contents at docs/dev/client-windows.md:14-21 linked the un-prefixed
form for all eight numbered sections, so every TOC entry on the page was dead.

The convention is already established in this repo — docs/dev/client-roku.md:8-18
uses `#_1-overview` … `#_11-device-verification-status` for the same heading
style, and .claude/rules/docs-authoring.md documents the rule explicitly
("## 1. Overview -> id=\"_1-overview\""). The windows page simply diverged from
it. Fixed to match, verified against the emitted ids in the built HTML rather
than derived by hand.

Scope is the whole defect class, not just the reported instance: a repo-wide
sweep for markdown links to a digit-leading fragment
(grep -rnE '\]\(#[0-9]' plus the cross-page form) returns exactly these eight
links and nothing else, so no other page needs the same correction. Pages with
numbered headings that already use the `#_N-` form were left alone.

This unblocks publishing. `Build Docs` and `Deploy Docs` have both been failing
on master for three commits (c4619dd, 75f7139, 376fbad), so the site has not
deployed since fd77141 — the anchor breakage starts at 75f7139; c4619dd was an
unrelated Pages deploy timeout.

Verified: npm run docs:build exits 0, anchor gate reports
"157 page(s), 3463 unique #fragment link(s) checked" and "0 dead anchor(s)
found" in a clean tracked-files-only worktree (the corpus CI sees).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 8 medium

Alerts:
⚠ 8 issues (≤ 0 issues of at least minor severity)

Results:
8 new issues

Category Results
ErrorProne 8 medium

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@detain
detain merged commit 3336e40 into master Aug 7, 2026
2 of 3 checks passed
@detain
detain deleted the fix-client-windows-anchors branch August 7, 2026 16:10
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