GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Kuiper, cosmos and drawing engines / galaxies-wafers / iterations/44-vaccine-immunity

Iterations — 44 Vaccine Immunity and 3 more files (part 2)

A JavaScript module in Galaxies Wafers that draws last fired, using SHA-256 and uses data from GitHub API and the CVAA repository. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.

425 lines of JavaScript and HTML and CSS from galaxies-wafers, in 4 files. Topic: Kuiper, cosmos and drawing engines. Section 1225 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. Iterations — 44 Vaccine Immunity render · galaxies-wafers / iterations/44-vaccine-immunity/app.mjs lines 479–630
  2. Imm render · galaxies-wafers / iterations/44-vaccine-immunity/imm.css lines 1–55
  3. Iterations — 44 Vaccine Immunity Page render · galaxies-wafers / iterations/44-vaccine-immunity/index.html lines 1–91
  4. Vax ingest · galaxies-wafers / iterations/44-vaccine-immunity/vax.mjs lines 1–127

Iterations — 44 Vaccine Immunity

A JavaScript module in Galaxies Wafers that draws last fired, using SHA-256 and uses data from GitHub API and the CVAA repository. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.

rendergalaxies-wafers / iterations/44-vaccine-immunity/app.mjs · lines 479–630 of 630 (continued from section 1224) · Entry point · pattern HttpError (shared by 2 files)

