Project-state housekeeping and diagram-grammar hardening#5
Merged
Conversation
README claimed 104 examples; the catalog has 109. `make test` ran bare python3, which fails on any system where python3 is not 3.13 (the example loader executes 3.12+ `type` statements). Route it through `uv run --python 3.13` and point the README at `make test`. https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
preview-viz.yml only triggered on a feature branch that has since merged. Replace it with an on-demand Preview workflow taking the preview Worker name as a workflow_dispatch input. GitHub UI merges bypass the local git hooks that keep generated files fresh, so merges to main could land with stale asset fingerprints and a red Verify run. Add a workflow that reruns `make build` on push to main and commits the regenerated files when they drifted. https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
Everything under Unreleased has been deployed to production since May 16. Date the section and add the entries that were never logged: journeys, the marginalia figure system and its geometry contracts, quality registries, Turnstile runner protection, wide-event observability, deployment smoke, the custom domain, and the footer repository link. https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
1. Emphasis scarcity is now counted semantically by the grammar (Canvas.accent_count) instead of reverse-engineered from SVG, where an arrow's shaft and a gate line are indistinguishable. Gates collectively count as one accent per figure; a lanes traced path and its terminal dot count as one mark. Two new contract tests enforce the counter and catch primitives that paint EMPHASIS without counting. This closes the blind spot where generator-ribbon shipped 3 uncounted gate lines and control-stop-boundary's gate was invisible to the contract. 2. Twin layouts are now phrases, so coordinate drift is structurally impossible: two_names_one_object (aliasing-mutation / tuple-no-mutation), type_triangle (class-triangle / metaclass-triangle), and mono_divider computes a character divider's x from the font advance instead of an eyeballed pixel. This normalizes two live drifts: the aliasing/tuple second-panel tag gap (8px vs the first panel's 6px) and metaclass-triangle sitting 2px lower and 10px wider-gapped than its class-triangle twin. 3. Text metrics are single-sourced: MONO_ADVANCE (exact, for positioning) and BBOX_ADVANCE/text_width (conservative, for the clipping/collision contracts) live in marginalia_grammar.py; the geometry contracts import them instead of redefining their own. 4. Figure SVGs now carry aria-hidden/focusable=false so screen readers get the figcaption (the canonical voice) instead of the SVG's internal text fragments out of context. 117 of 123 figures are geometry-identical; the 6 that changed are the twin normalizations above. HTML_CACHE_VERSION regenerated. https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
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.
Housekeeping fixes from a project-state review, plus four structural improvements to the diagram grammar.
Project state fixes
make test.make testruns throughuv run --python 3.13, so it works where the systempython3isn't 3.13 (the example loader executes 3.12+typestatements).preview-viz.ymlonly triggered on a long-merged feature branch; replaced with an on-demandPreviewworkflow taking the preview Worker name as aworkflow_dispatchinput.make buildon push to main and commits regenerated files when they drifted.2026-05-16release and added the entries that were never logged (journeys, marginalia figure system, quality registries, Turnstile, observability, deployment smoke, custom domain, footer link).Diagram grammar fixes
Canvas.accent_count()) instead of reverse-engineered from SVG output, where an arrow's shaft and a gate line are indistinguishable. Gates collectively count as one accent per figure; alanestraced path and its terminal dot count as one mark. Two new contract tests enforce the counter and catch primitives that paint EMPHASIS without counting. Closes the blind spot wheregenerator-ribbonshipped 3 uncounted gate lines andcontrol-stop-boundary's gate was invisible to the contract.two_names_one_object,type_triangle,mono_divider), making coordinate drift between twin figures structurally impossible. Normalizes two live drifts: the aliasing/tuple second-panel tag gap (8px vs 6px) andmetaclass-trianglesitting 2px lower with a 10px-wider gap than itsclass-triangletwin.MONO_ADVANCE(exact, positioning) andBBOX_ADVANCE/text_width(conservative, contracts) live inmarginalia_grammar.py; the geometry contracts import them instead of redefining their own.aria-hidden="true" focusable="false", so screen readers get the figcaption (the canonical voice) instead of the SVG's internal text fragments out of context.117 of 123 figures render with identical geometry; the 6 that changed are the twin normalizations, all by single-digit pixel amounts.
HTML_CACHE_VERSIONregenerated, so rendered-HTML caches bust on next deploy.All 90 tests, every geometry contract, ruff, SEO/cache lint, example verification, and the quality gates pass.
https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
Generated by Claude Code