Gunnar

mikronova/funnel-core

.nornir/assets/cycle-guard.svg

<svg viewBox="0 0 520 130" width="520" height="130" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="apply rejects an EdgeAdded that would close a cycle: a to b to c is a DAG, the back-edge c to a is refused">
  <defs>
    <marker id="ok" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#2d7d46"/>
    </marker>
    <marker id="bad" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#c0392b"/>
    </marker>
  </defs>
  <!-- forward DAG edges a->b->c (accepted) -->
  <line x1="112" y1="55" x2="150" y2="55" stroke="#2d7d46" stroke-width="1.6" marker-end="url(#ok)"/>
  <line x1="242" y1="55" x2="280" y2="55" stroke="#2d7d46" stroke-width="1.6" marker-end="url(#ok)"/>
  <!-- rejected back-edge c->a (dashed red, curving under) -->
  <path d="M 326 62 C 326 108, 62 108, 62 62" fill="none" stroke="#c0392b" stroke-width="1.6" stroke-dasharray="5 4" marker-end="url(#bad)"/>
  <!-- nodes -->
  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="13" text-anchor="middle">
    <rect x="12" y="40" width="100" height="30" rx="6" fill="#eef7f0" stroke="#2d7d46" stroke-width="1.0"/>
    <text x="62" y="60" fill="#000000">n-001</text>
    <text x="62" y="28" fill="#6b6b80" font-size="10">a</text>

    <rect x="150" y="40" width="92" height="30" rx="6" fill="#eef7f0" stroke="#2d7d46" stroke-width="1.0"/>
    <text x="196" y="60" fill="#000000">n-002</text>
    <text x="196" y="28" fill="#6b6b80" font-size="10">b</text>

    <rect x="280" y="40" width="92" height="30" rx="6" fill="#eef7f0" stroke="#2d7d46" stroke-width="1.0"/>
    <text x="326" y="60" fill="#000000">n-003</text>
    <text x="326" y="28" fill="#6b6b80" font-size="10">c</text>
  </g>
  <text x="240" y="102" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#c0392b" text-anchor="middle">apply rejects c→a — c already reaches a, so the edge would close a cycle</text>
  <text x="196" y="20" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#2d7d46" text-anchor="middle">a→b→c stays a DAG · every plan remains drainable</text>
</svg>