What it does
It draws last fired. Defines 48 functions or classes, including short, $, el, link, FetchQueue. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
README: "The page (`index.html`, `app.mjs`, `lib.mjs`) is inherited unchanged from testcode/202609151339."
Inputs & outputs
In: data source: cvaa data; data source: GitHub API; JSON file last-fired.json. Out: canvas drawing.
Downstream impact
Used directly by 1 file: Iterations — 44 Vaccine Immunity Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.
What it achieves
It fetches queue (`FetchQueue`), fetches once (`fetchOnce`) and updates ui state (`updateUIState`). Loading in Grid Atlas grammar; one canvas for the ring, one card and one integrity table re-filled. It responds to click, change and toggle events.
Why it matters
Loaded by the page of the same name at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.
Application
galaxies-wafers · iterations/44-vaccine-immunity · JavaScript module
Uses
Vax (import)
Used by
loaded by Iterations — 44 Vaccine Immunity Page (script src)
Produces
short, $, el, link, FetchQueue, HttpError, fetchOnce, updateUIState, tick, setText, hydrate, loadListing
Defines here
at, pinchState, zoomAbout, up, tapAt, step
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/44-vaccine-immunity/app.mjs:479-630 · blob b9d8908699e4aa7d0f3da55385a6c5c3d34b2a05 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: unknown
  ctx.setTransform(DPR, 0, 0, DPR, 0, 0);
  ctx.fillStyle = '#05060a'; ctx.fillRect(0, 0, W, H);
  const N = D.ring.length;
  if (!RT.ring.loaded || !RT.ring.visible) {
    ctx.fillStyle = '#8b93a7'; ctx.font = '12px ui-monospace, Menlo, Consolas, monospace'; ctx.textAlign = 'center';
    ctx.fillText(RT.ring.loaded ? 'Ring hidden: tick Ring to draw it' : (RT.ring.loading ? 'LOAD — reading the listing…' : 'WAIT — tick Ring, or tap ‹ ›'), W / 2, H / 2);
    setText('drawn', 'drawn: 0 nodes');
    return;
  }
  const k = S.view.k;
  ctx.strokeStyle = '#1b2030'; ctx.lineWidth = 1;
  ctx.beginPath(); ctx.arc(sx(0), sy(0), k, 0, Math.PI * 2); ctx.stroke();
  let edges = 0;
  if (RT.gen.visible && RT.gen.loaded) for (const e of D.edges.gen) {
    const [ax, ay] = pos(e.a), [bx, by] = pos(e.b);
    cased(() => { ctx.beginPath(); ctx.moveTo(sx(ax), sy(ay)); ctx.lineTo(sx(bx), sy(by)); }, COL.gen, 1.6); edges++;
  }
  if (RT.dose.visible && RT.dose.loaded) {
    const bend = { 'every-loop': 0.78, 'every-commit': 0.58, 'every-deploy': 0.38 };
    for (const e of D.edges.dose) {
      const [ax, ay] = pos(e.a), [bx, by] = pos(e.b);
      const f = bend[e.dose];
      cased(() => { ctx.beginPath(); ctx.moveTo(sx(ax), sy(ay)); ctx.quadraticCurveTo(sx((ax + bx) / 2 * f), sy((ay + by) / 2 * f), sx(bx), sy(by)); }, COL[e.dose], 1.8); edges++;
    }
  }
  if (RT.sup.visible && RT.sup.loaded) for (const e of D.edges.sup) {
    const [ax, ay] = pos(e.a), [bx, by] = pos(e.b);
    const X1 = sx(ax), Y1 = sy(ay), X2 = sx(bx), Y2 = sy(by);
    cased(() => { ctx.beginPath(); ctx.moveTo(X1, Y1); ctx.lineTo(X2, Y2); }, '#ffffff', 2, [6, 4]);
    const a = Math.atan2(Y2 - Y1, X2 - X1), L = 11, back = 9;
    const tx = X2 - Math.cos(a) * back, ty = Y2 - Math.sin(a) * back;
    ctx.beginPath(); ctx.moveTo(tx, ty); ctx.lineTo(tx - L * Math.cos(a - 0.45), ty - L * Math.sin(a - 0.45)); ctx.lineTo(tx - L * Math.cos(a + 0.45), ty - L * Math.sin(a + 0.45)); ctx.closePath();
    ctx.fillStyle = '#fff'; ctx.strokeStyle = '#000'; ctx.lineWidth = 2; ctx.stroke(); ctx.fill();
    edges++;
  }
  const r = Math.max(3, Math.min(9, 2 + k * 0.012));
  const spacing = (2 * Math.PI * k) / Math.max(1, N);
  const labels = spacing >= 13 && (W >= 700 || k >= baseK() * 1.8);   // on a phone the whole ring fits only without labels
  let drawnNodes = 0, fired = 0;
  ctx.font = `${Math.min(12, Math.max(9, spacing * 0.7))}px ui-monospace, Menlo, Consolas, monospace`;
  for (let i = 0; i < N; i++) {
    const [x, y, t] = pos(i);
    const X = sx(x), Y = sy(y);
    if (X < -60 || Y < -60 || X > W + 60 || Y > H + 60) continue;
    drawnNodes++;
    const e = D.parsed.get(D.ring[i].file);
    const read = e && !e.failed;
    const sup = read && e.p.meta && e.p.meta.superseded_by;
    ctx.beginPath(); ctx.arc(X, Y, r, 0, Math.PI * 2);
    if (sup) { ctx.fillStyle = '#05060a'; ctx.fill(); ctx.lineWidth = 3.5; ctx.strokeStyle = '#000'; ctx.stroke(); ctx.lineWidth = 2; ctx.strokeStyle = '#eceff4'; ctx.stroke(); ctx.setLineDash([3, 3]); ctx.beginPath(); ctx.arc(X, Y, r + 4, 0, Math.PI * 2); ctx.strokeStyle = '#6b7385'; ctx.lineWidth = 1; ctx.stroke(); ctx.setLineDash([]); }
    else if (read) { ctx.fillStyle = '#eceff4'; ctx.fill(); ctx.lineWidth = 1.5; ctx.strokeStyle = '#000'; ctx.stroke(); }
    else { ctx.fillStyle = '#14161c'; ctx.fill(); ctx.lineWidth = 2; ctx.strokeStyle = '#6b7385'; ctx.stroke(); }
    const name = read && e.p.meta && e.p.meta.vaccine || D.ring[i].slug;
    if (RT.fired.visible && D.fired && D.fired[name]) {
      fired++;
      ctx.beginPath(); ctx.arc(X + Math.cos(t) * (r + 7), Y + Math.sin(t) * (r + 7), 2.5, 0, Math.PI * 2);
      ctx.fillStyle = '#5ec8f2'; ctx.fill();
    }
    if (i === S.sel) { ctx.beginPath(); ctx.arc(X, Y, r + 6, 0, Math.PI * 2); ctx.strokeStyle = '#000'; ctx.lineWidth = 4; ctx.stroke(); ctx.strokeStyle = '#5ec8f2'; ctx.lineWidth = 2; ctx.stroke(); }
    if (labels) {
      const full = V.adapt(D.ring[i].slug); const text = full.length > 30 ? full.slice(0, 29) + '…' : full;
      ctx.save();
      ctx.translate(X, Y);
      const left = Math.cos(t) < 0;
      ctx.rotate(left ? t + Math.PI : t);
      ctx.textAlign = left ? 'right' : 'left'; ctx.textBaseline = 'middle';
      const off = (left ? -1 : 1) * (r + 12);
      ctx.lineWidth = 3; ctx.strokeStyle = '#05060a'; ctx.strokeText(text, off, 0);
      ctx.fillStyle = i === S.sel ? '#ffffff' : '#c3cad8'; ctx.fillText(text, off, 0);
      ctx.restore();
    }
  }
  if (!labels && S.sel >= 0 && S.sel < N) {   /* the selected name, level at the centre, so it never leaves the canvas */
    const full = V.adapt(D.ring[S.sel].slug);
    ctx.font = '12px ui-monospace, Menlo, Consolas, monospace'; ctx.textAlign = 'center'; ctx.textBaseline = 'middle';
    ctx.lineWidth = 4; ctx.strokeStyle = '#05060a'; ctx.strokeText(full, sx(0), sy(0)); ctx.fillStyle = '#ffffff'; ctx.fillText(full, sx(0), sy(0));
    ctx.fillStyle = '#8b93a7'; ctx.font = '10.5px ui-monospace, Menlo, Consolas, monospace'; ctx.fillText(D.ring[S.sel].ts, sx(0), sy(0) + 16);
  }
  lastDraw = performance.now() - t0;
  setText('drawn', `drawn: ${drawnNodes} of ${N} nodes · ${edges} edges${RT.fired.visible && D.fired ? ` · ${fired} fired marks` : ''} · labels ${labels ? "on" : "off (zoom in or tap a node)"} · ${lastDraw.toFixed(1)} ms`);
}

