Finding #15 of the 2026-08 architecture review. Explicitly not changed in #52 — it needs verification first.
Problem
GraphBuilder.toMermaid() emits state descriptions wrapped in double quotes (src/graph/GraphBuilder.ts:178):
stateDiagram-v2
direction LR
s_draft : "draft"
In stateDiagram-v2 the text after : is a state description, rendered verbatim inside the state box. If that is right, every exported diagram shows "draft" with literal quote marks instead of draft — cosmetic, but it is the library's user-facing rendering output, and the node id (s_draft) is already the hex-escaped identifier, so the description exists purely to display a clean label.
Note the label is escaped independently: escapeMermaidLabel() converts " to #quot; and \ to #92;, so the surrounding quotes are not doing escaping work — they may simply be a carry-over from the DOT emitter, where they are required syntax.
Why this is still open
I could not run a Mermaid renderer in the review environment, and the quoted form is pinned in several places — tests/graph.test.ts (s_new : "new", s_in_0020progress : "in progress", and others) and the example output in docs/graph.md. Rewriting output that tests and docs assert, on an unverified hypothesis, is the wrong trade; it needs someone to look at a rendered diagram.
Steps
- Render a diagram from
toMermaid() in Mermaid Live Editor (or @mermaid-js/mermaid-cli) and check whether the quotes appear in the state boxes.
- If they do: drop them from the emitter, update the pinned expectations in
tests/graph.test.ts and the sample output in docs/graph.md, and confirm that labels containing spaces, colons, and the already-escaped #quot; / #92; sequences still parse unquoted.
- If they do not appear: add a comment at the emitter explaining why the quotes are there, so this doesn't get re-reviewed a third time.
Acceptance criteria
Finding #15 of the 2026-08 architecture review. Explicitly not changed in #52 — it needs verification first.
Problem
GraphBuilder.toMermaid()emits state descriptions wrapped in double quotes (src/graph/GraphBuilder.ts:178):In
stateDiagram-v2the text after:is a state description, rendered verbatim inside the state box. If that is right, every exported diagram shows"draft"with literal quote marks instead ofdraft— cosmetic, but it is the library's user-facing rendering output, and the node id (s_draft) is already the hex-escaped identifier, so the description exists purely to display a clean label.Note the label is escaped independently:
escapeMermaidLabel()converts"to#quot;and\to#92;, so the surrounding quotes are not doing escaping work — they may simply be a carry-over from the DOT emitter, where they are required syntax.Why this is still open
I could not run a Mermaid renderer in the review environment, and the quoted form is pinned in several places —
tests/graph.test.ts(s_new : "new",s_in_0020progress : "in progress", and others) and the example output indocs/graph.md. Rewriting output that tests and docs assert, on an unverified hypothesis, is the wrong trade; it needs someone to look at a rendered diagram.Steps
toMermaid()in Mermaid Live Editor (or@mermaid-js/mermaid-cli) and check whether the quotes appear in the state boxes.tests/graph.test.tsand the sample output indocs/graph.md, and confirm that labels containing spaces, colons, and the already-escaped#quot;/#92;sequences still parse unquoted.Acceptance criteria