Repository navigation
fix(docs): mermaid reserved-id parse error and broken .html/.md links - #56
Merged
Merged
Conversation
README's "How it works" flowchart failed to parse on GitHub: `graph` is a
reserved Mermaid keyword and can't be a node id. Renamed it to `imports`.
docs/**/*.md and CHANGELOG.md linked to sibling pages as `name.html`, which
only exists in the Jekyll build (docs/Gemfile already enables
jekyll-relative-links, on by default for GitHub Pages native builds). Those
links 404 on github.com. Rewrote them as relative `.md` links so Jekyll
converts them to `.html` at build time and GitHub renders them directly;
also replaced three `{{ '...' | relative_url }}` Liquid links in plain doc
prose with the same relative `.md` form (left docs/research/index.md's
templated collection loop alone — Liquid is right there). Fixed one spec
link (docs/specs/2026-10-21-seo-long-term-design.md) whose relative path was
wrong regardless of extension.
Could not build the Jekyll site locally to verify end to end: Ruby 4.0.7's
native gem extensions (bigdecimal, eventmachine, json) fail to compile on
this machine's clang/SDK headers (`stdckdint.h` not found), unrelated to
this repo. Verified instead from jekyll-relative-links' documented behavior
and docs/_config.yml/docs/Gemfile's existing plugin list.
Added two offline checks so this class of bug fails CI instead of surfacing
on github.com:
- scripts/check-md-links.mjs: every relative link and #anchor in
README/CHANGELOG/CONTRIBUTING/SECURITY/docs/**/skills/** must resolve to a
real file and a real heading, computed with no Jekyll build.
- scripts/check-mermaid.mjs: a ```mermaid flowchart node id can't be a
Mermaid reserved word (graph, end, subgraph, ...) — the exact class of the
README bug.
Chose a dependency-free .mjs script + vitest wrapper (tests/scripts/*.test.ts)
over lychee or another external tool: the repo already uses this exact
pattern for offline checks (scripts/check-site.mjs, scripts/metrics-path.mjs),
and it plugs into the existing `npm test`/`npm run check`/ci.yml gate — which
already runs on every PR regardless of path — with no new workflow step,
binary install or network access. A full Mermaid grammar check needs
mermaid's renderer (a DOM via jsdom or a headless browser), too heavy for
this repo's two diagrams; the reserved-id lint covers the reported failure
class directly.
Also caught up README.md with v0.5.0: added the Verification pass and
Pre-PR self-check rows to the Features table and a Verification pass row to
the Documentation table, both shipped in 0.5.0 but missing from README.
docs/captain.md already correctly documents coupling.missing as info-only
and the outcome-labels study; no stale claim found there.
Timing (rule 14): the new checks' vitest run was 160ms
(tests/scripts/check-md-links.test.ts + check-mermaid.test.ts, 16 tests).
Full `npm run check` under the CI-like env (rule 15) passed: typecheck,
test 25.87s (1190 passed), test:slow 210.52s (551 passed, 1 skipped).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approved by opendrs: risk score 0.22 (green) for commit 688d009. Every auto-approval rule passed.
🟢 Diff risk 0.22 · green · auto-approve28 files · +462 −67 · Captain: quick confirm
Review brief for AI reviewers (opendrs)Score details
Policy
opendrs 0.5.0 · default model · github.com/error-path/opendrs Auto-approval: approved by opendrs. |
|
Caution Review failedThe pull request is closed. Finishing Touches
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
README's "How it works" flowchart failed to parse on GitHub:
graphis a reserved Mermaid keyword and can't be a node id. Renamed it toimports.docs/**/*.md and CHANGELOG.md linked to sibling pages as
name.html, which only exists in the Jekyll build (docs/Gemfile already enables jekyll-relative-links, on by default for GitHub Pages native builds). Those links 404 on github.com. Rewrote them as relative.mdlinks so Jekyll converts them to.htmlat build time and GitHub renders them directly; also replaced three{{ '...' | relative_url }}Liquid links in plain doc prose with the same relative.mdform (left docs/research/index.md's templated collection loop alone — Liquid is right there). Fixed one spec link (docs/specs/2026-10-21-seo-long-term-design.md) whose relative path was wrong regardless of extension.Could not build the Jekyll site locally to verify end to end: Ruby 4.0.7's native gem extensions (bigdecimal, eventmachine, json) fail to compile on this machine's clang/SDK headers (
stdckdint.hnot found), unrelated to this repo. Verified instead from jekyll-relative-links' documented behavior and docs/_config.yml/docs/Gemfile's existing plugin list.Added two offline checks so this class of bug fails CI instead of surfacing on github.com:
Chose a dependency-free .mjs script + vitest wrapper (tests/scripts/*.test.ts) over lychee or another external tool: the repo already uses this exact pattern for offline checks (scripts/check-site.mjs, scripts/metrics-path.mjs), and it plugs into the existing
npm test/npm run check/ci.yml gate — which already runs on every PR regardless of path — with no new workflow step, binary install or network access. A full Mermaid grammar check needs mermaid's renderer (a DOM via jsdom or a headless browser), too heavy for this repo's two diagrams; the reserved-id lint covers the reported failure class directly.Also caught up README.md with v0.5.0: added the Verification pass and Pre-PR self-check rows to the Features table and a Verification pass row to the Documentation table, both shipped in 0.5.0 but missing from README. docs/captain.md already correctly documents coupling.missing as info-only and the outcome-labels study; no stale claim found there.
Timing (rule 14): the new checks' vitest run was 160ms (tests/scripts/check-md-links.test.ts + check-mermaid.test.ts, 16 tests). Full
npm run checkunder the CI-like env (rule 15) passed: typecheck, test 25.87s (1190 passed), test:slow 210.52s (551 passed, 1 skipped).What and why
How it was tested
npm run checkpassesnpm run build:actionrun andaction/distcommitted (ifsrc/changed)docs/specsupdated (if a contract insrc/domain/types.tsor the policy changed)