feat(diagrams): add mechanism diagrams to deep panels and docs - #25
Merged
Conversation
Six data-driven diagrams (closure pipeline, handoff lease and receipt chain, approval airlock, freshness state machine, spine row shapes, guard layers) rendered from one model each into the scene deep panels and into generated SVG files plus docs/mechanisms.md. Every printed figure derives from the dataset, the closed vocabularies, or the manifest; each diagram wears the weakest assurance level of the claims it depicts. Tests bind diagram claims to the manifest, pin the printed facts, prove the app and the docs print identical labels, check phone layouts at the label floor, and fail if a committed file drifts from a fresh render. CI regenerates and diffs the files. The Spine schema inspector gains keyboard focus and a name for its scrollable JSON blocks.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 059c59ad59
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
added 2 commits
September 2, 2026 07:36
CodeQL js/double-escaping: sequential replaceAll calls could unescape an ampersand twice. A single regex pass over the known entities cannot.
useVizScale gains an opt-in minWideWidth: below that container width the compact variant is used even on a desktop viewport. The mechanism figures use it at 960px and cap the compact layout at 480px, so tablet columns no longer render the wide layout with sub-floor labels. The diagram generator now removes every SVG it does not regenerate, and the render test asserts the directory holds exactly one file per diagram and ground, so a renamed or removed diagram cannot leave an orphan that the byte-for-byte check would bless.
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.
Mechanism diagrams
Six data-driven diagrams of how the Operator OS works, rendered from one model each into the scene deep panels (Spine, Hub, Safety, Coda) and into committed SVG files plus a generated
docs/mechanisms.md.src/data/dataset.json, the closed vocabularies, or the architecture manifest.public/architecture-manifest-v1.json.SceneFramemounts the figures, so no scene file changed.Tests that fail if a diagram lies
src/diagrams/registry.test.ts: claims resolve in the manifest, the badge is the weakest claim, placement matches the scene's declared claims, wide and phone layouts print identical labels, and no label clips or overlaps at the phone label floor.src/diagrams/facts.test.ts: golden facts pinned against the dataset, vocabularies, seed, andvite.config.ts.src/diagrams/render.test.ts: the app and the docs export print the same labels; committed SVG files anddocs/mechanisms.mdequal a fresh render byte for byte; the SVG palette equals the stylesheet tokens.src/lib/contrast.test.ts: raised-panel text pairs clear AA.pnpm diagramsthengit diff --exit-code -- public/diagrams docs/mechanisms.md.Also
scrollable-region-focusable, found by the new e2e pass).with { type: "json" }sonode scripts/render-diagrams.tsruns under plain Node.Verified locally: typecheck, 205 unit tests, 60 e2e tests, build, guard scan, byte-identical regeneration.