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

nordisk/nornir

.nornir/assets/resolved-index.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 640" 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="slot" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#123448"/>
      <stop offset="1" stop-color="#0a2032"/>
    </linearGradient>
    <linearGradient id="store" x1="0" y1="0" x2="0" y2="1">
      <stop offset="0" stop-color="#163b2e"/>
      <stop offset="1" stop-color="#0c2620"/>
    </linearGradient>
    <marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto" markerUnits="userSpaceOnUse">
      <path d="M0 0 L7 3 L0 6 Z" fill="#6fd3f5"/>
    </marker>
    <marker id="arrowG" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto" markerUnits="userSpaceOnUse">
      <path d="M0 0 L7 3 L0 6 Z" fill="#7CFFB2"/>
    </marker>
  </defs>

  <!-- PCB substrate -->
  <rect x="0" y="0" width="1200" height="640" fill="url(#board)"/>
  <g stroke="#143a52" stroke-width="1">
    <line x1="0" y1="78" x2="1200" y2="78"/>
    <line x1="0" y1="600" x2="1200" y2="600"/>
  </g>
  <g fill="#16415c">
    <circle cx="40" cy="40" r="2"/><circle cx="1160" cy="40" r="2"/>
    <circle cx="40" cy="620" r="2"/><circle cx="1160" cy="620" r="2"/>
  </g>

  <!-- title -->
  <text x="40" y="44" fill="#eaf6ff" font-size="22" font-weight="700">resolved index</text>
  <text x="232" y="44" fill="#9fc9e0" font-size="15">source scan &#8594; <tspan fill="#bfe6ff" font-weight="700">single-pass SCIP resolution</tspan> &#8594; persisted resolved map &#8594; consumers</text>

  <!-- legend -->
  <g font-size="12">
    <line x1="40" y1="64" x2="76" y2="64" stroke="#6fd3f5" stroke-width="3" marker-end="url(#arrow)"/>
    <text x="84" y="68" fill="#cfe6f5">flow</text>
    <line x1="150" y1="64" x2="186" y2="64" stroke="#e0b24f" stroke-width="2.5" stroke-dasharray="5 4"/>
    <text x="194" y="68" fill="#cfe6f5">no-barrier gatling ring (work-stolen over files)</text>
    <text x="640" y="68" fill="#7CFFB2" font-size="12">&#9679; resolved/scip preferred</text>
    <text x="830" y="68" fill="#ff9a9a" font-size="12">&#9679; syn fallback (name-only)</text>
  </g>

  <!-- ===================== 1. SOURCE SCAN ===================== -->
  <rect x="36" y="120" width="196" height="200" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="134" y="146" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">1 &#183; source scan</text>
  <text x="134" y="164" fill="#9fc9e0" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">symbols::scan_repo</text>
  <rect x="56" y="176" width="156" height="30" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="134" y="195" fill="#bfe6ff" font-size="9.5" text-anchor="middle">serial walk: (file, crate, size)</text>
  <rect x="56" y="212" width="156" height="44" rx="5" fill="url(#slot)" stroke="#7CFFB2" stroke-width="1.4"/>
  <text x="134" y="229" fill="#bfe6ff" font-size="9.5" text-anchor="middle" font-weight="700">PARALLEL syn parse</text>
  <text x="134" y="245" fill="#9fdcb6" font-size="9" text-anchor="middle">all cores &#183; LPT by byte-size</text>
  <text x="134" y="276" fill="#86b3cc" font-size="9" text-anchor="middle">batched self-dispatch, no barrier</text>
  <text x="134" y="291" fill="#a9d8ee" font-size="9" text-anchor="middle">&#8776;3.3&#215; under load &#183; same output</text>
  <text x="134" y="308" fill="#86b3cc" font-size="8.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">syn map: callee = bare name</text>

  <path d="M232 220 H272" stroke="#6fd3f5" stroke-width="3" fill="none" marker-end="url(#arrow)"/>

  <!-- ===================== 2. SINGLE-PASS SCIP ===================== -->
  <rect x="276" y="108" width="252" height="224" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="402" y="134" fill="#eaf6ff" font-size="14" font-weight="700" text-anchor="middle">2 &#183; single-pass resolution</text>
  <text x="402" y="152" fill="#9fc9e0" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">ra_ingest::ingest_in_process_single_pass</text>
  <rect x="296" y="164" width="212" height="30" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="402" y="183" fill="#bfe6ff" font-size="9.5" text-anchor="middle">rust-analyzer salsa DB (in-process)</text>
  <rect x="296" y="200" width="212" height="44" rx="5" fill="url(#slot)" stroke="#7CFFB2" stroke-width="1.4"/>
  <text x="402" y="217" fill="#bfe6ff" font-size="9.5" text-anchor="middle" font-weight="700">one token walk / file</text>
  <text x="402" y="233" fill="#9fdcb6" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">goto_definition per NameRef (cached)</text>
  <rect x="296" y="250" width="212" height="30" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="402" y="269" fill="#bfe6ff" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">gatling_map_owned (rayon-free, /chunk)</text>
  <text x="402" y="298" fill="#ffcf6f" font-size="9.5" text-anchor="middle" font-weight="700">scope fix: strip_prefix? &#8594; workspace-only</text>
  <text x="402" y="313" fill="#a9d8ee" font-size="9.5" text-anchor="middle">2&#8239;M&#8594;293&#8239;k defs &#183; <tspan fill="#7CFFB2" font-weight="700">35&#8239;min &#8594; 63.5&#8239;s</tspan> &#183; prefill_caches</text>
  <text x="402" y="327" fill="#86b3cc" font-size="8.5" text-anchor="middle">per-file panic-guard &#183; validated vs find_all_refs</text>

  <path d="M528 220 H568" stroke="#6fd3f5" stroke-width="3" fill="none" marker-end="url(#arrow)"/>

  <!-- ===================== 3. RESOLVED INDEX (warehouse) ===================== -->
  <rect x="572" y="120" width="216" height="200" rx="10" fill="url(#store)" stroke="#5fd0a0" stroke-width="2"/>
  <text x="680" y="146" fill="#d8ffe8" font-size="14" font-weight="700" text-anchor="middle">3 &#183; resolved index</text>
  <text x="680" y="164" fill="#9fdcb6" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">scip_occurrences (Iceberg)</text>
  <rect x="592" y="176" width="176" height="34" rx="5" fill="url(#slot)" stroke="#7CFFB2" stroke-width="1.4"/>
  <text x="680" y="191" fill="#bfe6ff" font-size="11" text-anchor="middle" font-weight="700">~356k rows</text>
  <text x="680" y="204" fill="#9fdcb6" font-size="8.5" text-anchor="middle">resolved moniker / def-site</text>
  <rect x="592" y="216" width="176" height="28" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="680" y="234" fill="#bfe6ff" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">SHA-keyed &#183; historized</text>
  <rect x="592" y="250" width="176" height="28" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="680" y="268" fill="#bfe6ff" font-size="9" text-anchor="middle">persist &#8776;10s &#183; merge 3&#8239;ms</text>
  <text x="680" y="296" fill="#86b3cc" font-size="9" text-anchor="middle">scip_call_edges by containment</text>
  <text x="680" y="310" fill="#a9d8ee" font-size="9" text-anchor="middle">51&#8239;MB on disk &#183; spans bin&#8594;lib</text>

  <path d="M788 200 H828" stroke="#7CFFB2" stroke-width="3" fill="none" marker-end="url(#arrowG)"/>

  <!-- ===================== 4. QUERY LAYER (preference) ===================== -->
  <rect x="832" y="120" width="156" height="160" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="910" y="146" fill="#eaf6ff" font-size="13.5" font-weight="700" text-anchor="middle">4 &#183; query layer</text>
  <text x="910" y="164" fill="#9fc9e0" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">query::load_preferred</text>
  <rect x="852" y="176" width="116" height="40" rx="5" fill="url(#slot)" stroke="#7CFFB2" stroke-width="1.4"/>
  <text x="910" y="192" fill="#bfe6ff" font-size="9" text-anchor="middle">scip if populated</text>
  <text x="910" y="206" fill="#9fdcb6" font-size="8.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">"resolved/scip"</text>
  <rect x="852" y="222" width="116" height="36" rx="5" fill="url(#slot)" stroke="#ff9a9a" stroke-width="1.2"/>
  <text x="910" y="238" fill="#ffd6d6" font-size="9" text-anchor="middle">else syn map</text>
  <text x="910" y="251" fill="#e8a0a0" font-size="8.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">"syn"</text>
  <text x="910" y="274" fill="#86b3cc" font-size="8.5" text-anchor="middle">one chokepoint</text>

  <path d="M988 200 H1024" stroke="#7CFFB2" stroke-width="3" fill="none" marker-end="url(#arrowG)"/>

  <!-- ===================== 5. CONSUMERS ===================== -->
  <rect x="1028" y="120" width="138" height="200" rx="10" fill="url(#chip)" stroke="#5aa6cf" stroke-width="2"/>
  <text x="1097" y="146" fill="#eaf6ff" font-size="13.5" font-weight="700" text-anchor="middle">5 &#183; consumers</text>
  <rect x="1044" y="160" width="106" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="1097" y="177" fill="#bfe6ff" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">CLI knowledge</text>
  <rect x="1044" y="192" width="106" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="1097" y="209" fill="#bfe6ff" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">MCP tools</text>
  <rect x="1044" y="224" width="106" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="1097" y="241" fill="#bfe6ff" font-size="9" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">server RPCs</text>
  <rect x="1044" y="256" width="106" height="26" rx="5" fill="url(#slot)" stroke="#6fd3f5" stroke-width="1.3"/>
  <text x="1097" y="273" fill="#bfe6ff" font-size="9" text-anchor="middle">metro feed</text>
  <text x="1097" y="300" fill="#86b3cc" font-size="8.5" text-anchor="middle">callers / callees</text>
  <text x="1097" y="312" fill="#86b3cc" font-size="8.5" text-anchor="middle">call_path</text>

  <!-- ===================== FUTURE: static search tree ===================== -->
  <rect x="832" y="372" width="334" height="92" rx="10" fill="url(#chip)" stroke="#7fb0cc" stroke-width="2" stroke-dasharray="6 4"/>
  <text x="999" y="398" fill="#cfe6f5" font-size="13" font-weight="700" text-anchor="middle">planned &#183; static search tree (query layer)</text>
  <text x="999" y="418" fill="#9fc9e0" font-size="9.5" text-anchor="middle">Ragnar AVX2 stree over the resolved rows &#8212; billions-of-rows</text>
  <text x="999" y="433" fill="#9fc9e0" font-size="9.5" text-anchor="middle" font-family="'DejaVu Sans Mono', monospace">callers_of / refs_to &#183; SIMD + prefetch, batchable</text>
  <text x="999" y="451" fill="#86b3cc" font-size="9" text-anchor="middle">accelerates the QUERY, not the build &#183; #1 next: INCREMENTAL re-index</text>
  <path d="M910 280 V372" stroke="#7fb0cc" stroke-width="2.2" fill="none" stroke-dasharray="5 4" marker-end="url(#arrow)"/>

  <!-- what changed banner -->
  <rect x="36" y="372" width="760" height="92" rx="10" fill="url(#slot)" stroke="#5aa6cf" stroke-width="1.4"/>
  <text x="56" y="396" fill="#eaf6ff" font-size="13" font-weight="700">what changed</text>
  <text x="56" y="418" fill="#bfe6ff" font-size="10.5"><tspan fill="#7CFFB2" font-weight="700">single-pass</tspan> goto_definition (was per-NameRef find_all_refs) &#183; <tspan fill="#7CFFB2" font-weight="700">parallel scan</tspan> (was serial syn loop)</text>
  <text x="56" y="436" fill="#bfe6ff" font-size="10.5"><tspan fill="#ffcf6f" font-weight="700">workspace-only scope</tspan> (was whole 1342-crate closure) &#183; <tspan fill="#7CFFB2" font-weight="700">consumers read the persisted index</tspan> via load_preferred</text>
  <text x="56" y="454" fill="#9fc9e0" font-size="10">rayon-free throughout (constellation law) &#183; resolved edges close the bin&#8594;lib skeletons syn could not</text>

  <text x="40" y="500" fill="#5e86a0" font-size="10" font-family="'DejaVu Sans Mono', monospace">src/knowledge/{symbols,ra_ingest,scip,query}.rs &#183; warehouse: scip_occurrences &#183; see scip-resolved-knowledge.md</text>
</svg>