In this section
- Read render · globalgrid2050 / testcode/202609160151/read.mjs lines 1–187
- Select render · globalgrid2050 / testcode/202609160151/select.mjs lines 1–271
Read
A JavaScript module in the testcode folder of GlobalGrid2050 that opens line store (`openLineStore`).
renderglobalgrid2050 / testcode/202609160151/read.mjs · lines 1–187 of 187 · version 2026-09-16 01:51 · pattern rowsIn (shared by 2 files)
- What it does
- Defines 7 functions or classes, including anchorFor, rowsIn, openLineStore, range, fromBlock. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Downstream impact
- Used directly by 6 files: Wafer Development Environment — Cable Cross Sections (globalgrid2050, https://globalgrid2050.com/testcode/wafer-development-environment/202609190330-cable-cross-sections/); Testcode — Quantum Twin Flights (globalgrid2050); Wafer Development Environment — Estate (globalgrid2050); Wafer Development Environment — Underground (globalgrid2050, https://globalgrid2050.com/testcode/wafer-development-environment/202609180205-underground/); and 2 more. Reached from 190 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — Compute Page (globalgrid2050, https://globalgrid2050.com/compute/).
- What it achieves
- It opens line store (`openLineStore`) and is built from the anchor for helper (`anchorFor`) and the rows in helper (`rowsIn`). Reading one numbered line, without holding the estate.
- Why it matters
- Imported by 6 files, including Wafer Development Environment — Cable Cross Sections, Testcode — Quantum Twin Flights and Wafer Development Environment — Estate, from Star Electron Star.
- Application
- globalgrid2050 · testcode/202609160151 · JavaScript module
- Uses
- none found
- Used by
- imported by Wafer Development Environment — Cable Cross Sections (import), imported by Testcode — Quantum Twin Flights (import), imported by Wafer Development Environment — Estate (import), imported by Wafer Development Environment — Underground (import), imported by Star Electron Star — App (import), imported by GlobalGrid2050 — Testcode (import), mentioned in Standalone (comment link)
- Produces
- PROBE_BYTES, PROBE_MAX, PROBE_CAP, FINAL_SPAN, BLOCK_CACHE, openLineStore
- Defines here
- anchorFor, rowsIn, openLineStore, range, fromBlock, windowAt, bySearch
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609160151/read.mjs:1-187 · blob 2601ebfde80e121baef3503a973dea5fa6f1d740 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
/* Reading one numbered line, without holding the estate.
*
* THE POINT. The wafer already knows where every line sits, because position is
* a pure function of the key. What it has never known is what a line SAYS. The
* old answer was to load a layer file — tens of thousands of features — to show
* one of them. This reads the one row, out of a 25 MB document, over HTTP Range.
*
* HOW. LINES.md is `number<TAB>code`, one row per key, sorted by key, and
* GitHub Pages serves it with Accept-Ranges: bytes. line-index.json records the
* byte offset of every 512th row (and cuts a block early at 64 KB, because a
* few rows hold an entire changelog). A key's block is one Range request of
* about 45 KB, and every other line in that block arrives with it: the lines
* you click next are the lines numbered near the one you clicked, so the block
* that answered the first click usually answers the next twenty.
*
* WHY IT DOES NOT ASK WHETHER THE INDEX IS FRESH. LINES.md is regenerated as
* the estate grows, so an offset is a guess about a document that may have
* moved. The first version tried to settle that in advance with a HEAD request,
* comparing ETag and Content-Length, and it was wrong twice over: a browser
* cannot read ETag across origins at all (it is not a CORS-safelisted response
* header, and nothing here can add Access-Control-Expose-Headers to GitHub
* Pages), and Content-Length over a compressed response is the COMPRESSED size
* — 6,788,562 against the 25,238,570 the index recorded. So the check failed
* every time in the browser and sent every read down the slow path.
*
* The check was also unnecessary, because a read can verify itself. The block
* is fetched, and either it contains a row beginning `key<TAB>` or it does not.
* If it does, the offsets were right about this key and the answer is proven.
* If it does not, the document has moved and the row is found by searching.
* Nothing is ever shown that was not read from a row carrying the key asked
* for, so a stale index costs speed and can never produce another line's code.
*/
const DEC = new TextDecoder();
/* ── the index ───────────────────────────────────────────────────────────── */
/* The greatest anchor at or before `key`. Anchors are ascending, so this is the
ordinary binary search, and -1 means the key is below the first row. */
function anchorFor(keys, key) {
let lo = 0, hi = keys.length - 1, ans = -1;
while (lo <= hi) {
const mid = (lo + hi) >> 1;
if (keys[mid] <= key) { ans = mid; lo = mid + 1; } else hi = mid - 1;
}
return ans;
}
/* Every `number<TAB>code` row in a slice of the document, as a Map. A slice
fetched by byte offset can begin or end mid-row; a partial first row is
dropped when `fromRowStart` is false, and the last row is dropped whenever
the slice did not end on a row end, because a truncated line cannot be told
from a complete one and showing it would be a lie. */
function rowsIn(bytes, fromRowStart, endsAtRowEnd) {
const lines = DEC.decode(bytes).split('\n');
if (!fromRowStart) lines.shift();
if (!endsAtRowEnd) lines.pop();
const out = new Map();
for (const row of lines) {
const t = row.indexOf('\t');
if (t <= 0) continue;
const n = Number(row.slice(0, t));
if (!Number.isInteger(n) || n <= 0) continue;
if (!out.has(n)) out.set(n, row.slice(t + 1));
}
return out;
}
/* ── the store ───────────────────────────────────────────────────────────── */
export const PROBE_BYTES = 4096; /* the first window of a search step */
export const PROBE_MAX = 1 << 20; /* a window stops growing here */
export const PROBE_CAP = 24; /* refuse rather than walk a document for ever */
export const FINAL_SPAN = 8 * PROBE_BYTES; /* when the bracket is this small, read it whole */
export const BLOCK_CACHE = 24; /* blocks held; about 1 MB at the usual size */
export async function openLineStore({ indexUrl, fetchImpl = fetch, onStatus = () => {} } = {}) {
const ir = await fetchImpl(indexUrl, { cache: 'default' });
if (!ir.ok) throw new Error(indexUrl + ' returned HTTP ' + ir.status);
const index = await ir.json();
const SRC = index.source.url;
const blocks = new Map(); /* anchor index -> Map(key -> text) */
const stats = { requests: 0, bytes: 0, blockHits: 0, searched: 0, probes: 0 };
let drifted = false; /* set once a block is found not to hold its key */
/* The document's real size, learned from the first Content-Range. A drifted
index cannot be trusted for it: offsets shifted down by 90,000 bytes put
the last row beyond what the index believes the end to be, and the search
could then never reach the final keys. Content-Range reports the total of
the UNCOMPRESSED representation, which is what byte offsets address, and
it is readable across origins where ETag is not. */
let docEnd = 0;
const range = async (from, to) => {
stats.requests++;
const r = await fetchImpl(SRC, { headers: { Range: `bytes=${from}-${to}` }, cache: 'default' });
if (r.status !== 206 && r.status !== 200) throw new Error('Range on LINES.md returned HTTP ' + r.status);
const cr = r.headers.get('content-range');
const total = cr && Number(cr.split('/')[1]);
if (Number.isFinite(total) && total > docEnd) docEnd = total;
const b = new Uint8Array(await r.arrayBuffer());
stats.bytes += b.length;
if (!docEnd && r.status === 200) docEnd = b.length;
/* A 200 means the server ignored the Range and sent the whole document;
then the slice asked for is a window into what arrived. */
return r.status === 200 ? b.subarray(from, to + 1) : b;
};
/* The fast path, and the one that proves itself: the block between two
anchors. Either it holds a row for this key or the offsets have drifted. */
async function fromBlock(key) {
const a = anchorFor(index.keys, key);
if (a < 0) return null;
if (!blocks.has(a)) {
const rows = rowsIn(await range(index.offs[a], index.offs[a + 1] - 1), true, true);
blocks.set(a, rows);
if (blocks.size > BLOCK_CACHE) blocks.delete(blocks.keys().next().value);
} else stats.blockHits++;
return blocks.get(a).get(key) ?? null;
}
/* One window of the search, grown until it holds at least one COMPLETE row.
Growing matters: a few rows in this document are over 100 KB on their own,
and the first version treated an empty window as "the key is further on"
and stepped past the very row it was looking for. */
async function windowAt(at, hi) {
let size = PROBE_BYTES;
for (;;) {
const end = Math.min(hi, at + size);
stats.probes++;
const rows = rowsIn(await range(at, end), false, end === hi);
if (rows.size || end >= hi || size >= PROBE_MAX) return { rows, end };
size *= 4;
}
}
/* The honest path: bracket the key between two byte offsets, then read the
bracket. Every step keeps the invariant that the row, if it exists, lies in
[lo, hi]; nothing is ever stepped over. */
async function bySearch(key) {
stats.searched++;
let lo = index.offs[0], hi = Math.max(docEnd || 0, index.offs[index.offs.length - 1]);
/* Start from the anchors: even a drifted index is usually drifted a little,
so this is a far better bracket than the whole document. */
const a = anchorFor(index.keys, key);
if (a >= 0) {
const pad = Math.max(PROBE_MAX, (index.offs[a + 1] - index.offs[a]) * 4);
lo = Math.max(lo, index.offs[a] - pad);
hi = Math.min(hi, Math.max(index.offs[a + 1] + pad, (index.offs[a + 1] >= index.offs[index.offs.length - 1] - 1) ? hi : 0));
}
for (let p = 0; p < PROBE_CAP && hi - lo > FINAL_SPAN; p++) {
const mid = (lo + hi) >> 1;
const { rows, end } = await windowAt(mid, hi);
if (rows.has(key)) return rows.get(key);
if (!rows.size) { hi = mid; continue; } /* nothing readable above: look below */
const seen = [...rows.keys()];
if (seen[seen.length - 1] < key) lo = end; else hi = mid;
}
const rows = rowsIn(await range(lo, hi), lo === index.offs[0], true);
stats.probes++;
return rows.get(key) ?? null;
}
const store = {
index,
get drifted() { return drifted; },
stats: () => ({ ...stats, blocksHeld: blocks.size }),
/* The text of one numbered line, or a stated reason there is none. */
async get(key) {
if (!Number.isInteger(key) || key < index.min || key > index.max)
return { key, text: null, why: `outside the numbered range ${index.min}–${index.max}` };
try {
let text = await fromBlock(key);
if (text === null) {
if (!drifted) { drifted = true; onStatus({ drifted: true, why: 'LINES.md has moved since the index was built, so rows are found by search' }); }
text = await bySearch(key);
}
if (text === null) return { key, text: null, why: 'no row for this number in LINES.md' };
return { key, text, why: '' };
} catch (e) {
return { key, text: null, why: 'could not be read: ' + (e.message || e) };
}
}
};
onStatus({ drifted: false, why: `${index.anchors} anchors over ${index.rows.toLocaleString()} rows` });
return store;
}Select
A JavaScript module in the testcode folder of GlobalGrid2050 that reads URL (`readURL`), writes URL (`writeURL`), draws set (`drawSet`) and reads inputs for setname, using SHA-256.
renderglobalgrid2050 / testcode/202609160151/select.mjs · lines 1–271 of 271 · version 2026-09-16 01:51 · Not reached from any entry point (candidate for review) · pattern shareURL (shared by 2 files)
- What it does
- It draws its content. Defines 15 functions or classes, including $, readURL, writeURL, shareURL, canonical. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: form fields (user input).
- What it achieves
- It reads URL (`readURL`), writes URL (`writeURL`) and sets id (`setId`). Until now the wafer could be looked at and, since, read. It responds to input and click events.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · testcode/202609160151 · JavaScript module
- Uses
- Galaxies Wafers — Lib (import), ./notation.mjs
- Used by
- none found
- Produces
- SET, readURL, writeURL, shareURL, canonical, setId, has, toggle, clear, drawSet, mountCard, render
- Defines here
- $, readURL, writeURL, shareURL, canonical, setId, has, toggle, clear, drawSet, mountCard, paintNote, paintId, setText, render
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609160151/select.mjs:1-271 · blob 2b841eeb6a8d51d18759809b456f1de61dd55a19 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: unreached_review
/* THE FIRST VERB.
*
* Until now the wafer could be looked at and, since 202609160207, read. Both are
* things you do TO it. This is the first thing you can do WITH it.
*
* WHY SELECTING AND NAMING IS NOT A SMALL FEATURE. A function family in this
* estate is, in the numbered database's own terms, exactly this:
*
* { name, kind, lines[] }
*
* A name, and a set of permanent line keys. Nothing else. So gathering some
* lines and giving them a name is not a note stuck on top of the code — it is
* the same shape as the thing the estate already calls a function. Someone who
* cannot write a line of JavaScript can still say THESE LINES, TOGETHER, ARE A
* THING, AND IT IS CALLED THIS. That sentence is the whole of the mission: an
* idea expressed by a person who cannot code, in a form a machine already
* understands, because the keys are the machine's own vocabulary.
*
* WHY THE URL IS THE DOCUMENT. A set is written into the address bar and nowhere
* else — ?name=...&set=k,k,k. There is no account, no database, no save button
* and nothing stored in this browser. That is not a simplification, it is the
* point: the address IS the artefact, so it can be pasted to a person, pasted to
* an AI, put in a commit message or read back a year later, and it will resolve
* to the same lines, because a key is permanent and its position is a pure
* function of itself. A human clicks pixels; a model writes numbers; the URL
* they produce is identical. That is what "the UI and the code as the same
* language" has to mean if it means anything.
*
* WHAT IS DELIBERATELY NOT CLAIMED. A named set is NOT a function family. It has
* not been observed in any repository, nothing checked that these lines sit
* together in any file, and the estate has not issued it a number. It is a
* proposal made by whoever made it. The card says so, because a set that looked
* like a family would be a lie of exactly the kind this codebase keeps catching:
* a claim that describes only what it looked at.
*/
import { fmt, esc, place } from './lib.mjs';
import { format as asLine } from './notation.mjs';
const MAX_SET = 200; /* a set beyond this is not a thought, it is a file */
export const SET = { name: '', keys: [] };
const $ = id => document.getElementById(id);
/* ── the URL is the document ─────────────────────────────────────────────── */
/* Keys are written in the order they were gathered, because order is the one
thing about a set its maker chose. It is never sorted behind their back. */
export function readURL() {
const p = new URLSearchParams(location.search);
const raw = p.get('set');
if (!raw) return false;
const keys = [];
for (const part of raw.split(',')) {
const n = Number(part.trim());
if (Number.isInteger(n) && n > 0 && !keys.includes(n)) keys.push(n);
if (keys.length >= MAX_SET) break;
}
SET.keys = keys;
SET.name = (p.get('name') || '').slice(0, 80);
return keys.length > 0;
}
export function writeURL() {
const p = new URLSearchParams(location.search);
if (SET.keys.length) { p.set('set', SET.keys.join(',')); if (SET.name) p.set('name', SET.name); else p.delete('name'); }
else { p.delete('set'); p.delete('name'); }
const q = p.toString();
history.replaceState(null, '', q ? location.pathname + '?' + q : location.pathname);
}
export const shareURL = () => location.href;
/* ── the set ─────────────────────────────────────────────────────────────── */
/* ── identity is the keys, never the name ────────────────────────────────────
*
* WHY THIS MATTERS MORE THAN THE NAME DOES. In pack 202609142202 (generated
* 2026-09-14T22:44:05.716Z) the estate holds 10,985 function families under only
* 5,550 distinct names: 962 names are used by more than one family, and 6,397
* families — 58.2% — share a name with another. `(anonymous)` names 2,252 of
* them, `main` 440. A name in this estate is the weakest identifier there is.
*
* The routing layer was wrecked by exactly that tonight. Family 1318 appeared to
* be the top hub with 369 callers; it is a function inside an inline <script> in
* an HTML file, and 218 of those callers are in other repositories and therefore
* impossible. It was never a hub — it was the name `state` being treated as an
* identity when it was only a label.
*
* This surface hands a text box to people who cannot code and invites them to
* name things. If the name were the identity, that defect would be planted at
* the exact point where non-coders enter. So it is not:
*
* identity = SHA-256 of the keys, sorted ascending, joined with commas
* name = a label for humans, freely changeable, never an identifier
*
* It is the estate's own principle one level up. The wafer never stores a
* position, it derives it from the key, because a derived thing cannot drift
* from what it describes. An identity derived from the keys cannot drift from
* the lines it names.
*
* WHAT IT BUYS, and the last one is the whole point:
* - two sets with one name and different keys are different things; two sets
* with the same keys under different names are one thing, twice labelled
* - duplicate proposals collapse without anyone policing names
* - renaming is free and breaks nothing, so a bad name can be fixed later
* - A PERSON WHO CLICKS FIVE POINTS AND A MODEL THAT WRITES FIVE NUMBERS
* PRODUCE THE SAME ID. Agreement between a human and an AI stops being a
* thing we assert and becomes a thing the surface can detect.
*
* The id is checkable away from this page, which is why it is a plain SHA-256 of
* an obvious string rather than anything clever:
*
* printf '1416,192067,192068' | sha256sum
*
* DELIBERATELY NOT: this does not promote a set into the family namespace. A set
* whose keys collide with a real family's is an interesting event, not an
* authority. The card's refusal stands unchanged.
*/
export const canonical = keys => [...keys].sort((a, b) => a - b).join(',');
export async function setId(keys) {
const s = canonical(keys);
if (!s) return '';
if (!globalThis.crypto?.subtle) return ''; /* no secure context: say nothing rather than guess */
const buf = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(s));
return [...new Uint8Array(buf)].map(b => b.toString(16).padStart(2, '0')).join('').slice(0, 12);
}
export function has(key) { return SET.keys.includes(key); }
export function toggle(key) {
const i = SET.keys.indexOf(key);
if (i >= 0) SET.keys.splice(i, 1);
else if (SET.keys.length < MAX_SET) SET.keys.push(key);
else return false;
writeURL();
return true;
}
export function clear() { SET.keys = []; SET.name = ''; writeURL(); }
/* ── drawing the set on the wafer ────────────────────────────────────────────
A selected line is ringed where it sits. Positions come from the placement
law, not from anything stored, so a set pasted from a URL lights up in the
right places before a single byte of its text has been fetched. */
export function drawSet(ctx, view) {
if (!SET.keys.length) return;
const z = view.zoom, ox = view.w / 2 - view.x * z, oy = view.h / 2 + view.y * z;
ctx.save();
ctx.lineWidth = 1.4;
ctx.strokeStyle = '#ffd166';
ctx.fillStyle = 'rgba(255,209,102,0.14)';
ctx.font = '10px ui-monospace, Menlo, Consolas, monospace';
ctx.textAlign = 'center';
for (let i = 0; i < SET.keys.length; i++) {
const [wx, wy] = place(SET.keys[i]);
const x = wx * z + ox, y = oy - wy * z;
if (x < -30 || y < -30 || x > view.w + 30 || y > view.h + 30) continue;
ctx.beginPath(); ctx.arc(x, y, 8, 0, 6.2832); ctx.fill(); ctx.stroke();
ctx.fillStyle = '#ffd166';
ctx.fillText(String(i + 1), x, y - 11);
ctx.fillStyle = 'rgba(255,209,102,0.14)';
}
ctx.restore();
}
/* ── the card ────────────────────────────────────────────────────────────── */
export function mountCard() {
const el = document.createElement('section');
el.id = 'setcard';
el.hidden = true;
el.innerHTML =
`<div class="sethead">
<input id="setname" type="text" placeholder="name this set…" maxlength="80" aria-label="a name for this set of lines">
<button id="setclear" type="button" title="empty the set">clear</button>
</div>
<div class="setidrow"><span id="setid" class="dim"></span>
</div>
<div id="setlines"></div>
<div class="setfoot">
<button id="setcopy" type="button">copy the link to this set</button>
<button id="setline" type="button">copy as a line the estate can read</button>
<p id="setnote" class="dim"></p>
</div>`;
document.body.appendChild(el);
$('setname').addEventListener('input', e => { SET.name = e.target.value.slice(0, 80); writeURL(); paintNote(); });
$('setclear').addEventListener('click', () => { clear(); render(); });
$('setcopy').addEventListener('click', async () => {
const btn = $('setcopy');
try { await navigator.clipboard.writeText(shareURL()); btn.textContent = 'link copied — paste it to a person or a model'; }
catch { btn.textContent = 'copy failed — the link is in the address bar'; }
setTimeout(() => { btn.textContent = 'copy the link to this set'; }, 2600);
});
/* THE WRITTEN FORM. A URL needs a browser; this line does not. A person pastes
it into a commit message or an issue, a model emits it with no page open,
and both produce the same string because the id is derived from the members.
git is then the intake: the estate already receives text with an author, a
timestamp and a diff. See notation.mjs. */
$('setline').addEventListener('click', async () => {
const btn = $('setline');
try {
const line = await asLine({ label: SET.name, keys: SET.keys });
await navigator.clipboard.writeText(line);
btn.textContent = 'line copied — paste it anywhere, it verifies itself';
} catch (e) { btn.textContent = 'could not copy: ' + (e.message || e); }
setTimeout(() => { btn.textContent = 'copy as a line the estate can read'; }, 3200);
});
return el;
}
function paintNote() {
const n = SET.keys.length;
setText($('setnote'),
!n ? '' :
`${fmt(n)} line${n === 1 ? '' : 's'}${SET.name ? ` labelled “${SET.name}”` : ', unlabelled'}. ` +
`This set is a proposal, not a function family: nothing has checked that these lines sit together in any file, ` +
`and the estate has issued it no number. It lives only in the address bar — no account, nothing stored here.`);
paintId();
}
/* The identity, shown next to the name so it is obvious which of the two is
which: the name is editable and the id is not, because the id is not a
property of the set, it IS the set. */
async function paintId() {
const el = $('setid');
if (!el) return;
if (!SET.keys.length) { el.textContent = ''; el.removeAttribute('title'); return; }
const id = await setId(SET.keys);
if (!id) { el.textContent = 'id unavailable here'; return; }
el.textContent = 'id ' + id;
el.title = `SHA-256 of the keys sorted ascending — the name is a label, this is the identity.\n` +
`Reproduce it anywhere:\n printf '${canonical(SET.keys)}' | sha256sum\n` +
`Anyone who selects these same lines, person or model, gets this same id.`;
}
const setText = (el, t) => { if (el && el.textContent !== t) el.textContent = t; };
/* The set, with each line's code read one at a time. `getText` is the wafer's
reader, passed in so this file fetches nothing itself. */
export async function render(getText) {
const card = $('setcard');
if (!card) return;
card.hidden = SET.keys.length === 0;
if (!SET.keys.length) { $('setlines').replaceChildren(); paintNote(); return; }
if ($('setname').value !== SET.name) $('setname').value = SET.name;
paintNote();
const host = $('setlines');
host.innerHTML = '<ol class="setlist">' + SET.keys.map((k, i) =>
`<li data-key="${k}"><span class="setn">${i + 1}</span>` +
`<button type="button" class="setgo" data-key="${k}"><span class="n">${fmt(k)}</span>` +
`<code data-code="${k}">reading…</code></button>` +
`<button type="button" class="setdrop" data-key="${k}" aria-label="remove line ${k} from the set">×</button></li>`
).join('') + '</ol>';
if (!getText) return;
for (const k of SET.keys.slice()) {
const cell = host.querySelector(`code[data-code="${k}"]`);
if (!cell) continue;
const got = await getText(k);
if (!cell.isConnected) continue;
if (got.text === null) { cell.className = 'refuse'; cell.textContent = got.why; }
else cell.textContent = got.text === '' ? '(an empty line)' : got.text;
}
}