.nornir/assets/status-badge.svg
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="360" font-family="monospace" font-size="13">
<style>
.box{fill:#0f2233;stroke:#6fd3f5;stroke-width:1.5}
.reuse{fill:#12331f;stroke:#7fe0a0;stroke-width:1.5}
.t{fill:#dbeafe}.dim{fill:#9fb6c6}.acc{fill:#7fe0a0}.wire{fill:#f5d76f}
.arr{stroke:#6fd3f5;stroke-width:1.5;fill:none;marker-end:url(#a)}
.arr2{stroke:#7fe0a0;stroke-width:1.5;fill:none;marker-end:url(#b)}
</style>
<defs>
<marker id="a" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#6fd3f5"/></marker>
<marker id="b" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#7fe0a0"/></marker>
</defs>
<text x="12" y="20" class="acc">dwarves badge — GREEN = REUSED renderer (one brokkr::badge, both paths); YELLOW = the wire</text>
<!-- history store -->
<text x="12" y="48" class="acc">warehouse history (runs.jsonl)</text>
<rect class="box" x="12" y="60" width="200" height="70"/>
<text x="24" y="84" class="t">read_runs()</text>
<text x="24" y="102" class="dim">append-order rows</text>
<text x="24" y="120" class="dim">(pipeline·project·status)</text>
<path class="arr" d="M212,95 L260,95"/>
<!-- selector -->
<rect class="reuse" x="260" y="60" width="216" height="70"/>
<text x="272" y="84" class="acc">badge::latest_status()</text>
<text x="272" y="102" class="dim">pure · newest-match wins</text>
<text x="272" y="120" class="dim">Option<RunStatus></text>
<path class="arr2" d="M476,95 L524,95"/>
<!-- renderer -->
<rect class="reuse" x="524" y="60" width="216" height="70"/>
<text x="536" y="84" class="acc">badge::svg(label,status)</text>
<text x="536" y="102" class="dim">self-contained SVG pill</text>
<text x="536" y="120" class="dim">green/red/amber/grey</text>
<path class="arr" d="M740,95 L788,95"/>
<rect class="box" x="788" y="60" width="100" height="70"/>
<text x="800" y="90" class="t"><svg></text>
<text x="800" y="112" class="dim">pill</text>
<!-- fat path -->
<text x="12" y="176" class="acc">FAT — dwarves badge <pipeline></text>
<rect class="box" x="12" y="188" width="240" height="62"/>
<text x="24" y="212" class="t">badge_cmd()</text>
<text x="24" y="230" class="dim">local warehouse → selector</text>
<text x="24" y="246" class="dim">→ stdout / --out file</text>
<!-- thin path -->
<text x="300" y="176" class="acc">THIN — dwarves badge --server URL</text>
<rect class="box" x="300" y="188" width="200" height="62"/>
<text x="312" y="212" class="t">thin_badge()</text>
<text x="312" y="230" class="dim">gRPC Badge(project,name)</text>
<path class="arr" d="M500,219 L556,219"/>
<text x="502" y="212" class="wire">Bearer</text>
<rect class="box" x="556" y="188" width="220" height="62"/>
<text x="568" y="212" class="t">DwarfSvc::badge</text>
<text x="568" y="230" class="dim">SAME selector + renderer</text>
<text x="568" y="246" class="dim">→ BadgeReply{svg,status,found}</text>
<text x="12" y="292" class="dim">exit code doubles as a gate: green ⇒ 0 · recorded-non-green ⇒ 1 · no run ⇒ 2.</text>
<text x="12" y="312" class="dim">A badge NEVER 404s: an unrecorded pipeline renders a grey "unknown" pill (found=false), not an error.</text>
<text x="12" y="332" class="dim">Additive: new rpc Badge + new verb; the orphaned brokkr::badge primitive is now reachable, byte-identical both sides.</text>
</svg>