Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

.nornir/assets/jobs-ledger.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 600" font-family="'DejaVu Sans', 'Segoe UI', sans-serif">
  <defs>
    <linearGradient id="board" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#0b1c2e"/><stop offset="1" stop-color="#06111d"/>
    </linearGradient>
    <linearGradient id="chip" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#14384f"/><stop offset="1" stop-color="#0e2a3e"/>
    </linearGradient>
    <linearGradient id="rail" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#173d57"/><stop offset="1" stop-color="#0c2438"/>
    </linearGradient>
    <linearGradient id="slot" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#123448"/><stop offset="1" stop-color="#0a2032"/>
    </linearGradient>
    <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0 0 L10 5 L0 10 z" fill="#6fd3f5"/>
    </marker>
    <marker id="arrg" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0 0 L10 5 L0 10 z" fill="#7CFFB2"/>
    </marker>
  </defs>

  <rect x="0" y="0" width="1180" height="600" fill="url(#board)"/>
  <g stroke="#143a52" stroke-width="1"><line x1="0" y1="78" x2="1180" y2="78"/><line x1="0" y1="552" x2="1180" y2="552"/></g>
  <g fill="#16415c"><circle cx="40" cy="40" r="2"/><circle cx="1140" cy="40" r="2"/><circle cx="40" cy="572" r="2"/><circle cx="1140" cy="572" r="2"/></g>

  <text x="40" y="40" fill="#eaf6ff" font-size="22" font-weight="700">the jobs ledger</text>
  <text x="40" y="62" fill="#9fc9e0" font-size="15">in-process self-register &#183; ONE writer owns <tspan font-family="'DejaVu Sans Mono', monospace" fill="#bfe6ff">jobs.redb</tspan> &#183; the &#129516; viz observes by reading the same redb</text>

  <g font-size="12.5">
    <line x1="760" y1="58" x2="800" y2="58" stroke="#7CFFB2" stroke-width="3" marker-end="url(#arrg)"/>
    <text x="808" y="62" fill="#cfe6f5">single-writer write</text>
    <line x1="930" y1="58" x2="970" y2="58" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arr)"/>
    <text x="978" y="62" fill="#cfe6f5">read-only observe</text>
  </g>

  <!-- producers (left) -->
  <rect x="36" y="110" width="248" height="370" rx="12" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="160" y="138" fill="#eaf6ff" font-size="15" font-weight="700" text-anchor="middle">ops self-register</text>
  <text x="160" y="157" fill="#9fc9e0" font-size="10.5" text-anchor="middle">a JobHandle: running &#8594; done|failed</text>

  <g font-family="'DejaVu Sans Mono', monospace">
    <rect x="56" y="174" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="191" fill="#7CFFB2" font-size="10.5" text-anchor="middle">release_run</text>
    <rect x="56" y="206" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="223" fill="#bfe6ff" font-size="10.5" text-anchor="middle">cache up (holger-proxy)</text>
    <rect x="56" y="238" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="255" fill="#bfe6ff" font-size="10.5" text-anchor="middle">workspace fetch / republish</text>
    <rect x="56" y="270" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="287" fill="#bfe6ff" font-size="10.5" text-anchor="middle">docs render / export / book</text>
    <rect x="56" y="302" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="319" fill="#bfe6ff" font-size="10.5" text-anchor="middle">knowledge scan / deepscan</text>
    <rect x="56" y="334" width="208" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/><text x="160" y="351" fill="#bfe6ff" font-size="10.5" text-anchor="middle">bench / test matrix / index</text>
  </g>
  <text x="160" y="384" fill="#86b3cc" font-size="10" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">the Drop guard finalizes the row even on</text>
  <text x="160" y="398" fill="#86b3cc" font-size="10" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">panic/early-return (running &#8594; failed)</text>
  <text x="160" y="424" fill="#a9d8ee" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">src/jobs.rs &#183; kind = string (no schema change)</text>
  <text x="160" y="442" fill="#7fa8c4" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">result_ref links a job to its Iceberg result row</text>
  <text x="160" y="462" fill="#7fa8c4" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">redb (mutable key), NOT Iceberg (append-only)</text>

  <line x1="284" y1="300" x2="420" y2="300" stroke="#7CFFB2" stroke-width="3" marker-end="url(#arrg)"/>

  <!-- the two owners -->
  <rect x="426" y="130" width="300" height="150" rx="12" fill="url(#rail)" stroke="#7CFFB2" stroke-width="2.5"/>
  <text x="576" y="158" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">fat process owns it</text>
  <text x="576" y="177" fill="#9fc9e0" font-size="10.5" text-anchor="middle">local FS, no daemon</text>
  <rect x="448" y="190" width="256" height="34" rx="5" fill="url(#slot)" stroke="#7CFFB2" stroke-width="1.4"/>
  <text x="576" y="211" fill="#bfe6ff" font-size="10" text-anchor="middle">JobHandle writes jobs.redb directly via JobSink</text>
  <text x="576" y="246" fill="#86b3cc" font-size="10" text-anchor="middle">the everyday local mode &#183; like cache up</text>
  <text x="576" y="263" fill="#7fa8c4" font-size="9.5" text-anchor="middle">starting the daemon flips ownership over the SAME redb</text>

  <rect x="426" y="312" width="300" height="150" rx="12" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="576" y="340" fill="#eaf6ff" font-size="14.5" font-weight="700" text-anchor="middle">server owns it</text>
  <text x="576" y="359" fill="#9fc9e0" font-size="10.5" text-anchor="middle">thin client submits over gRPC</text>
  <rect x="448" y="372" width="256" height="34" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.4"/>
  <text x="576" y="393" fill="#bfe6ff" font-size="10" text-anchor="middle">Telemetry.SubmitJobs &#8594; server applies to ITS jobs.redb</text>
  <text x="576" y="428" fill="#86b3cc" font-size="10" text-anchor="middle">Ops.RunRelease registers the same release_run kind</text>
  <text x="576" y="445" fill="#7fa8c4" font-size="9.5" text-anchor="middle">single-writer discipline matches registry.redb</text>

  <!-- redb store -->
  <line x1="726" y1="205" x2="800" y2="280" stroke="#7CFFB2" stroke-width="3" marker-end="url(#arrg)"/>
  <line x1="726" y1="387" x2="800" y2="312" stroke="#7CFFB2" stroke-width="3" marker-end="url(#arrg)"/>
  <rect x="806" y="244" width="190" height="104" rx="12" fill="url(#chip)" stroke="#7fc8ea" stroke-width="2.5"/>
  <text x="901" y="280" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">jobs.redb</text>
  <text x="901" y="300" fill="#9fc9e0" font-size="10" text-anchor="middle">distinct from catalog.redb</text>
  <text x="901" y="315" fill="#9fc9e0" font-size="10" text-anchor="middle">+ registry.redb</text>
  <text x="901" y="333" fill="#7fa8c4" font-size="9" text-anchor="middle">retention: 30d / 2000-row cap</text>

  <!-- viz observes -->
  <line x1="996" y1="296" x2="1066" y2="296" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arr)"/>
  <rect x="1010" y="160" width="140" height="60" rx="11" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <path d="M996 296 H1080 V222" stroke="#6fd3f5" stroke-width="3" fill="none" marker-end="url(#arr)"/>
  <text x="1080" y="186" fill="#eaf6ff" font-size="13" font-weight="700" text-anchor="middle">&#129516; viz</text>
  <text x="1080" y="205" fill="#9fc9e0" font-size="9.5" text-anchor="middle">live ledger pane</text>

  <text x="1066" y="330" fill="#86b3cc" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">open_read_only</text>
  <text x="1066" y="344" fill="#86b3cc" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">copies file aside</text>
  <text x="1066" y="358" fill="#86b3cc" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">when server holds</text>
  <text x="1066" y="372" fill="#86b3cc" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans', sans-serif">the lock</text>

  <!-- ground -->
  <rect x="36" y="500" width="1114" height="40" rx="10" fill="url(#rail)" stroke="#7fc8ea" stroke-width="2"/>
  <text x="60" y="525" fill="#bcd9ec" font-size="11.5">Iceberg stays the home for what an op PRODUCED; redb is the ledger that an op RAN &#8212; one mutable row per long-running operation, overwritten in place.</text>
</svg>