docs: a durable mermaid-parse check over docs/architecture — a semicolon killed a diagram for weeks, silently #343
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The 2026-08-08 review-fix sweep found
docs/architecture/09-founding-sequence.md's stand-up sequence diagram had NEVER rendered: two message lines contained semicolons, which mermaid treats as statement separators, so the parse died mid-message — and nothing anywhere would have said so (fixed in6325eed).Wanted: a durable check that every mermaid block under
docs/architecture/(and arguablydocs/slices/) parses. The proven method from the sweep: load the repo's vendoredmermaid.min.jsin a real Electron DOM and callmermaid.parseper block — a Node stub DOM false-fails on flowcharts, so the Electron DOM matters. Both rounds' scripts ran from a session scratchpad and are gone; rebuild as a checked-in script wired into the seam-CI harness (or a pre-commit hook), failing loud with file + block + parse error. 30/30 blocks parse at branch head — the check starts green.Done in
71c1424(onorigin/main).The guard:
scripts/check-mermaid.mjsextracts every fencedmermaidblock underdocs/architecture(30) and every rawdocs/slices/*.mermaidDAG (10), loads the viewer's own vendoreddocs/architecture/vendor/mermaid.min.jsin a real DOM and callsmermaid.parseper block — failing loud with file + block + opening line. Starts green at 40/40.Real DOM without an Electron binary: happy-dom (already an
appdevDependency) rather than Electron. It has the property the issue calls for — a Node stub DOM false-fails flowcharts, happy-dom does not — and it verifiably (a) parses all 30 arch flowcharts/sequences + 10 slice DAGs and (b) rejects the;-in-a-message bug, with no Electron download and no X server. So it runs inside the existing seam-CI Node stage rather than needing the e2e display shell.Wiring (two belts):
scripts/seam-smoke.sh— new stageDocs: every mermaid diagram block parses (#343)runningnode scripts/check-mermaid.mjs(loud, purpose-built output).app/tests/unit/mermaidDocs.test.ts— a vitest seam test (part ofpnpm -r run test) that runs the full scan, asserts 0 failures, guards against a silently-empty scan (total >= 30), and pins the regression (valid flowchart parses;;bug rejected).Also:
docs/architecture/README.mdgains a Parse check section;STATUS.mdheader + milestone log updated.Verify:
node scripts/check-mermaid.mjs→40/40 block(s) parse; vitest 3/3;eslint+vue-tscclean.;in architecture/09's mermaid Note breaks the docs mermaid-parse gate — main CI is red #974;in architecture/09's mermaid Note breaks the docs mermaid-parse gate — main CI is red #974%%in a .mermaid source only reds in CI (GOTCHAS #143, 2nd time) #2068%%in a .mermaid source only reds in CI (GOTCHAS #143, 2nd time) #2068