/* ── touch: drag to pan, pinch or wheel to zoom, tap to read ────────────── */
const pointers = new Map();
let gesture = null;
const at = e => { const r = canvas.getBoundingClientRect(); return { x: e.clientX - r.left, y: e.clientY - r.top }; };
function pinchState() { const [a, b] = [...pointers.values()]; return { d: Math.hypot(a.x - b.x, a.y - b.y) || 1, mx: (a.x + b.x) / 2, my: (a.y + b.y) / 2 }; }
function zoomAbout(px, py, k) {
  const X = wx(px), Y = wy(py);
  const base = baseK();
  S.view.k = Math.max(base * 0.5, Math.min(base * 12, k));
  S.view.x = X - (px - W / 2) / S.view.k; S.view.y = Y - (py - H / 2) / S.view.k;
  S.view.x = Math.max(-1.6, Math.min(1.6, S.view.x)); S.view.y = Math.max(-1.6, Math.min(1.6, S.view.y));
  schedule();
}
canvas.addEventListener('pointerdown', e => {
  try { canvas.setPointerCapture(e.pointerId); } catch (_) { /* synthetic pointer */ }
  pointers.set(e.pointerId, at(e));
  if (pointers.size === 1) gesture = { tap: true, x0: at(e).x, y0: at(e).y, vx: S.view.x, vy: S.view.y };
  else if (pointers.size === 2) { const p = pinchState(); gesture = { tap: false, pinch: { ...p, k: S.view.k } }; }
});
canvas.addEventListener('pointermove', e => {
  if (!pointers.has(e.pointerId) || !gesture) return;
  const pt = at(e);
  pointers.set(e.pointerId, pt);
  if (pointers.size === 1 && !gesture.pinch) {
    if (Math.hypot(pt.x - gesture.x0, pt.y - gesture.y0) > 8) gesture.tap = false;
    if (!gesture.tap) { S.view.x = Math.max(-1.6, Math.min(1.6, gesture.vx - (pt.x - gesture.x0) / S.view.k)); S.view.y = Math.max(-1.6, Math.min(1.6, gesture.vy - (pt.y - gesture.y0) / S.view.k)); schedule(); }
  } else if (pointers.size >= 2 && gesture.pinch) {
    const p = pinchState(), g = gesture.pinch;
    zoomAbout(p.mx, p.my, g.k * (p.d / g.d));
  }
});
function up(e) {
  if (!pointers.has(e.pointerId)) return;
  pointers.delete(e.pointerId);
  if (gesture && gesture.tap && pointers.size === 0) { const pt = at(e); tapAt(pt.x, pt.y); }
  if (pointers.size === 0) gesture = null;
}
canvas.addEventListener('pointerup', up);
canvas.addEventListener('pointercancel', e => { pointers.delete(e.pointerId); gesture = null; });
canvas.addEventListener('wheel', e => { e.preventDefault(); const pt = at(e); zoomAbout(pt.x, pt.y, S.view.k * Math.exp(-e.deltaY * 0.0015)); }, { passive: false });

function tapAt(px, py) {
  if (!RT.ring.loaded) { tick('ring'); hydrate('ring'); return; }
  let best = -1, bd = 24;
  for (let i = 0; i < D.ring.length; i++) { const [x, y] = pos(i); const d = Math.hypot(sx(x) - px, sy(y) - py); if (d < bd) { bd = d; best = i; } }
  if (best >= 0) select(best);
}
async function step(d) {
  if (!RT.ring.loaded) { tick('ring'); const ok = await hydrate('ring'); if (!ok) return; select(0); return; }
  select(S.sel < 0 ? (d > 0 ? 0 : D.ring.length - 1) : S.sel + d);
}
$('prev').addEventListener('click', () => step(-1));
$('next').addEventListener('click', () => step(1));
$('fit').addEventListener('click', fit);

$('integrity').addEventListener('toggle', () => { if ($('integrity').open) { tick('ring'); tick('files'); hydrate('files'); } });
$('questions').addEventListener('toggle', () => { if ($('questions').open) { $('q-draw').dataset.key = ''; paintQuestions(); } });

window.addEventListener('resize', resize);
new ResizeObserver(resize).observe(canvas);

$('pin').textContent = COMMIT;
$('q-code').href = BLOB + 'inoculate.mjs';
$('q-app').href = BLOB + 'README.md';
$('prov').textContent = `Source: github.com/Ventusltd/cvaa at ${COMMIT}. File bytes from raw.githubusercontent.com; the vaccines/ listing from the GitHub contents API at that commit.`;
paintMachine();
resize();

/* test hook: read-only numbers for the receipts */
window.__immunity = { counts: () => (RT.ring.loaded ? counts() : null), net: NET, queue, RT, D, lastDraw: () => lastDraw, cacheSize: () => urlCache.size };

