rdmbair15m5-changelog-20260830-1310-dev-ecs0-issues-graph-fix
rdmbair15m5-changelog-20260830-1310-dev-ecs0-issues-graph-fix
Diagnosed and resolved graph rendering failures on
https://dev.ecs0.net/issues/ (Content-Security-Policy
blocking and Mermaid DAG syntax conflicts).
Summary
The dependency topology graph on
https://dev.ecs0.net/issues/ was failing to render due to
two distinct root causes:
- Content-Security-Policy (CSP) Violation: The Nginx
gateway (
gateway.conf) enforcedscript-src 'self' 'unsafe-inline', which blocked loading Mermaid JS fromcdn.jsdelivr.net. - Mermaid DAG Duplicate Node Declaration:
ticketCLI'sgenerate_mermaid_dashboard_graphsgenerator declared the same node IDs across multiple disjoint subgraphs (e.g. nested incidents and epics that had both standalone and parent subgraphs), causing Dagre layout engine errors.
Scope
- Host / Infrastructure:
rdmsm4x(Gateway Docker serviceecs0-dev-gateway-1& Wiki serviceecs0-dev-wiki-1) andrdmbair15m5. - Files Modified:
/Users/richh/dev/sites/dev.ecs0.net/infra/nginx/gateway.conf/Users/richh/dev/issues/bin/ticket/Users/richh/dev/sites/dev.ecs0.net/wiki/js/mermaid.min.js(Self-hosted asset)/Users/richh/dev/sites/dev.ecs0.net/issues/js/mermaid.min.js/Users/richh/dev/sites/dev.ecs0.net/issues/index.html/Users/richh/dev/sites/dev.ecs0.net/wiki/index.html
Exact Actions Taken
Self-Hosted Mermaid Asset & CSP Enhancement:
- Added standalone
mermaid.min.jslocally tosites/dev.ecs0.net/wiki/js/andsites/dev.ecs0.net/issues/js/. - Updated
HTML_DASHBOARD_TEMPLATEandHTML_TICKET_TEMPLATEinticketCLI to load/js/mermaid.min.jsdirectly with CDN fallback. - Updated Nginx
gateway.confCSPscript-srcandconnect-srcdirectives to allowhttps://cdn.jsdelivr.net https://cdnjs.cloudflare.comalongside'self'.
- Added standalone
Clean Topology Generator:
- Refactored
generate_mermaid_dashboard_graphsinticketCLI to ensure every node is declared exactly once (declared_nodestracking). - Sanitized node labels and titles to prevent unescaped ampersands
(
&), quotes, or HTML brackets from corrupting Mermaid diagram parsing. - Updated
render_ticket_htmlto use safe alphanumeric node identifiers (safe_nid) for child rollups.
- Refactored
Re-Generation & Fleet Deployment:
- Reindexed and exported 341 ticket HTML pages and index dashboard
with
ticket reindexandticket export-html. - Synced docroot and configurations to
rdmsm4x:~/dev/sites/dev.ecs0.net/. - Restarted
ecs0-dev-gateway-1andecs0-dev-wiki-1containers.
- Reindexed and exported 341 ticket HTML pages and index dashboard
with
Verification Evidence
- HTTP 200 verification on
http://127.0.0.1:8788/issues/andhttp://127.0.0.1:8788/js/mermaid.min.js. - Verified 134 unique nodes and 0 duplicate node declarations across all subgraphs.
- Verified valid Mermaid topology blocks on individual ticket pages
(
EPIC-20260830-04.html,INC-20260830-01.html,FEAT-20260830-01.html).
Outstanding Owner Actions
- None. The graph renders cleanly on
https://dev.ecs0.net/issues/.