v0.1.1: renderer + parser fixes from audit#2
Merged
Merged
Conversation
Found by an autonomous audit. All P0 bugs verified by reproduction. Renderer: - Same-row edges that skip over an intervening node now route up-and-over (was drawing a straight line through the intervening box). Detection is layer-aware: only same-layer co-rowed nodes count as "intervening." - Self-loop edges (a -> a) are no longer rendered as zero-length paths; surfaced as warnings instead. - Marker ids and CSS class names use a per-render namespace (ps-<hash>) derived from the DSL so two SVGs embedded on the same HTML page no longer collide on <marker id> or scoped CSS selectors. - Multi-edges between the same pair stack visually via perpendicular offset; cyclic edges (a->b + b->a) similarly stack via stable direction. - Cite/signature suppressed when there are no nodes drawn (was rendering an empty signed canvas). - IBM Plex Mono dropped from FONT_MONO fallback. Parser: - New warnings[] field surfaces undefined-node edges and self-loops (was only computed in the CLI). - Edges now carry their source line number. Layout: - Removed the hard 1600px canvas cap. 13-node layers were clipping nodes off-canvas. Canvas now grows to honour NODE_MIN_W regardless of count. CLI: - -o / --out now validate that a value follows. - Warnings vs errors distinguished in stderr output. Tests: - 29 tests pass on Node 25.6 (was 23). Examples re-rendered with the new namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Found by an autonomous audit; all P0 bugs verified by reproduction before fix.
Renderer
M cx cy L cx cy). Surface as warnings instead.<marker id>and CSS class names now use a per-renderps-<hash>namespace so two SVGs on one page don't collide.Parser
warnings[]field surfaces undefined-node edges + self-loops to library consumers (was CLI-only).linenumber.Layout
CLI
-o/--outvalidates a value follows.plinth-sketch foo.sketch -oused to silently swallow the flag.Tests
Test plan
npm testpasses (29 / 29)-ono-value: exits 2 with clear error🤖 Generated with Claude Code