Pin Node 22 with strict engines, harden mermaid subgraph IDs#2
Merged
Conversation
Mermaid subgraphs used em-dashes and "$" in implicit IDs, which broke GitHub's parser and showed the diagram as raw code. Rewrote subgraphs with explicit IDs and ASCII-only display labels. Pinned Node to 22 via .nvmrc (matching the Dockerfile) and added a strict engines range with engine-strict=true so npm refuses installs on mismatched versions.
The diagram was rendering correctly on github.com web all along — GitHub mobile just doesn't render mermaid. Keeping the explicit subgraph IDs (defensive, no visual impact) but restoring em-dashes, $12/mo, and the original port spacing.
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.
Summary
.nvmrc(22, matchesnode:22-alpinein the Dockerfile),engines.noderange>=22.0.0 <23.0.0inpackage.json, and.npmrcwithengine-strict=truesonpm installrefuses on a mismatched runtime.devices,cloud,apigw_grp,lightsail,compose,phase2,clients) so the parser never has to derive an ID from a quoted title containing em-dashes,$, or spaces. Display labels (em-dashes,$12/mo, port spacing) are unchanged.Note: the original diagram does render on github.com web — GitHub mobile just doesn't render mermaid at all, which is what made it look broken. No content fix was needed for the diagram itself.
Test plan
nvm useand confirm Node 22 is selected from.nvmrc.npm installon Node 22 and confirm it succeeds; on a non-22 Node, confirm it fails with an engine error (engine-strict=true).ARCHITECTURE.mdon github.com web and confirm the Component Diagram still renders identically.https://claude.ai/code/session_01AwruPBZ3J96q7AMtvKKa82
Generated by Claude Code