docs: architecture diagrams across the site, rendered to SVG by Merlion - #158
Merged
Merged
Conversation
…a Merlion Every ```mermaid block on the docs site renders to inline SVG through @fractalbox/merlion-astro, themed in light and dark by src/styles/diagrams.css with the site palette, with <merlion-view> pan and zoom. The Merlion packages are not on npm; apps/docs/vendor/merlion holds their pnpm-pack tarballs and the commit they came from.
… pages Fifty Mermaid diagrams across 26 pages, rendered by Merlion at build time: sequence diagrams for cross-component flows (dispatch round trip, admission tickets, execUnderGrant, Slack origin), state diagrams for lifecycles (serial gate, pool slots, detached processes, expand/migrate/contract), and flowcharts for step graphs and decisions. Every page passes `merlion check --strict`. Prose that disagreed with the code now matches it: the dispatch action's retry count and transient statuses, the health-check URL input, the facade's method count, served grant profiles and the report enforcement mode, platform-520 denial records, the canary-gated /health, and the deploy job order.
debuggingfuture
marked this pull request as ready for review
September 24, 2026 07:14
There was a problem hiding this comment.
AI code review — 🛑 Request changes
Risk tier: full · 1 critical · 0 warnings · 0 suggestions
Reviewers: security
1. 🛑 Critical — New local dependencies require a synchronized pnpm lockfile
📍 apps/docs/package.json:16-20
Five new 'file:' package dependencies are added, but no corresponding lockfile update is present in the supplied diff. CI installs with a frozen lockfile, so the docs build will fail with an out-of-date lockfile unless 'pnpm-lock.yaml' is regenerated and committed along with the vendored tarballs.
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.
The docs site draws its architecture: 51 diagrams across 26 pages, covering how a dispatch travels from a GitHub Action to a check-run, how runs are triggered and serialized, how the substrate admits, fences and polices an execution, and how an upgrade is verified. Diagrams follow the site theme in light and dark, pan and zoom, and are real SVG text that search and screen readers read.
Problem & Insight
The site had one Mermaid block, which Starlight rendered as a code listing. The pages that most need a picture (request flows across the Action, Dispatcher, Workflow and GitHub; admission tickets; the exec fence; egress policy) were prose only. Several of those pages had also drifted from the code.
Take
```mermaidblock to static SVG at build time through its Astro integration (apps/docs/astro.config.mjs). No Mermaid runtime ships to the browser.apps/docs/src/styles/diagrams.cssmaps the brand palette onto Merlion's light and dark tokens. The Merlion packages are not on npm, soapps/docs/vendor/merlion/holds theirpnpm packtarballs and records the source commit and the wasm SHA-256.merlion check --strict. The same blocks render on GitHub.health-check-urlis requested exactly as given.reportenforcement exists.denials()./healthanswers 503unverifieduntil the canary passes.canary.Key actions
astro checkand lint pass. Every diagram was screenshotted in both themes with no console errors.gone/unknownstatus). The diagrams draw the code; the ADR text is unchanged pending decisions.file:tarballs with a version range.