{ "job_id": 726, "files": { "31-regions.log": "== 1. budgets -> regions (right orientation; left swaps a, b) ==\n right zero (1+a)/2 : 1*delta + 0*nu < 19/25\n right cross a/2+3b/2 : 1/3*delta + 1*nu < 161/300\n right period a : 1*delta + 0*nu < 19/25\n left zero (1+a)/2 : 0*delta + 1*nu < 19/20\n left cross a/2+3b/2 : 1*delta + 1/3*nu < 41/100\n left period a : 0*delta + 1*nu < 19/20\n note (15): delta < 19/25, delta + 3 nu < 161/100; left: 3 delta + nu < 123/100 (and nu < 19/20)\n== 2. left region inside the old region 5 delta + 2 nu < 123/50 ==\n max of 5 delta + 2 nu on closure(left region) cap box = 111/50 at ['(6/25, 51/100)']; < 123/50: True\n note's bound 246/100 - delta <= 222/100 uses delta >= 6/25: max 2(3d+n)-d on box = 111/50\n== 3. uniform product threshold of the strict union ==\n P1 (delta >= 19/25): min delta+nu = 81/100 on ['(19/25, 1/20)']; area 0\n P2 (delta + 3nu >= 161/100): min delta+nu = 19/25 on ['(47/150, 67/150)', '(67/200, 17/40)']; area 35347/120000\n witness (8/25, 11/25): delta+nu = 19/25, 5d+2n = 62/25, d+3n = 41/25, in closure(P2) as a point of the argmin segment: True\n== 4. the concrete cuts (19): what they leave in E_dagger ==\n Q1 (d > x^151/200): min delta+nu = 161/200 on ['(151/200, 1/20)']\n Q2 (de^3 > x^321/200): min delta+nu = 3/4 on ['(19/60, 13/30)', '(129/400, 171/400)']\n area: box 117/250, W_dagger(three cuts) 142537/480000 = 0.296952, strict-uncovered 35347/120000 = 0.294558, controlled but retained by the margins 383/160000 = 0.002394\n strip below the product threshold kept in E_dagger: 3/4 <= d+n <= 19/25, 5d+2n >= 49/20, d+3n >= 321/200: vertices ['(31/100, 9/20)', '(19/60, 13/30)', '(129/400, 171/400)', '(27/80, 169/400)'], area 1/6000\n fourth W_dagger condition (d > x^141/200 or de^3 > x^1631/1000 or de <= x^77/100) holds on all of it: max d+n = 19/25 <= 77/100\n sample (8/25, 87/200): d+n = 151/200, budgets right = ['39/50', '403/400', '14/25'], 5d+2n = 247/100, d+3n = 13/8\n== 5. slack of each cut and the controlled point nearest to failure ==\n cut C: max right zero budget = 399/400 (slack 1/400) at ['(151/200, 1/20)', '(151/200, 17/60)']\n cut C: max right cross budget = 399/400 (slack 1/400) at ['(151/200, 17/60)', '(6/25, 91/200)']\n cut C: max right period budget = 199/200 (slack 1/200) at ['(151/200, 1/20)', '(151/200, 17/60)']\n exponent slack: A 1/100 in delta+nu; B 1/100 in 5delta+2nu; kappa 1/200; lambda 1/200\n corner of C (151/200, 17/60): budgets ['399/400', '399/400', '199/200']; outside cut A: True; outside cut B: True\n== 6. named points in the notes ==\n benchmark (2/5, 2/5): right ['41/50', '199/200', '16/25'], left ['29/40', '237/200', '9/20'], strict regions (False, False, True), cut sets (False, False, True)\n section 6 (8/25, 9/20): right ['39/50', '103/100', '14/25'], left ['3/4', '109/100', '1/2'], strict regions (False, False, False), cut sets (False, False, False)\n witness (8/25, 11/25): right ['39/50', '203/200', '14/25'], left ['149/200', '217/200', '49/100'], strict regions (False, False, False), cut sets (False, False, False)\n vertical control (19/25, 1/20): right ['1', '13/20', '1'], left ['11/20', '31/20', '1/10'], strict regions (False, False, False), cut sets (False, False, False)\n 397/400 = 103/100 - 3/80: True; deficit 3/2 - 36/25 = 3/50; 36/25 = 2 - 14/25: True; A ~ x^(14/25 + 1/2 - 1) = x^3/50\n TWIN-REDUCTION section 4, p = 19/25 - delta: right zero = 1 - p/2 and period = 1 - p: True\n== 7. the validator's coverage grid, recomputed ==\n grid points 117711, points added 14752, budget/region disagreements 0 (validator prints 117711 and 14752)\n", "173-regions.log": "== 1. budgets -> regions (right orientation; left swaps a, b) ==\n note (15): delta < 19/25, delta + 3 nu < 161/100; left: 3 delta + nu < 123/100 (and nu < 19/20)\n== 2. left region inside the old region 5 delta + 2 nu < 123/50 ==\n max of 5 delta + 2 nu on closure(left region) cap box = 111/50 at ['(6/25, 51/100)']; < 123/50: True\n note's bound 246/100 - delta <= 222/100 uses delta >= 6/25: max 2(3d+n)-d on box = 111/50\n== 3. uniform product threshold of the strict union ==\n P1 (delta >= 19/25): min delta+nu = 81/100 on ['(19/25, 1/20)']; area 0\n P2 (delta + 3nu >= 161/100): min delta+nu = 19/25 on ['(47/150, 67/150)', '(67/200, 17/40)']; area 35347/120000\n witness (8/25, 11/25): delta+nu = 19/25, 5d+2n = 62/25, d+3n = 41/25, in closure(P2) as a point of the argmin segment: True\n== 4. the concrete cuts (19): what they leave in E_dagger ==\n Q1 (d > x^151/200): min delta+nu = 161/200 on ['(151/200, 1/20)']\n Q2 (de^3 > x^321/200): min delta+nu = 3/4 on ['(19/60, 13/30)', '(129/400, 171/400)']\n area: box 117/250, W_dagger(three cuts) 142537/480000 = 0.296952, strict-uncovered 35347/120000 = 0.294558, controlled but retained by the margins 383/160000 = 0.002394\n strip below the product threshold kept in E_dagger: 3/4 <= d+n <= 19/25, 5d+2n >= 49/20, d+3n >= 321/200: vertices ['(31/100, 9/20)', '(19/60, 13/30)', '(129/400, 171/400)', '(27/80, 169/400)'], area 1/6000\n fourth W_dagger condition (d > x^141/200 or de^3 > x^1631/1000 or de <= x^77/100) holds on all of it: max d+n = 19/25 <= 77/100\n sample (8/25, 87/200): d+n = 151/200, budgets right = ['39/50', '403/400', '14/25'], 5d+2n = 247/100, d+3n = 13/8\n== 5. slack of each cut and the controlled point nearest to failure ==\n cut C: max right zero budget = 399/400 (slack 1/400) at ['(151/200, 1/20)', '(151/200, 17/60)']\n cut C: max right cross budget = 399/400 (slack 1/400) at ['(151/200, 17/60)', '(6/25, 91/200)']\n cut C: max right period budget = 199/200 (slack 1/200) at ['(151/200, 1/20)', '(151/200, 17/60)']\n exponent slack: A 1/100 in delta+nu; B 1/100 in 5delta+2nu; kappa 1/200; lambda 1/200\n corner of C (151/200, 17/60): budgets ['399/400', '399/400', '199/200']; outside cut A: True; outside cut B: True\n== 6. named points in the notes ==\n benchmark (2/5, 2/5): right ['41/50', '199/200', '16/25'], left ['29/40', '237/200', '9/20'], strict regions (False, False, True), cut sets (False, False, True)\n section 6 (8/25, 9/20): right ['39/50', '103/100', '14/25'], left ['3/4', '109/100', '1/2'], strict regions (False, False, False), cut sets (False, False, False)\n witness (8/25, 11/25): right ['39/50', '203/200', '14/25'], left ['149/200', '217/200', '49/100'], strict regions (False, False, False), cut sets (False, False, False)\n vertical control (19/25, 1/20): right ['1', '13/20', '1'], left ['11/20', '31/20', '1/10'], strict regions (False, False, False), cut sets (False, False, False)\n 397/400 = 103/100 - 3/80: True; deficit 3/2 - 36/25 = 3/50; 36/25 = 2 - 14/25: True; A ~ x^(14/25 + 1/2 - 1) = x^3/50\n TWIN-REDUCTION section 4, p = 19/25 - delta: right zero = 1 - p/2 and period = 1 - p: True\n== 7. the validator's coverage grid, recomputed ==\n grid points 117711, points added 14752, budget/region disagreements 0 (validator prints 117711 and 14752)\n", "173-regions.stderr.txt": " right zero (1+a)/2 : 1*delta + 0*nu < 19/25\n right cross a/2+3b/2 : 1/3*delta + 1*nu < 161/300\n right period a : 1*delta + 0*nu < 19/25\n left zero (1+a)/2 : 0*delta + 1*nu < 19/20\n left cross a/2+3b/2 : 1*delta + 1/3*nu < 41/100\n left period a : 0*delta + 1*nu < 19/20\n", "research/qc/tailfmt.js": "'use strict';\n// ============================================================================\n// QC / TAILFMT \u2014 the one definition of what a script's tail IS\n// ============================================================================\n// Shared by `qc/embed.js` (writes tails), `qc/tails.js` (re-runs and compares)\n// and `qc/checks.js` (the static checks). One parser, so the writer and the\n// checker cannot drift apart \u2014 which is the same class of defect this whole\n// framework exists to catch, and it would be embarrassing to build it in here.\n//\n// THE FORMAT, and the reason it has a fingerprint.\n//\n// // ==========================================================================\n// // OUTPUT \u2014 EMBEDDED, do not hand-edit. Regenerate:\n// // node research/qc/embed.js research/.js\n// // invocation: node research/.js\n// // code-sha256: \n// // out-sha256: \n// // node: v22.3.0\n// // embedded: 2026-08-18\n// // elapsed: 1.4 s\n// // ==========================================================================\n// // \n// // ==========================================================================\n// // READINGS\n// // \n//\n// `code-sha256` is what makes the tail non-transferable. It binds the pasted\n// output to the exact bytes of the code above it, so editing the code without\n// re-embedding is caught by reading the file, with nothing executed and no\n// judgement involved. On 2026-08-18 that check alone found\n// `05-twin-jacobsthal.js` carrying a p = 29 row that the committed code stops\n// short of producing: right numbers, broken provenance, invisible to every\n// other instrument here.\n//\n// `out-sha256` is checked by re-running (`qc/tails.js`), which is slow and\n// lives outside the fast gate.\n//\n// NORMALISATION. A run is not byte-reproducible: elapsed times, dates and\n// memory figures move. Both the writer and the checker hash the SAME\n// normalised text, and the substitutions are listed here rather than tuned in\n// two places. Anything not on this list must reproduce exactly.\n// ============================================================================\n\nconst crypto = require('crypto');\n\nconst BANNER = /^\\s*\\/\\/\\s*={10,}\\s*$/;\n// OUT_HEAD is TIGHT on purpose (2026-08-20). The loose form `OUTPUT\\b` let any\n// prose comment beginning with the word OUTPUT capture the banner: commit\n// 391bd7a appended `// OUTPUT, which is a cross-check \u2026` to a provenance note\n// below READINGS and silently UNBOUND research/a3-08-adjacent-pairs.js \u2014 the\n// fingerprint evaporated, `embeds` stopped checking the file, and a re-embed in\n// that state was demonstrated writing a second header and destroying the note\n// (verify-the-verifier-embeds.md \u00a73.4). A banner must own its line: bare\n// OUTPUT, or OUTPUT followed by a dash, an em-dash, or an open paren (the\n// legacy dated form \"OUTPUT (run of 2026-08-13)\"). Prose shapes \u2014 \"OUTPUT\n// block\", \"OUTPUT, which\", \"OUTPUT reads\" \u2014 no longer match. Every banner in\n// the corpus was surveyed before tightening: zero real banners move.\nconst OUT_HEAD = /^\\s*\\/\\/\\s*OUTPUT\\s*(?:$|[\u2014\\-(])/;\nconst READ_HEAD = /^\\s*\\/\\/\\s*READINGS\\b/;\n\n// The volatile things, and nothing else.\nconst VOLATILE = [\n [/\\[\\s*\\d+(?:\\.\\d+)?\\s*m?s\\s*\\]/g, '[TIME]'], // [53.4s], [812 ms]\n [/\\b\\d+(?:\\.\\d+)?\\s*(?:ms|s|sec|secs|seconds)\\b/g, 'TIME'],\n // key-form timings, unit BEFORE the number (\"secs\":70.2 in a JSON line) \u2014\n // the shape that made two 2026-08-19 embeds permanently fail --check\n [/(\"(?:secs|sec|ms|elapsed|seconds|time)\"\\s*:\\s*)\\d+(?:\\.\\d+)?/g, '$1TIME'],\n // Longer wall-clock units, added 2026-08-20. Until then `min`, `h`, `hours`\n // and `days` were not scrubbed at all, which is why six tails whose printed\n // figure IS a wall clock could never go green under `embed.js --check` on any\n // machine but the one that wrote them.\n //\n // The rule is deliberately narrow, and the narrowness is the whole point: in\n // this corpus `min` is very often the MINIMUM and `h` is very often a\n // mathematical variable. A blunt `\\d+\\s*(min|h|days)` scrubs\n // `W / (2 min(j, W-j))` in level-ledger-tight, `Theta*(e)^2 h(e-h)` in\n // lemmaV-parseval and `e(-2 h dbar1/d2)` in attack-theta-margin, which would\n // make --check blind to a real change in a printed formula: a far worse\n // defect than the one being fixed. So: EXACTLY one space (a table column is\n // aligned with several, `6 min` in attack-foldL-01 is a minimum), and the\n // unit must not be followed by a letter or an opening paren (`2 h dbar1`,\n // `2 min(j`). Verified against every tail in research/: it matches 11 tails\n // and every hit in them is a wall clock.\n //\n // 2026-08-20, the lookahead miss: `24.9 min wall` IS a wall clock and the\n // bare letter-lookahead read `wall` as a variable and refused to scrub it.\n // The word `wall` after a time unit only ever means the clock, so it is the\n // one word the lookahead lets through.\n [/\\b\\d+(?:\\.\\d+)?[ ](?:min|mins|minutes|h|hr|hrs|hours|day|days)\\b(?![ \\t]*(?!wall\\b)[A-Za-z(])/g, 'TIME'],\n [/\\b\\d{4}-\\d{2}-\\d{2}(?:T[\\d:.]+Z?)?/g, 'DATE'],\n [/\\bv\\d+\\.\\d+\\.\\d+\\b/g, 'VERSION'],\n [/\\b\\d+(?:\\.\\d+)?\\s*(?:MB|GB|KB)\\b/gi, 'MEM'],\n];\n\n// Q6, settled by Chris 2026-08-20 (CHANGELOG \"WIDEN the volatile list,\n// timing-only\"): a BARE number under a table column literally headed `secs` is\n// a wall clock with no unit beside it, and no per-line regex can know that.\n// Two producers print such a column (two-class-lower-bounds.js's ladder,\n// import-stein-02-strikes.js \u00a7C3) and their tails could never re-verify green\n// on any machine but the one that wrote them. TIMING-ONLY is enforced by\n// scope: the column must be the LAST header token, literally `secs`, and the\n// scrub runs only over the contiguous rows that follow \u2014 the first line that\n// does not end in a bare number ends the scope, so a later data table in the\n// same block is never touched.\nfunction scrubSecsColumns(t) {\n const ls = t.split('\\n');\n let scope = false;\n for (let i = 0; i < ls.length; i++) {\n const l = ls[i].replace(/\\s+$/, '');\n if (/[ \\t]secs$/.test(l)) { scope = true; continue; }\n if (!scope) continue;\n if (!l.trim()) { scope = false; continue; }\n const r = ls[i].replace(/([ \\t])-?\\d+(?:\\.\\d+)?(\\s*)$/, '$1TIME$2');\n if (r !== ls[i]) ls[i] = r; else scope = false;\n }\n return ls.join('\\n');\n}\n\nfunction normalize(text) {\n let t = scrubSecsColumns(String(text).replace(/\\r\\n/g, '\\n'));\n for (const [re, to] of VOLATILE) t = t.replace(re, to);\n return t.split('\\n').map(l => l.replace(/\\s+$/, '')).join('\\n').replace(/\\n+$/, '') + '\\n';\n}\n\nconst sha = (s) => crypto.createHash('sha256').update(s, 'utf8').digest('hex');\n\n// ---------------------------------------------------------------------------\n// Where the tail sits. Returns line indices, or null when there is no tail.\n// head : [0, outBannerStart) the code, what code-sha256 covers\n// output : [outBodyStart, outEnd) the pasted run\n// readings: [readStart, end) prose, unverifiable by machine\n// ---------------------------------------------------------------------------\nfunction locate(src) {\n const lines = src.split('\\n');\n let outHead = -1;\n for (let i = lines.length - 1; i >= 0; i--) if (OUT_HEAD.test(lines[i])) { outHead = i; break; }\n if (outHead === -1) return null;\n return locateAt(lines, outHead, lines.length);\n}\n\n// MULTI-TAIL SUPPORT (2026-08-20). Three declared composites \u2014 cap-33's three\n// RUN blocks, cap-34's six stages, cap-37's three logs \u2014 were structurally\n// unbindable because a file had exactly one tail: `embed.js` would have\n// replaced the whole OUTPUT region, provenance prose and sibling runs\n// included (custody-overnight.md). `locateAll` returns every tail in order,\n// each ending where the next begins; `embed.js --tail N` binds one without\n// touching the others. For a multi-tail file the code is what sits above the\n// FIRST tail, so every tail's code-sha256 covers the same bytes \u2014 use\n// `headTextAll` for that. `locate` keeps its historic single-tail behavior\n// (the LAST banner) so nothing already bound moves.\nfunction locateAll(src) {\n const lines = src.split('\\n');\n const heads = [];\n for (let i = 0; i < lines.length; i++) if (OUT_HEAD.test(lines[i])) heads.push(i);\n return heads.map((h, k) => {\n let limit = lines.length;\n if (k + 1 < heads.length) {\n limit = heads[k + 1];\n if (limit > 0 && BANNER.test(lines[limit - 1])) limit -= 1;\n }\n return locateAt(lines, h, limit);\n });\n}\n\nfunction headTextAll(src) {\n const tails = locateAll(src);\n if (!tails.length) return src;\n return tails[0].lines.slice(0, tails[0].tailStart).join('\\n');\n}\n\nfunction locateAt(lines, outHead, hardLimit) {\n // the banner rule above the OUTPUT line, if there is one, belongs to the tail\n let start = outHead;\n if (start > 0 && BANNER.test(lines[start - 1])) start -= 1;\n\n let readHead = -1;\n for (let i = outHead + 1; i < hardLimit; i++) if (READ_HEAD.test(lines[i])) { readHead = i; break; }\n\n // Where the body starts, and this is the part that was WRONG until 2026-08-19.\n //\n // The first draft assumed every tail closes its OUTPUT header with a rule, so\n // it took the first banner after the OUTPUT line as the header's end. That is\n // true of the embedded format and of most legacy ones, and false of the legacy\n // form that starts its output on the very next line:\n //\n // // OUTPUT (run of 2026-08-13), abridged:\n // //\n // // 5 | 49 | 11,13 | 4.45e+0\n //\n // There the first banner encountered is the tail's CLOSING rule, so the body\n // was computed as empty. It returned empty for **47 of 126 tails**, and both\n // consumers skip an empty body, which meant the migration counter under-read\n // by a factor of two and \u2014 far worse \u2014 `embed.js`'s guard against overwriting\n // legacy evidence was INERT on exactly those files. Attack 9 demonstrated it\n // destroying a row on a scratch copy while exiting 0. A safety mechanism with\n // a silent hole is worse than none, because it is trusted.\n //\n // The rule now: a header exists only if it announces itself, either by a rule\n // on the line immediately after OUTPUT, or by carrying a `code-sha256:` line\n // within the next dozen. Otherwise the body starts immediately.\n const limit = readHead === -1 ? hardLimit : readHead;\n let headerEnd = -1;\n if (BANNER.test(lines[outHead + 1] || '')) {\n headerEnd = outHead + 1;\n } else {\n for (let i = outHead + 1; i < Math.min(outHead + 14, limit); i++) {\n if (/code-sha256\\s*:/.test(lines[i])) {\n for (let j = i; j < limit; j++) if (BANNER.test(lines[j])) { headerEnd = j; break; }\n break;\n }\n }\n }\n const body = headerEnd === -1 ? outHead + 1 : headerEnd + 1;\n\n // AN EXPLICIT BODY LENGTH BEATS EVERY HEURISTIC. Two honest shapes defeat\n // the READINGS scan in opposite directions: a script that PRINTS the word\n // READINGS on stdout (attack-perfold-01/02 assemble their readings in code,\n // so the body legitimately contains a `// READINGS` line and the first-match\n // scan truncates the bound body), and a tail whose real READINGS banner is\n // followed by a decorative second one (attack-ioslack-survey), which a\n // last-match scan would swallow into the body. So the writer now records\n // `body-lines: N` in the fingerprint and the reader believes it. Legacy\n // fingerprints without the field keep the first-match scan unchanged.\n let end = readHead === -1 ? hardLimit : readHead;\n if (readHead > 0 && BANNER.test(lines[readHead - 1])) end = readHead - 1;\n if (headerEnd !== -1) {\n for (let i = outHead; i < headerEnd; i++) {\n const m = /^\\s*\\/\\/\\s+body-lines:\\s+(\\d+)\\s*$/.exec(lines[i]);\n if (m) {\n const n = Number(m[1]);\n if (body + n <= hardLimit) {\n end = body + n;\n readHead = -1;\n for (let j = end; j < hardLimit; j++) if (READ_HEAD.test(lines[j])) { readHead = j; break; }\n }\n break;\n }\n }\n }\n\n return { lines, tailStart: start, outHead, headerEnd, bodyStart: body, outEnd: end, readStart: readHead, limitEnd: hardLimit };\n}\n\nfunction headText(src) {\n const L = locate(src);\n return L ? L.lines.slice(0, L.tailStart).join('\\n') : src;\n}\n\n// The body, in either of the two shapes this corpus actually uses: `//` line\n// comments, and a `/* \u2026 */` block. The block form was invisible to the first\n// draft, which is 21 of 126 tails on top of the 47 the header bug hid \u2014 and an\n// invisible body means `embed.js`'s guard cannot see the evidence it is meant\n// to refuse to overwrite. Both bugs had the same consequence and neither was\n// visible from the outside, which is why the selftest now carries one fixture\n// of each shape.\nfunction outputText(src) {\n const L = locate(src);\n if (!L) return null;\n const out = [];\n let inBlock = false;\n for (const raw of L.lines.slice(L.bodyStart, L.outEnd)) {\n const line = raw.replace(/\\s+$/, '');\n if (!inBlock && /^\\s*\\/\\*/.test(line)) {\n inBlock = true;\n const after = line.replace(/^\\s*\\/\\*+/, '');\n if (after.trim()) out.push(after);\n continue;\n }\n if (inBlock) {\n if (/\\*\\/\\s*$/.test(line)) { inBlock = false; const before = line.replace(/\\*\\/\\s*$/, ''); if (before.trim()) out.push(before); continue; }\n out.push(line);\n continue;\n }\n const m = line.match(/^\\s*\\/\\/ ?(.*)$/);\n if (m !== null) out.push(m[1]);\n }\n return out.filter(l => !/^={10,}$/.test(l.trim())).join('\\n');\n}\n\n// The body EXACTLY as the run printed it, rules kept. `outputText` filters\n// pure `====` rule lines because legacy hand-pasted tails use them as internal\n// decoration; but an EMBEDDED body is a byte record of stdout, and 62 bound\n// tails have rule lines in their real output. The static out-sha check\n// (checks.js `embeds`, embed.js --check body verdict) must therefore read the\n// body with rules KEPT, or it manufactures 62 false mismatches.\nfunction stripCommentLines(lines) {\n const out = [];\n let inBlock = false;\n for (const raw of lines) {\n const line = raw.replace(/\\s+$/, '');\n if (!inBlock && /^\\s*\\/\\*/.test(line)) {\n inBlock = true;\n const after = line.replace(/^\\s*\\/\\*+/, '');\n if (after.trim()) out.push(after);\n continue;\n }\n if (inBlock) {\n if (/\\*\\/\\s*$/.test(line)) { inBlock = false; const before = line.replace(/\\*\\/\\s*$/, ''); if (before.trim()) out.push(before); continue; }\n out.push(line);\n continue;\n }\n const m = line.match(/^\\s*\\/\\/ ?(.*)$/);\n if (m !== null) out.push(m[1]);\n }\n return out;\n}\n\nfunction outputTextRaw(src) {\n const L = locate(src);\n if (!L) return null;\n return stripCommentLines(L.lines.slice(L.bodyStart, L.outEnd)).join('\\n');\n}\n\n// Candidate raw bodies for a LEGACY fingerprint (no `body-lines` field): the\n// current parse first, then the parse extended to each later READINGS banner.\n// A static checker tries each against the recorded out-sha256, so a body that\n// legitimately contains a printed READINGS line (the perfold shape) is not a\n// false mismatch, and the matching candidate identifies the true split.\nfunction outputBodyCandidates(src) {\n return outputBodyCandidatesOf(locate(src));\n}\nfunction outputBodyCandidatesOf(L) {\n if (!L) return [];\n const lim = L.limitEnd === undefined ? L.lines.length : L.limitEnd;\n const heads = [];\n for (let i = L.bodyStart; i < lim; i++)\n if (READ_HEAD.test(L.lines[i])) heads.push(i);\n const ends = new Set([L.outEnd]);\n for (const h of heads) {\n let e = h;\n if (h > 0 && BANNER.test(L.lines[h - 1])) e = h - 1;\n if (e > L.bodyStart) ends.add(e);\n }\n if (!heads.length) ends.add(lim);\n return [...ends].sort((a, b) => a - b)\n .map(e => ({ end: e, text: stripCommentLines(L.lines.slice(L.bodyStart, e)).join('\\n') }));\n}\n\n// The STATIC out-sha verdict: does the pasted block, as bytes on disk, hash to\n// the out-sha256 the fingerprint records? This is the check the whole embed\n// mechanism was missing (verify-the-verifier-embeds.md, headline): out-sha256\n// was written into every tail and compared only against a fresh RUN, so a\n// digit hand-edited inside a bound block passed everything. This runs in\n// microseconds with nothing executed. Returns { ok, end } where `end` is the\n// body end line of the matching parse (candidates cover the legacy printed-\n// READINGS shape), or { ok: false, end: null }.\nfunction bodyMatchesRecorded(src, fp) {\n return bodyMatchesRecordedOf(locate(src), fp);\n}\nfunction bodyMatchesRecordedOf(L, fp) {\n if (!fp || !fp['out-sha256']) return { ok: false, end: null };\n for (const c of outputBodyCandidatesOf(L))\n if (sha(normalize(c.text)) === fp['out-sha256']) return { ok: true, end: c.end };\n return { ok: false, end: null };\n}\n\nfunction readingsText(src) {\n const L = locate(src);\n if (!L || L.readStart === -1) return null;\n return L.lines.slice(L.readStart + 1)\n .map(l => { const m = l.match(/^\\s*\\/\\/ ?(.*)$/); return m ? m[1] : null; })\n .filter(l => l !== null && !/^={10,}$/.test(l.trim()))\n .join('\\n');\n}\n\n// The fingerprint, parsed out of the OUTPUT header. Absent on a legacy tail.\nfunction fingerprint(src) {\n return fingerprintOf(locate(src));\n}\nfunction fingerprintOf(L) {\n if (!L) return null;\n const fp = {};\n const stop = L.headerEnd === -1 ? Math.min(L.outHead + 12, L.lines.length) : L.headerEnd;\n for (let i = L.outHead; i < stop; i++) {\n const m = L.lines[i].match(/^\\s*\\/\\/\\s+([\\w-]+):\\s+(.*?)\\s*$/);\n if (m) fp[m[1]] = m[2];\n }\n return (fp['code-sha256'] && fp['out-sha256']) ? fp : null;\n}\n\n// ---------------------------------------------------------------------------\n// The figures a reader would quote: three digits, or two decimal places. Small\n// counters and years are excluded by shape so that a missing figure means\n// something. Returns Map(token -> the line it sits on).\n// ---------------------------------------------------------------------------\n// `[\\d,]*` must not swallow a TRAILING comma: a figure written mid-sentence\n// as \"548,402,\" otherwise tokenizes with the comma, strips to 548402 and then\n// never matches the block's 548,402 \u2014 a systematic false-positive class in the\n// readings-not-traceable advisory (found 2026-08-19).\nconst NUM = /-?\\d(?:[\\d,]*\\d)?(?:\\.\\d+)?(?:[eE][-+]?\\d+)?/g;\n\nfunction figures(text) {\n const found = new Map();\n for (const line of String(text).split('\\n')) {\n if (!line.trim()) continue;\n let m; NUM.lastIndex = 0;\n while ((m = NUM.exec(line)) !== null) {\n let tok = m[0];\n // THREE TOKENIZER FALSE-POSITIVE CLASSES, closed 2026-08-20 (the\n // verify-the-verifier pass measured all three in the advisory queue):\n // (1) identifier digits: `A048670`, `arXiv:2302.00459`, a DOI path \u2014 a\n // number glued to a letter is an ID, not a figure. Skip when the\n // character immediately before the match is a letter.\n // (2) hyphen-ranges: `1.54-2.27` and `[30.8-42.9]` tokenized `-2.27`,\n // a figure no output block ever printed. A leading `-` is a minus\n // sign only when what precedes it is not a digit or closing bracket.\n const prevCh = m.index > 0 ? line[m.index - 1] : '';\n if (/[A-Za-z]/.test(prevCh)) continue;\n // `arXiv:2302.00459`, `doi.org/10.1093/...`: an id whose digits follow a\n // word through `:` or `/` is an address, not a figure.\n if ((prevCh === ':' || prevCh === '/') && m.index > 1 && /[A-Za-z]/.test(line[m.index - 2])) continue;\n if (tok[0] === '-' && /[\\d)\\]]/.test(prevCh)) tok = tok.slice(1);\n const before = line.slice(Math.max(0, m.index - 2), m.index);\n const after = line.slice(m.index + tok.length + (m[0].length - tok.length), m.index + m[0].length + 5);\n if (/\\[\\s*$/.test(before) && /^\\s*m?s\\s*[\\])]/.test(after)) continue;\n if (/^\\s*(?:ms|s)\\b/.test(after)) continue;\n if (/\\d{4}-\\d{2}-\\d{2}/.test(line.slice(Math.max(0, m.index - 6), m.index + tok.length + 6))) continue;\n const digits = (tok.match(/\\d/g) || []).length;\n const decimals = (tok.split('.')[1] || '').replace(/\\D/g, '').length;\n if (digits < 3 && decimals < 2) continue;\n if (/^(?:19|20)\\d\\d$/.test(tok)) continue;\n if (!found.has(tok)) found.set(tok, line.trim().slice(0, 90));\n }\n }\n return found;\n}\n\nfunction presentIn(tok, text) {\n if (text.includes(tok)) return true;\n const bare = tok.replace(/,/g, '');\n if (bare !== tok && text.includes(bare)) return true;\n if (tok.includes('.')) {\n const trimmed = tok.replace(/0+$/, '');\n if (trimmed !== tok && trimmed.length > 2 && text.includes(trimmed)) return true;\n }\n // Exponent-notation variants (third tokenizer class, 2026-08-20): `3.0e8`,\n // `3.0e+8`, `3.0e+08` and `3.0E8` are one figure four ways, and a reading\n // that reflows one spelling against a block that prints another is not a\n // missing figure. Compare on a canonical form when the token carries an\n // exponent, and also scan the text's own exponent tokens canonically.\n const expo = /^(-?[\\d.,]+)[eE]([-+]?)0*(\\d+)$/.exec(tok);\n if (expo) {\n const canon = `${expo[1]}e${expo[2] === '-' ? '-' : '+'}${expo[3]}`;\n const re = /-?[\\d.,]+[eE][-+]?\\d+/g;\n let m;\n while ((m = re.exec(text)) !== null) {\n const t2 = /^(-?[\\d.,]+)[eE]([-+]?)0*(\\d+)$/.exec(m[0]);\n if (t2 && `${t2[1]}e${t2[2] === '-' ? '-' : '+'}${t2[3]}` === canon) return true;\n }\n }\n return false;\n}\n\nmodule.exports = { locate, locateAll, headText, headTextAll, outputText, outputTextRaw,\n outputBodyCandidates, outputBodyCandidatesOf, bodyMatchesRecorded, bodyMatchesRecordedOf,\n readingsText, fingerprint, fingerprintOf, normalize, sha, figures, presentIn,\n BANNER, OUT_HEAD, READ_HEAD };\n", "research/verify-ladder-big.js": "// ============================================================================\n// LADDER VERIFICATION, BIG TILES \u2014 T29, T31, T37 by mod-30 lattice scan.\n// Twin slots satisfy r \u2261 11, 17, or 29 (mod 30), so we scan only that\n// 3-in-30 lattice (10x compression) and strike the classes {0, p-2} mod p\n// for p = 7..37 via CRT strides. T29/T31 double-check earlier full scans by\n// an independent method; T37 (width 7,420,738,134,810) is the ceiling run.\n// Expected censuses: 214,708,725 | 6,226,553,025 | 217,929,355,875\n// (the last is the value Chris hand-derived in his 2024 folder-09 notes).\n// ============================================================================\n\nconst CLASSES = [11, 17, 29];\nconst SEG = 300_000_000; // raw positions per segment; 3 x 10M compressed\nfunction census(upto) {\n const PS = [7,11,13,17,19,23,29,31,37].filter(p => p <= upto);\n let P = 30; for (const p of PS) P *= p;\n const arrs = CLASSES.map(() => new Uint8Array(SEG / 30));\n let count = 0; const t0 = Date.now();\n for (let base = 0; base < P; base += SEG) {\n const len = Math.min(SEG, P - base);\n const cLen = Math.ceil(len / 30);\n for (const a of arrs) a.fill(0, 0, cLen + 1);\n for (const p of PS) {\n for (const kill of [0, p - 2]) {\n for (let ci = 0; ci < 3; ci++) {\n const res = CLASSES[ci];\n // x \u2261 res (mod 30), x \u2261 kill (mod p) -> x0 in [0, 30p)\n let x0 = res; while (x0 % p !== kill) x0 += 30;\n // first j >= base with j \u2261 x0 (mod 30p)\n let j = x0 + Math.ceil((base - x0) / (30 * p)) * 30 * p;\n if (j < base) j += 30 * p;\n const arr = arrs[ci];\n for (; j < base + len; j += 30 * p) arr[(j - base - (res - (base % 30) + 30) % 30) / 30 | 0] = 1;\n }\n }\n }\n // count unmarked lattice points in this segment\n for (let ci = 0; ci < 3; ci++) {\n const res = CLASSES[ci], arr = arrs[ci];\n const start = base + ((res - (base % 30) + 30) % 30);\n for (let j = start, i = 0; j < base + len; j += 30, i++) if (!arr[i]) count++;\n }\n if ((base / SEG) % 400 === 0) console.error(`T${upto}: ${(100*base/P).toFixed(1)}% (${((Date.now()-t0)/60000).toFixed(1)} min)`);\n }\n console.log(`T${upto}: width=${P} census=${count} (${((Date.now()-t0)/60000).toFixed(1)} min)`);\n return count;\n}\n\nconst expected = { 29: 214708725, 31: 6226553025, 37: 217929355875 };\nfor (const upto of [29, 31, 37]) {\n const c = census(upto);\n console.log(` expected ${expected[upto]} ${c === expected[upto] ? 'MATCH \u2713' : 'MISMATCH \u2717'}`);\n}\n\n// ============================================================================\n// OUTPUT \u2014 EMBEDDED, do not hand-edit. Regenerate:\n// node research/qc/embed.js --streams both research/verify-ladder-big.js\n// invocation: node research/verify-ladder-big.js\n// code-sha256: bffec9fecb03f747c3e444dd75875b31b96f0cfef919bff16d30587361991e2b\n// out-sha256: a3ef64915412f8352f96257493bb49d75f528868df36e8391020ba801aea89d8\n// body-lines: 72\n// restamped: 2026-08-20 normalize migration; body verified byte-authentic under the bind-time rule (pre-min (before 2026-08-20)) before the hash moved\n// streams: stdout+stderr\n// node: v22.21.0\n// embedded: 2026-08-19\n// elapsed: 3271.7 s\n// ============================================================================\n// T29: width=6469693230 census=214708725 (0.0 min)\n// expected 214708725 MATCH \u2713\n// T31: width=200560490130 census=6226553025 (1.4 min)\n// expected 6226553025 MATCH \u2713\n// T37: width=7420738134810 census=217929355875 (53.0 min)\n// expected 217929355875 MATCH \u2713\n// \u2500\u2500\u2500\u2500\u2500 stderr \u2500\u2500\u2500\u2500\u2500\n// T29: 0.0% (0.0 min)\n// T31: 0.0% (0.0 min)\n// T31: 59.8% (0.8 min)\n// T37: 0.0% (0.0 min)\n// T37: 1.6% (0.8 min)\n// T37: 3.2% (1.7 min)\n// T37: 4.9% (2.5 min)\n// T37: 6.5% (3.4 min)\n// T37: 8.1% (4.2 min)\n// T37: 9.7% (5.1 min)\n// T37: 11.3% (6.0 min)\n// T37: 12.9% (6.8 min)\n// T37: 14.6% (7.7 min)\n// T37: 16.2% (8.5 min)\n// T37: 17.8% (9.4 min)\n// T37: 19.4% (10.2 min)\n// T37: 21.0% (11.1 min)\n// T37: 22.6% (12.0 min)\n// T37: 24.3% (12.8 min)\n// T37: 25.9% (13.7 min)\n// T37: 27.5% (14.5 min)\n// T37: 29.1% (15.4 min)\n// T37: 30.7% (16.2 min)\n// T37: 32.3% (17.1 min)\n// T37: 34.0% (18.0 min)\n// T37: 35.6% (18.8 min)\n// T37: 37.2% (19.7 min)\n// T37: 38.8% (20.5 min)\n// T37: 40.4% (21.4 min)\n// T37: 42.0% (22.3 min)\n// T37: 43.7% (23.1 min)\n// T37: 45.3% (24.0 min)\n// T37: 46.9% (24.8 min)\n// T37: 48.5% (25.7 min)\n// T37: 50.1% (26.5 min)\n// T37: 51.7% (27.4 min)\n// T37: 53.4% (28.3 min)\n// T37: 55.0% (29.1 min)\n// T37: 56.6% (30.0 min)\n// T37: 58.2% (30.9 min)\n// T37: 59.8% (31.7 min)\n// T37: 61.4% (32.6 min)\n// T37: 63.1% (33.4 min)\n// T37: 64.7% (34.3 min)\n// T37: 66.3% (35.2 min)\n// T37: 67.9% (36.0 min)\n// T37: 69.5% (36.9 min)\n// T37: 71.2% (37.7 min)\n// T37: 72.8% (38.6 min)\n// T37: 74.4% (39.4 min)\n// T37: 76.0% (40.3 min)\n// T37: 77.6% (41.2 min)\n// T37: 79.2% (42.0 min)\n// T37: 80.9% (42.9 min)\n// T37: 82.5% (43.7 min)\n// T37: 84.1% (44.6 min)\n// T37: 85.7% (45.5 min)\n// T37: 87.3% (46.3 min)\n// T37: 88.9% (47.2 min)\n// T37: 90.6% (48.0 min)\n// T37: 92.2% (48.9 min)\n// T37: 93.8% (49.7 min)\n// T37: 95.4% (50.6 min)\n// T37: 97.0% (51.5 min)\n// T37: 98.6% (52.3 min)\n// ============================================================================\n// READINGS\n//\n// Context notes carried out of the pre-embed OUTPUT block (2026-08-19):\n//\n// READING. The ladder is verified by direct count through T37 \u2014 7.42\n// TRILLION positions scanned, and the census lands exactly on\n// 217,929,355,875: the value Chris hand-derived with the multiply-by-(p-2)\n// rule in his 2024 folder-09 notes.txt (\"35 > 217929355875\"). His pencil\n// arithmetic beat the hardware here by two years. T29/T31 additionally\n// re-verified by this independent lattice method (10x compression via the\n// mod-30 comb; 57x faster than the raw scan \u2014 the speedup that makes\n// G2(37#) feasible). This retires brute-force census verification: from\n// here the ladder is read off A059861/Schemmel, and hardware goes only to\n// what formulas cannot give (grain, G2, strata, veins).\n// ============================================================================\n\n// ============================================================================\n// TRACEABILITY NOTE, 2026-08-19, appended BELOW the tail so the embed\n// fingerprint is untouched (this text is READINGS; it is not hashed).\n//\n// The tail was bound with --force and the force cost ONE token out of the old\n// block's seven: 54.1, the minutes the T37 leg took on 2026-08-14. The fresh\n// run reads 53.0 min for the same leg. Every census and every width came back\n// identical -- 214,708,725 at width 6,469,693,230; 6,226,553,025 at\n// 200,560,490,130; and 217,929,355,875 at 7,420,738,134,810 -- and all three\n// still print MATCH against the expected table.\n//\n// WHY THIS FILE WAS UNBINDABLE UNTIL NOW, and it is the cleanest case in the\n// custody migration. research/history/staging/custody-embed-migration.md sec.3\n// cause (c)1 lists this file among fifteen whose absent figures sit on stderr,\n// which the old embed path discarded: the per-segment progress line at line 42\n// goes through console.error, so a stdout-only capture lost it and the guard\n// then saw 3 of 10 figures missing. Under --streams both it is 1 of 7, and the\n// one is a stopwatch. Nothing about the file changed; the capture did.\n//\n// The two READINGS figures the block does not literally contain are 7.42, the\n// prose rounding of the 7,420,738,134,810 positions that IS in the block, and\n// 059861, which is the gate's tokenizer cutting the OEIS id A059861 in half.\n// ============================================================================\n// ---------------------------------------------------------------------------\n// FIGURE PROVENANCE (added 2026-08-20, readings-traceability pass). No number\n// above was changed.\n//\n// The 2026-08-19 traceability note directly above already covers all three\n// figures the gate flags on this file, so this block only pins the third.\n// 7.42 is covered there: the prose rounding of the printed\n// 7,420,738,134,810 positions.\n// 059861 is covered there: the tokenizer cutting the OEIS id A059861.\n// 54.1 is the third, and the note explains it in its first paragraph. It is\n// the T37 leg's wall-clock minutes from the 2026-08-14 run, the one token\n// the --force rebind cost. The embedded block above prints 53.0 min for the\n// same leg on the fresh run. Both are stopwatch readings of the same\n// computation on different days; every census and width matched. Quote 53.0\n// as this file's runtime and 54.1 only as the historical figure it is.\n// ---------------------------------------------------------------------------\n" }, "sha256": { "31-regions.log": "4b1d71e962c7307b816b3325c6e8ce83673d12427c22ff72e145f18f2b5c9934", "173-regions.log": "9f2f87771697b3a3126c0a23cb3a1066f568a53ce0382d4b3b5bf29f100da835", "173-regions.stderr.txt": "1bd2668a64f156e6c6e47d76915d946b5507bdda11b580a7000de13dec19a78e", "research/qc/tailfmt.js": "ad688e4769b535c0b5cc27c526c1df7c091e9cb9ad4f4fc8beca975b5d6578b7", "research/verify-ladder-big.js": "2f3ed6cbfda3b87081da6876779bec60dc31e5aac2c0d33b7841c7bc920185c3" } }