Imm

A style sheet in the iterations folder of Galaxies Wafers. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.

rendergalaxies-wafers / iterations/44-vaccine-immunity/imm.css · lines 1–55 of 55 · Entry point

What it does
Side effects: changes the web page (DOM).
Downstream impact
Used directly by 1 file: Iterations — 44 Vaccine Immunity Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/). It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Loaded by the 44 Vaccine Immunity page at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.
Application
galaxies-wafers · iterations/44-vaccine-immunity · style sheet
Uses
none found
Used by
loaded by Iterations — 44 Vaccine Immunity Page (stylesheet)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/44-vaccine-immunity/imm.css:1-55 · blob 17b304c159e5e28341c08d6e1d94b0474e27e344 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
:root{--ink:#d8dee9;--dim:#8b93a7;--ground:#0b0d12;--edge:#1b2030;--beam:#5ec8f2;--loop:#5ec8f2;--commit:#c9a2ff;--deploy:#f2a7c8;--gen:#9aa3b8}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--ground);color:var(--ink);font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  padding:calc(env(safe-area-inset-top,0px) + .8rem) 1rem calc(env(safe-area-inset-bottom,0px) + 2rem)}
main{max-width:60rem;margin:0 auto}
h1{font-size:14px;letter-spacing:.18em;font-weight:600;margin:0 0 .35rem;color:#fff}
p{margin:.35rem 0}
.dim{color:var(--dim)} .small{font-size:11.5px}
a{color:var(--beam)}
code{color:var(--beam);overflow-wrap:anywhere}
.pin{color:#fff;overflow-wrap:anywhere}
.summary{border-left:3px solid #fff;padding:.35rem .6rem;background:#10131b;margin:.6rem 0;overflow-wrap:anywhere}
.layers{display:grid;gap:.2rem;margin:.6rem 0}
.layer{display:flex;align-items:center;gap:.55rem;min-height:40px;padding:0 .2rem;border-bottom:1px solid var(--edge);cursor:pointer}
.layer input{width:20px;height:20px;accent-color:#d8dee9;flex:none}
.layer span{overflow-wrap:anywhere}
.plane{position:relative;margin:.4rem -1rem 0;height:min(100vw,62vh);min-height:320px;max-height:760px;background:#05060a;border-top:1px solid var(--edge);border-bottom:1px solid var(--edge)}
#ring{display:block;width:100%;height:100%;touch-action:none;cursor:pointer}
.fit{position:absolute;right:.6rem;top:.6rem;font:inherit;color:var(--ink);background:#0b0d12e6;border:1px solid var(--edge);border-radius:.35rem;min-width:44px;min-height:40px}
.stepnav{position:absolute;left:.6rem;top:.6rem;display:flex;gap:.35rem}
.stepnav button{font:inherit;font-size:16px;color:var(--ink);background:#0b0d12e6;border:1px solid var(--edge);border-radius:.35rem;min-width:44px;min-height:40px}
.drawn{position:absolute;left:.6rem;bottom:.35rem;right:.6rem;background:#05060acc;padding:.1rem .3rem;border-radius:.25rem;font-size:10.5px;pointer-events:none;overflow-wrap:anywhere}
.legend{margin:.35rem 0 0;line-height:1.9}
.sw{display:inline-block;width:12px;height:12px;border-radius:50%;vertical-align:-2px;margin:0 .3rem 0 .15rem}
.sw-read{background:#eceff4;box-shadow:0 0 0 1.5px #000}
.sw-listed{background:#14161c;box-shadow:inset 0 0 0 2px #6b7385}
.sw-super{background:transparent;box-shadow:inset 0 0 0 2px #eceff4;outline:1px dashed #6b7385;outline-offset:2px}
.ln{display:inline-block;width:18px;height:3px;vertical-align:3px;margin:0 .3rem 0 .15rem;box-shadow:0 0 0 1.5px #000}
.ln-gen{background:var(--gen)} .ln-loop{background:var(--loop)} .ln-commit{background:var(--commit)} .ln-deploy{background:var(--deploy)}
.ln-sup{background:repeating-linear-gradient(90deg,#fff 0 4px,transparent 4px 7px)}
.card{border:1px solid var(--edge);border-radius:.45rem;background:#10131b;padding:.55rem .7rem;margin:.7rem 0;overflow-wrap:anywhere}
.card h3{margin:0 0 .35rem;font-size:14px;color:#fff;font-weight:600}
.card dl{display:grid;grid-template-columns:minmax(6.5rem,auto) 1fr;gap:.3rem .7rem;margin:.4rem 0}
.card dt{color:var(--dim);min-width:0} .card dd{margin:0;white-space:pre-line;min-width:0}
.card dl{grid-template-columns:minmax(6.5rem,auto) minmax(0,1fr)}
@media (max-width:520px){.card dl{grid-template-columns:minmax(0,1fr);gap:.1rem}.card dt{margin-top:.45rem}}
.card .state{font-weight:600;letter-spacing:.08em;color:#fff}
.card pre{margin:.3rem 0;padding:.5rem;background:#05060a;border:1px solid var(--edge);border-radius:.35rem;overflow:auto;max-height:22rem;font-size:11px;line-height:1.4;white-space:pre}
.adapted{display:inline-block;border:1px dashed #6b7385;border-radius:.3rem;padding:0 .35rem;font-size:11px;color:var(--dim)}
.btns{display:flex;flex-wrap:wrap;gap:.4rem;margin:.4rem 0}
.btn{display:inline-flex;align-items:center;font:inherit;font-size:11.5px;letter-spacing:.1em;color:#fff;text-decoration:none;background:#07080c;border:1px solid #3a4258;border-radius:.35rem;padding:.3rem .55rem;min-height:36px}
.panel{border:1px solid var(--edge);border-radius:.45rem;background:#10131b;padding:0 .65rem;margin:1rem 0 .5rem}
.panel summary{font-size:11px;letter-spacing:.14em;text-transform:uppercase;cursor:pointer;color:var(--beam);min-height:44px;display:flex;align-items:center}
.panel dt{color:#fff;margin-top:.5rem;font-size:12px}
.panel dd{margin:.2rem 0 .6rem;font-size:11.5px;overflow-wrap:anywhere}
.tablewrap{overflow-x:auto}
.rows-t{border-collapse:collapse;width:100%;font-size:12px;margin:.3rem 0}
.rows-t th{text-align:left;font-weight:400;color:var(--dim);padding:.3rem .5rem .3rem 0;border-bottom:1px solid var(--edge);vertical-align:top}
.rows-t td{color:#fff;padding:.3rem 0;border-bottom:1px solid var(--edge);overflow-wrap:anywhere}
.plainlist{margin:.3rem 0 .7rem;padding-left:1.1rem;overflow-wrap:anywhere}
.qrows{margin:.3rem 0;padding-left:1.1rem}
.machine{border-left:3px solid var(--beam);padding:.35rem .6rem;background:#07080c;overflow-wrap:anywhere}
footer{margin-top:1.2rem;overflow-wrap:anywhere}
@media (min-width:900px){.plane{margin:.4rem 0 0;border:1px solid var(--edge);border-radius:.45rem;height:62vh}}

Iterations — 44 Vaccine Immunity Page

A web page in Galaxies Wafers that draws last fired, transformers and cables, using SHA-256. Published at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.

rendergalaxies-wafers / iterations/44-vaccine-immunity/index.html · lines 1–91 of 91 · Entry point

What it does
It draws last fired, transformers and cables. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain terms in the code: transformers, cables. README: "The page (`index.html`, `app.mjs`, `lib.mjs`) is inherited unchanged from testcode/202609151339."
Inputs & outputs
In: JSON file last-fired.json; form fields (user input). Out: web page.
Downstream impact
It is itself an entry point, published at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.
What it achieves
The README says: The page (`index.html`, `app.mjs`, `lib.mjs`) is inherited unchanged from testcode/.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
galaxies-wafers · iterations/44-vaccine-immunity · page
Uses
Imm (stylesheet), Galaxies Wafers — Iterations Page (link), Iterations — 44 Vaccine Immunity (script src)
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/44-vaccine-immunity/index.html:1-91 · blob 43e655d42ed67b2ec935f818d3540140715fafef · GitHub at these lines
State
achieves: readme · context: readme_derived · stage: output · effects: dom · domain stage: unknown · users: none · canonical: unknown
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="color-scheme" content="dark">
<title>Immunity</title>
<link rel="icon" href="data:,">
<link rel="stylesheet" href="imm.css">
</head>
<body>
<main>
  <header>
    <h1>IMMUNITY</h1>
    <p class="dim">A coding vaccine is a named failure mode plus the executable check that makes a repository immune to it. The registry is the public repository <code>Ventusltd/cvaa</code>: one file per vaccine in <code>vaccines/</code>, named by a 12-digit timestamp, with front matter <code>vaccine</code>, <code>generation</code>, <code>dose</code>, <code>superseded_by</code> and five sections:   … [line shortened here: 587 characters; full line on GitHub]
    <p id="summary" class="summary">WAIT — nothing is fetched until you tick a layer, tap a vaccine or open a section.</p>
  </header>

  <section class="layers" aria-label="Layers">
    <label class="layer"><input type="checkbox" data-layer="ring"><span id="lbl-ring" data-base-label="Ring · vaccines/ listing and vaccines.lock">Ring · vaccines/ listing and vaccines.lock [WAIT]</span></label>
    <label class="layer"><input type="checkbox" data-layer="files"><span id="lbl-files" data-base-label="Files · front matter and sha256 of every vaccine">Files · front matter and sha256 of every vaccine [WAIT]</span></label>
    <label class="layer"><input type="checkbox" data-layer="gen"><span id="lbl-gen" data-base-label="Generation edges · each vaccine to the one before it">Generation edges · each vaccine to the one before it [WAIT]</span></label>
    <label class="layer"><input type="checkbox" data-layer="dose"><span id="lbl-dose" data-base-label="Dose edges · each vaccine to the previous one of the same dose">Dose edges · each vaccine to the previous one of the same dose [WAIT]</span></label>
    <label class="layer"><input type="checkbox" data-layer="sup"><span id="lbl-sup" data-base-label="superseded_by edges · retired vaccine to its successor">superseded_by edges · retired vaccine to its successor [WAIT]</span></label>
    <label class="layer"><input type="checkbox" data-layer="fired"><span id="lbl-fired" data-base-label="Last fired · vaccines/last-fired.json">Last fired · vaccines/last-fired.json [WAIT]</span></label>
  </section>
  <p id="window" class="small dim" hidden></p>

  <div class="plane">
    <canvas id="ring" aria-label="The vaccine ring. Tap a node to read its vaccine. Drag to pan, pinch or wheel to zoom."></canvas>
    <button type="button" id="fit" class="fit">fit</button>
    <div class="stepnav">
      <button type="button" id="prev" aria-label="previous vaccine">‹</button>
      <button type="button" id="next" aria-label="next vaccine">›</button>
    </div>
    <div id="drawn" class="drawn dim"></div>
  </div>
  <p class="legend small dim"><span class="sw sw-read"></span>file read · <span class="sw sw-listed"></span>listed, not read · <span class="sw sw-super"></span>superseded · <span class="ln ln-gen"></span>generation · <span class="ln ln-loop"></span>every-loop · <span class="ln ln-commit"></span>every-commit · <span class="ln ln-deploy"></span>every-deploy · <span class="ln ln-sup"></span>supersede  … [line shortened here: 457 characters; full line on GitHub]

  <section id="card" class="card" aria-live="polite">
    <p class="dim">Tap a vaccine on the ring, or step with ‹ ›, to read it.</p>
  </section>

  <details id="integrity" class="panel">
    <summary>Registry integrity</summary>
    <p class="small dim">Computed now from the listing, <code>vaccines.lock</code> and the file bytes. Opening this section ticks Ring and Files.</p>
    <div class="tablewrap"><table class="rows-t">
      <tbody>
        <tr><th>vaccine files found</th><td id="i-found">not yet known</td></tr>
        <tr><th>named in vaccines.lock</th><td id="i-named">not yet known</td></tr>
        <tr><th>LOCKED (sha256 equals the lock)</th><td id="i-locked">not yet known</td></tr>
        <tr><th>HASH DIFFERS</th><td id="i-differs">not yet known</td></tr>
        <tr><th>lock entries without a file</th><td id="i-orphan">not yet known</td></tr>
        <tr><th>files without a lock entry</th><td id="i-unlocked">not yet known</td></tr>
        <tr><th>superseded</th><td id="i-super">not yet known</td></tr>
        <tr><th>names breaking the 12-digit timestamp rule</th><td id="i-names">not yet known</td></tr>
        <tr><th>repeated timestamps</th><td id="i-dup">not yet known</td></tr>
        <tr><th>front matter or sections breaking the rules</th><td id="i-fm">not yet known</td></tr>
        <tr><th>other files in vaccines/</th><td id="i-other">not yet known</td></tr>
        <tr><th>wording adapted for this page</th><td id="i-adapted">not yet known</td></tr>
      </tbody>
    </table></div>
    <p class="small dim">The filename rule matters: the estate once went fail-closed because one vaccine carried a 14-digit name, and <code>inoculate.mjs</code> refuses the whole registry on one malformed file. The banned-API scan inoculate.mjs applies to each antibody is not recomputed here.</p>
    <ul id="i-list" class="plainlist small"></ul>
  </details>

  <details id="questions" class="panel">
    <summary>Questions</summary>
    <dl>
      <dt>1. How does this help draw a system or a single-line diagram?</dt>
      <dd>It draws no busbar, feeder, transformer, cable route, protection or earthing: none yet. It guards the code that draws them. Vaccines whose Disease or Symptom names a drawn grid element, computed from the files read (name-match inference on the whole words <code>substation</code>, <code>cable</code>, <code>busbar</code>, <code>feeder</code>, <code>transformer</code>, <code>earthing</code>  … [line shortened here: 463 characters; full line on GitHub]
        <ul id="q-draw" class="qrows"><li class="dim">not yet known: tick Files.</li></ul></dd>
      <dt>2. What is this code used for?</dt>
      <dd><code>inoculate.mjs &lt;repo&gt;</code> runs the antibodies against a repository: <code>frontMatter</code> reads each vaccine file; the registry is refused whole on any malformed name, front matter, section or lock mismatch; <code>buildContext</code> builds a data-only snapshot of the target; <code>runAntibody</code> runs each antibody in a child process with an empty environment, the No  … [line shortened here: 1,356 characters; full line on GitHub]
        <span class="btns"><a class="btn" id="q-code" rel="noopener">CODE</a><a class="btn" id="q-app" rel="noopener">APP</a></span>
        This page: <code>vax.mjs</code> <code>parseName</code>, <code>frontMatter</code>, <code>parseVaccine</code>, <code>lockStatus</code>, <code>orderRing</code>, <code>buildEdges</code>, <code>adapt</code>; drawn by <code>app.mjs</code> on one canvas.</dd>
      <dt>3. Where does it lead next?</dt>
      <dd><span id="q-next">not yet known: tick Files.</span></dd>
    </dl>
  </details>
  <p id="machine" class="machine small">Machine detail · not yet known: tick Ring.</p>

  <footer class="dim small">
    <p id="loadingrule">Loading, as Grid Atlas does it: nothing is fetched until a layer is ticked, a vaccine is tapped or a section is opened; one queue of 4 concurrent fetches, each with a 15 s timeout; one shared promise per URL, dropped on failure so a retry is possible; only the changed label or row is rewritten.</p>
    <p id="prov"></p>
    <p>Antibody source is shown as text and never executed on this page. <a href="../">every version</a></p>
  </footer>
</main>
<script type="module" src="app.mjs"></script>
</body>
</html>

Vax

A JavaScript module in the iterations folder of Galaxies Wafers that parses name (`parseName`) and vaccine (`parseVaccine`) and builds edges (`buildEdges`), using SHA-256. Served with the page at https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/.

ingestgalaxies-wafers / iterations/44-vaccine-immunity/vax.mjs · lines 1–127 of 127 · pattern frontMatter (shared by 2 files)

What it does
Defines 11 functions or classes, including hasPrivateWord, adapt, parseName, frontMatter, normalise.
Downstream impact
Used directly by 1 file: Iterations — 44 Vaccine Immunity (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/). Reached from 1 other entry point, including Iterations — 44 Vaccine Immunity Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/44-vaccine-immunity/).
What it achieves
It parses name (`parseName`), parses vaccine (`parseVaccine`) and builds edges (`buildEdges`). Immunity — the pure part. Parsing a vaccine file the way `cvaa/inoculate.mjs` reads it (filename rule, front matter, the five sections, the js block), the public wording adaptation, and the registry integrity counts.
Why it matters
Imported by Iterations — 44 Vaccine Immunity.
Application
galaxies-wafers · iterations/44-vaccine-immunity · JavaScript module
Uses
none found
Used by
imported by Iterations — 44 Vaccine Immunity (import)
Produces
FILENAME, SECTIONS, DOSES, hasPrivateWord, adapt, parseName, frontMatter, normalise, parseVaccine, hex, lockStatus, orderRing
Defines here
hasPrivateWord, adapt, parseName, frontMatter, normalise, parseVaccine, hex, lockStatus, orderRing, buildEdges, reposNamed
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
galaxies-wafers@5814793812add74605660fa821e6a39b8de80588 iterations/44-vaccine-immunity/vax.mjs:1-127 · blob 76ae5595d228448f257c0784e780e2883356014c · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: transform · effects: none found · domain stage: unknown · users: none · canonical: unknown
/* Immunity — the pure part. Parsing a vaccine file the way cvaa/inoculate.mjs
   reads it (filename rule, front matter, the five sections, the js block), the
   public wording adaptation, and the registry integrity counts. No DOM, no
   network. Nothing here executes an antibody: its source is only ever text. */

/* cvaa/inoculate.mjs at the pinned commit: FILENAME, REQUIRED_SECTIONS, DOSES */
export const FILENAME = /^(\d{12})-([a-z0-9]+(?:-[a-z0-9]+)*)\.md$/;
export const SECTIONS = ['Disease', 'Symptom', 'Antibody', 'Dose', 'Provenance'];
export const DOSES = ['every-loop', 'every-commit', 'every-deploy'];

/* The private word for illusion is never printed on this page. It is built
   from character codes so that it never appears in this source either. */
const PRIVATE = String.fromCharCode(109, 97, 121, 97);
const PRIVATE_RE = new RegExp(PRIVATE, 'gi');
export const hasPrivateWord = s => typeof s === 'string' && new RegExp(PRIVATE, 'i').test(s);
export function adapt(s) {
  if (typeof s !== 'string') return s;
  return s.replace(PRIVATE_RE, m => m === m.toUpperCase() ? 'ILLUSION' : (m[0] === m[0].toUpperCase() ? 'Illusion' : 'illusion'));
}

export function parseName(name) {
  const m = FILENAME.exec(name);
  if (m) return { ok: true, ts: m[1], slug: m[2] };
  const why = /^\d{14}-/.test(name) ? '14-digit timestamp; the rule is 12 digits'
    : /^\d+-/.test(name) ? `${name.match(/^\d+/)[0].length}-digit timestamp; the rule is 12 digits`
    : !/\.md$/.test(name) ? 'not a .md file'
    : 'not <12 digits>-<kebab-slug>.md';
  return { ok: false, why };
}

/* inoculate.mjs frontMatter(): same regex, same trimming */
export function frontMatter(text) {
  const m = text.match(/^---\n([\s\S]*?)\n---/);
  if (!m) return null;
  const meta = {};
  for (const line of m[1].split('\n')) { const k = line.match(/^(\w+):\s*"?([^"#]*?)"?\s*(#.*)?$/); if (k) meta[k[1]] = k[2].trim(); }
  return meta;
}

/* CRLF normalised exactly as inoculate.mjs does before parsing and hashing */
export const normalise = text => text.split('\r\n').join('\n');

export function parseVaccine(file, text) {
  const t = normalise(text);
  const name = parseName(file);
  const meta = frontMatter(t);
  const sections = {};
  const missing = [];
  const heads = [];
  for (const s of SECTIONS) {
    const m = new RegExp(`^${s}\s*$`, 'm').exec(t);
    if (!m) missing.push(s); else heads.push({ s, at: m.index, end: m.index + m[0].length });
  }
  heads.sort((a, b) => a.at - b.at);
  heads.forEach((h, i) => { sections[h.s] = t.slice(h.end, i + 1 < heads.length ? heads[i + 1].at : t.length).trim(); });
  const code = t.match(/```js\n([\s\S]*?)\n```/)?.[1] || null;
  const problems = [];
  if (!meta) problems.push('missing front matter');
  else {
    if (name.ok && meta.vaccine !== name.slug) problems.push(`front matter vaccine "${meta.vaccine}" differs from the file slug`);
    if (name.ok && meta.generation !== name.ts) problems.push('front matter generation differs from the filename timestamp');
    if (!DOSES.includes(meta.dose)) problems.push(`dose "${meta.dose}" is not one of ${DOSES.join('|')}`);
  }
  for (const s of missing) problems.push(`missing section "${s}"`);
  if (!code) problems.push('no js antibody block');
  return { file, name, meta, sections, code, problems };
}

export const hex = buf => [...new Uint8Array(buf)].map(b => b.toString(16).padStart(2, '0')).join('');

/* Lock status of one file: the lock is written by inoculate.mjs over the
   LF-normalised text. Git holds these files LF (.gitattributes eol=lf), so the
   raw-bytes digest is expected to be the same number; both are reported. */
export function lockStatus(lock, file, rawHex, lfHex) {
  if (!lock || !(file in lock)) return { state: 'NOT IN LOCK', detail: 'vaccines.lock has no entry for this file name' };
  if (rawHex == null) return { state: 'NOT COMPUTED', detail: 'the digest could not be computed in this browser' };
  if (lock[file] === rawHex) return { state: 'LOCKED', detail: 'sha256 of the file bytes equals the lock entry' };
  if (lfHex && lock[file] === lfHex) return { state: 'LOCKED', detail: 'sha256 of the CRLF-normalised text equals the lock entry (the raw bytes differ only in line endings)' };
  return { state: 'HASH DIFFERS', detail: `lock holds ${lock[file].slice(0, 12)}…, the file bytes hash to ${rawHex.slice(0, 12)}…` };
}

/* Ring order: the 12-digit timestamp, the only order. Names that break the rule
   are not placed; they are counted and listed with the reason. */
export function orderRing(names) {
  const placed = [], broken = [], others = [];
  for (const n of names) {
    const p = parseName(n);
    if (p.ok) placed.push({ file: n, ts: p.ts, slug: p.slug });
    else if (/\.md$/.test(n) || /^\d+-/.test(n)) broken.push({ file: n, why: p.why });
    else others.push(n);
  }
  placed.sort((a, b) => (a.ts < b.ts ? -1 : a.ts > b.ts ? 1 : a.file < b.file ? -1 : 1));
  let dup = 0;
  for (let i = 1; i < placed.length; i++) if (placed[i].ts === placed[i - 1].ts) dup++;
  return { placed, broken, others, duplicateTimestamps: dup };
}

/* Edges, only when both ends exist and the front matter that names them was read. */
export function buildEdges(ring, parsed) {
  const idx = new Map(ring.map((v, i) => [v.slug, i]));
  const gen = [], dose = [], sup = [];
  const reasons = [];
  let prev = null;
  const lastOfDose = new Map();
  ring.forEach((v, i) => {
    const p = parsed.get(v.file);
    if (!p || !p.meta) return;
    if (p.meta.generation === v.ts) {
      if (prev != null) gen.push({ a: prev, b: i });
      prev = i;
    } else reasons.push(`${v.file}: generation "${p.meta.generation}" differs from its filename, so no generation edge`);
    if (DOSES.includes(p.meta.dose)) {
      if (lastOfDose.has(p.meta.dose)) dose.push({ a: lastOfDose.get(p.meta.dose), b: i, dose: p.meta.dose });
      lastOfDose.set(p.meta.dose, i);
    }
    if (p.meta.superseded_by) {
      if (idx.has(p.meta.superseded_by)) sup.push({ a: i, b: idx.get(p.meta.superseded_by) });
      else reasons.push(`${v.file}: superseded_by "${p.meta.superseded_by}" names no vaccine in the listing, so no edge`);
    }
  });
  return { gen, dose, sup, reasons };
}

/* Repositories named in prose, for "where does it lead" (name-match). */
export function reposNamed(text) {
  return [...new Set((String(text).match(/Ventusltd\/[A-Za-z0-9_.-]+/g) || []).map(s => s.replace(/[.]+$/, '')))];
}