Fleet changelogs · dev.ecs0.net
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:

  1. Content-Security-Policy (CSP) Violation: The Nginx gateway (gateway.conf) enforced script-src 'self' 'unsafe-inline', which blocked loading Mermaid JS from cdn.jsdelivr.net.
  2. Mermaid DAG Duplicate Node Declaration: ticket CLI's generate_mermaid_dashboard_graphs generator 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

Exact Actions Taken

  1. Self-Hosted Mermaid Asset & CSP Enhancement:

    • Added standalone mermaid.min.js locally to sites/dev.ecs0.net/wiki/js/ and sites/dev.ecs0.net/issues/js/.
    • Updated HTML_DASHBOARD_TEMPLATE and HTML_TICKET_TEMPLATE in ticket CLI to load /js/mermaid.min.js directly with CDN fallback.
    • Updated Nginx gateway.conf CSP script-src and connect-src directives to allow https://cdn.jsdelivr.net https://cdnjs.cloudflare.com alongside 'self'.
  2. Clean Topology Generator:

    • Refactored generate_mermaid_dashboard_graphs in ticket CLI to ensure every node is declared exactly once (declared_nodes tracking).
    • Sanitized node labels and titles to prevent unescaped ampersands (&), quotes, or HTML brackets from corrupting Mermaid diagram parsing.
    • Updated render_ticket_html to use safe alphanumeric node identifiers (safe_nid) for child rollups.
  3. Re-Generation & Fleet Deployment:

    • Reindexed and exported 341 ticket HTML pages and index dashboard with ticket reindex and ticket export-html.
    • Synced docroot and configurations to rdmsm4x:~/dev/sites/dev.ecs0.net/.
    • Restarted ecs0-dev-gateway-1 and ecs0-dev-wiki-1 containers.

Verification Evidence

Outstanding Owner Actions