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

nordisk/nornir

.nornir/assets/workspace-dataroot.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1180 560" 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="reg" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#2d2410"/><stop offset="1" stop-color="#1c1607"/>
    </linearGradient>
    <linearGradient id="ws" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#14384f"/><stop offset="1" stop-color="#0e2a3e"/>
    </linearGradient>
    <linearGradient id="store" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#17402c"/><stop offset="1" stop-color="#0c2418"/>
    </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>
  </defs>

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

  <text x="40" y="42" fill="#eaf6ff" font-size="22" font-weight="700">the data root &#8212; <tspan font-family="'DejaVu Sans Mono', monospace" fill="#bfe6ff">&lt;home&gt;/.nornir</tspan></text>
  <text x="40" y="66" fill="#9fc9e0" font-size="14.5">ONE folder per workspace &#183; the registry is the ONLY global file &#183; server &#8801; user: same code, same layout</text>

  <!-- registry -->
  <rect x="40" y="120" width="300" height="92" rx="10" fill="url(#reg)" stroke="#c99a3a" stroke-width="1.5"/>
  <text x="60" y="150" fill="#ffdf9e" font-size="15" font-weight="700">workspaces/registry.redb</text>
  <text x="60" y="172" fill="#e7c98e" font-size="12.5">the ONLY global file &#8212; the index</text>
  <text x="60" y="192" fill="#e7c98e" font-size="12.5">name &#8594; serde_json(Workspace)</text>

  <text x="40" y="250" fill="#7fb8d8" font-size="13" font-weight="700" font-family="'DejaVu Sans Mono', monospace">workspaces/&lt;name&gt;/</text>

  <!-- three per-workspace stores -->
  <g>
    <rect x="40" y="272" width="330" height="200" rx="10" fill="url(#ws)" stroke="#2f6f93" stroke-width="1.5"/>
    <text x="60" y="300" fill="#bfe6ff" font-size="15" font-weight="700" font-family="'DejaVu Sans Mono', monospace">git/</text>
    <text x="60" y="322" fill="#cde7f6" font-size="12.5">member source checkouts</text>
    <text x="60" y="342" fill="#9fc9e0" font-size="12">server clones here &#183; fat = your checkout</text>

    <line x1="60" y1="360" x2="350" y2="360" stroke="#20516e" stroke-width="1"/>

    <text x="60" y="388" fill="#bfe6ff" font-size="15" font-weight="700" font-family="'DejaVu Sans Mono', monospace">builds/warehouse/</text>
    <text x="60" y="410" fill="#cde7f6" font-size="12.5">this workspace's Iceberg warehouse</text>
    <text x="60" y="430" fill="#9fc9e0" font-size="12">catalog.redb &#183; jobs.redb live beside it</text>

    <line x1="60" y1="446" x2="350" y2="446" stroke="#20516e" stroke-width="1"/>
    <text x="60" y="466" fill="#bfe6ff" font-size="13.5" font-weight="700" font-family="'DejaVu Sans Mono', monospace">funnel/ <tspan fill="#9fc9e0" font-weight="400" font-family="'DejaVu Sans'">&#8212; idea&#8594;plan store</tspan></text>
  </g>

  <!-- control plane -->
  <rect x="470" y="120" width="330" height="140" rx="10" fill="url(#store)" stroke="#2f8f5e" stroke-width="1.5"/>
  <text x="490" y="148" fill="#a9f0c6" font-size="15" font-weight="700">control plane (git-tracked)</text>
  <text x="490" y="172" fill="#cdeede" font-size="12.5" font-family="'DejaVu Sans Mono', monospace">workspace_&lt;name&gt;/</text>
  <text x="505" y="194" fill="#bfe6d3" font-size="12">&#8226; nornir-workspace.toml &#8212; the descriptor</text>
  <text x="505" y="214" fill="#bfe6d3" font-size="12">&#8226; release/nornir.toml &#183; SPEC.md</text>
  <text x="505" y="234" fill="#bfe6d3" font-size="12">NO source code, NO data lives here</text>

  <!-- resolvers -->
  <rect x="470" y="300" width="330" height="172" rx="10" fill="url(#ws)" stroke="#2f6f93" stroke-width="1.5"/>
  <text x="490" y="328" fill="#bfe6ff" font-size="15" font-weight="700">config.rs resolvers</text>
  <g fill="#cde7f6" font-size="12" font-family="'DejaVu Sans Mono', monospace">
    <text x="490" y="352">nornir_home()      home/.nornir</text>
    <text x="490" y="374">registry_root()    .../workspaces</text>
    <text x="490" y="396">workspace_name()   from path</text>
    <text x="490" y="418">warehouse_root()   &lt;name&gt;/builds</text>
    <text x="490" y="440">funnel_root()      &lt;name&gt;/funnel</text>
  </g>
  <text x="490" y="462" fill="#9fc9e0" font-size="11.5">no path env-vars &#8212; derived from $HOME</text>

  <!-- two identities -->
  <rect x="880" y="120" width="260" height="120" rx="10" fill="url(#reg)" stroke="#c99a3a" stroke-width="1.5"/>
  <text x="900" y="148" fill="#ffdf9e" font-size="15" font-weight="700">who runs it</text>
  <text x="900" y="176" fill="#e7c98e" font-size="12.5" font-family="'DejaVu Sans Mono', monospace">rickard &#8594; /home/rickard</text>
  <text x="900" y="200" fill="#e7c98e" font-size="12.5" font-family="'DejaVu Sans Mono', monospace">nornir  &#8594; /home/nornir</text>
  <text x="900" y="226" fill="#9fc9e0" font-size="11.5">same code, one rule, two users</text>

  <rect x="880" y="300" width="260" height="172" rx="10" fill="url(#ws)" stroke="#2f6f93" stroke-width="1.5"/>
  <text x="900" y="328" fill="#bfe6ff" font-size="15" font-weight="700">Mode (registry row)</text>
  <text x="900" y="356" fill="#cde7f6" font-size="12.5"><tspan font-weight="700">monitored</tspan> &#8212; server polls git</text>
  <text x="900" y="380" fill="#cde7f6" font-size="12.5"><tspan font-weight="700">pushed</tspan> &#8212; thin client sends src</text>
  <text x="900" y="404" fill="#cde7f6" font-size="12.5"><tspan font-weight="700">external</tspan> &#8212; fat checkout, git/ empty</text>
  <text x="900" y="440" fill="#9fc9e0" font-size="12">descriptor_content stored IN the row:</text>
  <text x="900" y="458" fill="#9fc9e0" font-size="12">the single source of truth</text>

  <!-- arrows -->
  <path d="M340 166 L470 176" stroke="#6fd3f5" stroke-width="1.6" fill="none" marker-end="url(#arr)"/>
  <path d="M635 260 L635 300" stroke="#6fd3f5" stroke-width="1.6" fill="none" marker-end="url(#arr)"/>
  <path d="M800 386 L470 386" stroke="#6fd3f5" stroke-width="1.6" fill="none" marker-end="url(#arr)" opacity="0.55"/>

  <text x="40" y="540" fill="#5b83a0" font-size="11.5" font-family="'DejaVu Sans Mono', monospace">src/config.rs &#183; src/registry.rs &#183; src/workspace/descriptor.rs</text>
</svg>