#!/usr/bin/env python3
"""row21-offcurve-evaluate.py -- the crossed box (row 21) OFF the curve: the exact-integrability chain of the frame-corrected
two-variable connection on rows 0..16, reproduced from the shipped objects at the record point and at six regenerated points; and
THE TOP BLOCK (rows 17-38) on the same bundle (--top / --rows 17-38: the section below the rows-0..16 tiers).

WHAT IS ESTABLISHED, AND WHAT IS NOT (the labels, as the page states them)
  Off the curve, the raw kernel pair is not flat by measurement; the frame-corrected connection, built from the scaling identity of
  the mass differential equation, is exactly integrable on all rows 0-16 at seven off-curve points in two chambers -- the six rows
  that can depend on the fourth leg by a five-ray exact fit of the leak term, verified on two rays kept out of the fit -- while rows
  17-40 are not established, and no off-curve evaluator of the amplitude is claimed: the served lbl3x-evaluate.py is the on-curve
  evaluator.
  L3: rows 17-40 and the 40 kernel entries out of scope; no off-curve evaluator.
  L4: seven rays on two leaves through Q plus the real-chamber point.
  This script reproduces the chain's own objects and prints every figure beside the record's; it evaluates no amplitude.

THE CHAIN (what each leg computes; every leg is a vendored script under chain/, run as a subprocess in the working directory)
  assemble  the leak matrix C at a point from the scaling identity  s A^s + t A^t + A_m2 - diag(alpha) = u C  (u = -s-t) on rows
            0..16, EXACTLY: A^s, A^t from the certified kernel bank (the rows-0..16 slice under kernel/), A_m2 from the point's own
            m^2-DE reduction (points/<tag>/, gzipped; its uncompressed sha256 is the DONE marker's).  The gate: C == 0 exactly on
            the 11 rows whose master carries no {p1, p3} pair (the C-free rows); the six leak rows {5,11,13,14,15,16} get their C.
            At Q the output is compared string for string with the chain's own first implementation (record/control_C_Q_node*).
  curl      R = d_t A_s - d_s A_t + [A_s, A_t] of the corrected pair A_s = A^s + (t/s) C, A_t = A^t + (s/t) C on the C-free rows,
            in two implementations: exact first-order jets over the rationals, and the vendored de_transport evaluator at dps 150
            (central differences, h = 1e-50); the record's agreement is >= 96 digits at every point; the identity control at dps 150.
  verdict   the FLAT / NOT-FLAT verdict on the C-free rows at the points in the working directory, with its scope, and the 40
            unclosed kernel entries listed by object (record/unclosed40.json).
  budget    the ray through the point: C(lambda s0, lambda t0) EXACTLY as rational functions of lambda (the point's m^2-DE at
            m2 = 1/lambda); the 11 C-free rows must vanish identically; the leak entries' degrees -> the ray count (B_N + 1 = 5).
  fit       the exact bivariate (homogeneous trivariate) C on the leak rows from the ray functions of the five fit rays: per entry
            the denominator from the certified ring, the numerator components by exact linear algebra; controls (a) the C-free rows
            identically zero on every ray, (b) blind leave-one-out, (c) the null vectors when underdetermined (the 4-ray fit).
  predict   the fit evaluated on a withheld ray BEFORE that ray's derived objects exist in the working directory (it refuses
            otherwise); verify: the prediction against the ray functions computed from the withheld point's own m^2-DE reduction,
            entry by entry, exact equality or the exact difference.
  residual  the corrected pair's curl on the leak rows at a point with d_s C, d_t C EXACT from the fit -- every residue exact;
            at Q also compared with the earlier finite-difference estimate (fd: the three-point leaf stencil, kept as a control).

USAGE
  python3 row21-offcurve-evaluate.py                                  # = --point Q_record --leg all: assemble + curl + verdict at Q
  python3 row21-offcurve-evaluate.py --point leaf_s-20                # the same chain at a regenerated point (points/points.json)
  python3 row21-offcurve-evaluate.py --leg fit                        # the five-ray fit on the shipped ray functions (no bank load)
  python3 row21-offcurve-evaluate.py --leg fit --rays Q_record,real_s-11_t-2,leaf_s-20,leaf_s-17    # the 4-ray control fit
  python3 row21-offcurve-evaluate.py --leg predict --point leaf_s-19.5   # the withheld prediction (then --leg verify)
  python3 row21-offcurve-evaluate.py --leg residual --point leaf_s-18.5  # the exact leak-row residual at a point
  python3 row21-offcurve-evaluate.py --leg chain                      # everything: seven points x (assemble, curl, budget), the
                                                                      #   finite-difference control, the fit, five residuals, two
                                                                      #   predictions, two verifications, two residuals, the verdict
  python3 row21-offcurve-evaluate.py --mutate                         # the planted control: one digit of Q's m^2-DE changed on a
                                                                      #   copy -> the scaling-identity gate FAILS by name (rc 1)
  python3 row21-offcurve-evaluate.py --check                          # the second implementation at dps 150 and 200 (both >= 90 d)
  --point {Q_record, real_s-11_t-2, leaf_s-20, leaf_s-17, leaf_s-20.5, leaf_s-19.5, leaf_s-18.5} (the record's tags are accepted too;
  the data directories keep them); --nodes 0,1 (the two d-nodes d = 101, 102); --workdir DIR (default: a fresh temporary directory;
  the legs' objects land under DIR/ck and DIR/RECEIPTS; a leg that needs an object another leg makes takes it from DIR/ck when it is
  there, else from the shipped record/ copy and says so); --out JSON (the run receipt; refused before anything runs if it exists);
  --bank DIR (a directory holding the full kernel bank of record with its manifest, map and denominators, instead of the shipped
  rows-0..16 slice; the legs then load 4184 column records: about 20 s and 5.9 GB RSS per leg).

EXIT CODES  0 every figure equals the record's | 1 FAIL by name (a gate, a verdict or a record comparison; also the expected outcome
  of --mutate) | 2 usage (unknown point or leg, --out exists) | 3 REFUSED (a shipped file's sha256 pin mismatch, named) | 4 a pinned
  file MISSING | 5 a leg did not finish (its exit code and last line printed) | 6 the --mutate control was NOT caught.

MEASURED WALLS AND MEMORY (one process, nice 10, a shared 96-core host at loadavg ~120-140; a quiet core is faster): the epilog of
  --help lists every measured tier (GNU time wall and maximum resident set), with the shipped slice and with the full bank of record.

THE TOP BLOCK (rows 17-38; --top or --rows 17-38): the same chain on the 22 rows above the rows-0..16 chain, at the seven points above and
  at 19 fresh m^2-DE regenerations (points/, 26 rays in all: 24 enter the fit, 2 are withheld from it), every figure printed beside the
  record's own objects under record/top/ (INDEX.json names each with its sha256; the large ones are gzipped with the uncompressed sha256
  pinned).  WHAT IS ESTABLISHED, AND WHAT IS NOT: with the two spurious sector-63 columns folded onto the 39-master basis by their
  reductions and the 71 closed two-prime columns entered as exact columns, the leak term C of the top block is fitted on 24 rays in exact
  rational arithmetic (the numerator's pure degree allowed up to 13, a non-generic ray dropped on two entries): 581 of the 828 entries per
  d-node are determined, and on every one of them the fitted C predicts the two withheld rays exactly, entry for entry (2324 of 2324 over
  the two rays and both d-nodes), and the curl-plus-commutator residue of the frame-corrected pair is exactly zero on every determined
  entry where the residual is computable (491 of the 581 per d-node; the 90 in the seven blocked columns are outside the test) at all 26
  points and both d-nodes (25532 of 25532 residues).  The remaining 209 entries per d-node are families whose top degree exceeds the ray
  count (a design finding: 2-13 more rays each), row 36 carries on every ray a denominator factor outside the certified kernel ring
  (a finding on the ring), and the spurious-column rows 39-40 satisfy the fold identity for the frame-corrected pair at all 24 fit rays and
  both d-nodes (156 identities each; the raw pair's discrepancy is exactly the leak term).  The 40 unclosed kernel entries remain not
  established; no off-curve evaluator of the amplitude is claimed.  The sampled leave-one-out is in progress; no figure is served.
  The kernel data: kernel/kernel_rows17_38.pkl.gz (the two-node restriction of the bank of record to the 3981 column keys rows 17..40
  reference: of the 3693 keys rows 17..38 reference, 3605 are exact in the bank, 26 are the folded two-prime columns of the closed-columns
  layer kernel/kernel_folded26.pkl.gz, 62 are absent = the unclosed) unioned by the reader chain/kernel_bank65.py with the rows-0..16
  slice; the 71 promoted keys asserted against the closed-columns object by canonical sha256 at load; an absent file, pin or layer, or a
  mismatch, refuses by name before any value is served; --bank DIR reads the full bank of record instead.
  assemble-top  the folded 41x39 matrices at the point and the C rows of rows 17..38 (chain/assemble_C_top.py; the positive control on
                rows 0..16 against record/C_<tag>_node*.json at the seven points); budget-top  the ray functions C(lambda) on rows 17..38
                (chain/ray_budget_top.py: the fit's inputs); curl-top  R_point per entry, 636 computed / 222 blocked (chain/curl_top.py);
  fold-gate     the corrected-pair fold identity (156) and the leak identity (78) at a (point, node) item (chain/fold_gate_corrected_top.py;
                the tool of record v1 beside, asserted by sha); --point all: the tally of record recomputed from the 48 shipped receipts;
  fit-top       the tally of record from the fit file (581 / 209 / 38 per node, 2 one-ray-dropped); --spot: a deterministic sample of
                entry-node cases re-derived from the shipped ray budgets by the vendored fit form (chain/fit_C_rays_top.py --shard-fit,
                the entries with index % --width == --shard; default --width 276 --shard 0 = 3 entries per node) and compared entry by
                entry with the fit of record; --shard K --width W / --merge: the record's sharded, resumable form for the whole (1656
                entry-node cases; not a served tier as a whole);
  fit-control   the fit form's control copy on rows 0-16 (chain/fit_C_rays_control.py): 28/0/0 on five rays, 27/1/0 on four (--rays);
  predict-top   the fit of record evaluated on a withheld ray BEFORE that ray's derived objects exist in the working directory (refuses
                otherwise; the families emitted as families); verify-top  the prediction against the withheld ray's own budget: exact
                equality entry by entry, n_compared printed, VACUOUS never PASS;
  residual-top  the exact residual R = R_point + (1/s - 1/t) C + L C at a point with d_s C, d_t C exact from the fit of record; --point
                all: the 26 points, the tally (chain/emit_residual_tally_top.py) and the category overlap (chain/emit_residual_overlap_top.py);
  findings      the UNDERDETERMINED class (chain/emit_underdetermined_class_top.py: the histogram of rays still needed) and row 36;
  tally-top     (= --top alone) every figure of record read from the shipped objects, no leg run;   march-top  = assemble-top + budget-top +
                curl-top + fold-gate at a point;   chain-top  everything at the 26 points in the record's order (the withheld predictions
                before the withheld points' own objects; resumable: an item whose four objects exist is skipped).
  --mutate-top  the planted control: one digit of one coefficient in a copy of a withheld ray's budget -> verify-top FAILS by name (rc 1);
                with --leg fit-top: the digit in a fit ray's budget (entry (17,0) node 0, inside the default sample) -> the spot
                re-derivation differs from the fit of record (rc 1); a non-default --shard / --width under --mutate-top is refused
                by name (rc 2: the plant would fall outside the sample).
  USAGE  python3 row21-offcurve-evaluate.py --top                                  # tally-top: the figures of record from the objects
         python3 row21-offcurve-evaluate.py --top --leg march-top --point real_s-11_t-2 --nodes 0 --workdir W
         python3 row21-offcurve-evaluate.py --top --leg fold-gate --point all --workdir W
         python3 row21-offcurve-evaluate.py --top --leg fit-top --spot [--shard 0 --width 276]
         python3 row21-offcurve-evaluate.py --top --leg predict-top --point real_s-9_t-5 --workdir W   # then verify-top (a fresh W)
         python3 row21-offcurve-evaluate.py --top --leg residual-top --point all
         python3 row21-offcurve-evaluate.py --top --leg findings
         python3 row21-offcurve-evaluate.py --top --leg chain-top --workdir W        # hours: the march (52 items, minutes each)
  The rows-0..16 tiers above are unchanged; the exit codes are the same (0-6).  MEASURED WALLS AND MEMORY of the top-block tiers: the
  epilog of --help (WALLS_TOP), from this build's own captures.
"""
import argparse
import glob
import gzip
import hashlib
import json
import os
import re
import shutil
import subprocess
import sys
import tempfile
import time
from fractions import Fraction as F

HERE = os.path.dirname(os.path.abspath(__file__))
CHAIN = os.path.join(HERE, "chain")
KERNEL = os.path.join(HERE, "kernel")
POINTS = os.path.join(HERE, "points")
RECORD = os.path.join(HERE, "record")
RC_FAIL, RC_USAGE, RC_REFUSED, RC_MISSING, RC_LEG, RC_NOTCAUGHT = 1, 2, 3, 4, 5, 6
FIT_RAYS = ["Q_m19m18", "Roff_m11m2", "Qleaf_sm20", "Qleaf_sm17", "Qleaf_sm41h"]
WITHHELD = ["Qleaf_sm39h", "Qleaf_sm37h"]
LEAF3 = ["Qleaf_sm20", "Q_m19m18", "Qleaf_sm17"]

# --- PINS (script-emitted from the shipped bytes; sha256 of every file under chain/, kernel/, points/ and record/) ---
PINS = {
    "chain/assemble_C.py": "638f5cc7711eaae2e5d8926303e5247fedd917847e6187fd2ec8b6748f8691d1",
    "chain/assemble_C_top.py": "c9592bfaccf9dd67c236c2c2b391c5c96522faf602af7b3c43400aa37d243182",
    "chain/curl_top.py": "50c18fc08246075e50c834a1da3dba211033e502fd1f48c7459df501f6cc2079",
    "chain/curl_two_impl.py": "1a44e0c4132f4c66df765f2d564902fb954ccf247cd1a4031fb18a993f6165ab",
    "chain/de_transport.py": "d509219ed5b0f37a145cb199e25633de436129c4c2a35a9bdda4d6349b918327",
    "chain/emit_residual_overlap_top.py": "80c76bc8aa6baf22ef1b1b02eb10234ed2e61547bb925401e6f31c1493be39eb",
    "chain/emit_residual_tally_top.py": "964f68107ac53a1d954dadc1a7af630464c31d339d33050c7cf67e605fd0ee76",
    "chain/emit_underdetermined_class_top.py": "b2af38005909b7d7213f7e1a430caeba48d1ac4dac363bf477be45726deca054",
    "chain/emit_verdict.py": "d42debe9fc0ef4280127f3a219d41acffca6064e00fa527c6f74ea1ec3ea0c93",
    "chain/fit_C_rays.py": "1ca4fc94fdb33b1f0133f9e23b5f35f75e43ef42cf6743f259ce495677d9dfb2",
    "chain/fit_C_rays_control.py": "13eac26f43e295cbe4303142359793f54ad591dbdb0a9c6d770c1bd8702c5ff1",
    "chain/fit_C_rays_top.py": "320c3c5450c0678e3e5a93ed0c2f0d09dc6d1347088763cf9c9033a8d7526fb7",
    "chain/fold_gate_corrected_top.py": "affa9aca650e55d766c14ced3753541a673e06d4bf9eb9dd8201d3882caad85c",
    "chain/fold_gate_corrected_top_v1.py": "ede507edf7382e02f9bf44e941ee5850dd00b107e998b70e8c125b850a558508",
    "chain/kernel_bank.py": "b66a10ff52dd1c9f71c20425da4c592d0c0f0f471b246c573c1f8b6161f69757",
    "chain/kernel_bank65.py": "83a79e0c4ca78fdb91dede914a47207253ea56fe4e2afa32463bbf670ca51543",
    "chain/kira_parse.py": "011ab9360b18fffdfd8be4b0db5ca92a4addb1bfd15f75d052869917868d3cae",
    "chain/leaf_fd_leak.py": "1e8bf94e6f575e508ee7a02175f64be0b37a6a4aa714d57faa34b611efca4849",
    "chain/march_top.sh": "0da37db4543132f919651147d80552582a049c4e6a55ab5d255b9b19ef234974",
    "chain/ray_budget_top.py": "47ebe93ef8d0d934cbf14cb14eeced334c71fdbd7104092e70f479f3f0d2ca08",
    "chain/ray_degree_budget.py": "0766aca11ac919f5938d0bf8be94420f1c8f2065ab8702e22e2b63eeff1a812f",
    "kernel/kernel_denoms.json": "e5985d41168a9b0747d7168e39911da3d64561a34405d23cef293d2c8644e18a",
    "kernel/kernel_folded26.pkl.gz": "edb1a71e3d4f824ba12c99001548db56a01277fc391380d5b72c636acc4c64c7",
    "kernel/kernel_manifest.json": "38fe109985fe1310fccb4f3e37294ff1a5ad3add796390d34bacea94589d4063",
    "kernel/kernel_map.json": "f57dabcfae19c6d3c23901db461737a6d15d654e5473b4113623522f4822f56e",
    "kernel/kernel_rows0_16.pkl.gz": "f4607ae3fbd20ca24eb6eca747fffde2eb215e990eb26814b28cc41eaa345aa0",
    "kernel/kernel_rows17_38.pkl.gz": "dee8a69c4b681c5c56f310ca302ac80aa69c0ce7ba7c0c83e49455c33d3c19e9",
    "points/Q_m19m18/gate.txt": "3c0636d4e20ee11ff630c0ccef26207eacfad3bce8cc666f4b1acb98bba19f05",
    "points/Q_m19m18/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Q_m19m18/results/LBL3X/kira_de_targets_m2.m.gz": "9955f71bcaf1979b9e5c0886c25d3bdc5150383aefbc7d31b61dd69c6d5931c0",
    "points/Q_m19m18/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Qleaf_sm17/DONE": "878b3c3326d28642528b4f79af95fc0da7efc0c26a2617b2b1c33f77a5640fcb",
    "points/Qleaf_sm17/gate.txt": "1a769d075df6229166c511fb3ac7f6120b6309c03458990df1455673773121b0",
    "points/Qleaf_sm17/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Qleaf_sm17/results/LBL3X/kira_target_dm2.m.gz": "a6720757078ccb47d0cbc6eb0f670128512c6c41a3e3703996ec1bb53a7b03a8",
    "points/Qleaf_sm17/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Qleaf_sm20/DONE": "f50df24d7c32c4942ac97f94647633bd255356ea2c7681ab2cb702b9165e8e1c",
    "points/Qleaf_sm20/gate.txt": "ddeb661ac933dabe3791230f0c44d465100664f0dc29f39fbc43865f2d1b92b4",
    "points/Qleaf_sm20/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Qleaf_sm20/results/LBL3X/kira_target_dm2.m.gz": "d214aa767f88094bb329447af09cd9dd9579e7628f43aff4b3019f2c02745e32",
    "points/Qleaf_sm20/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Qleaf_sm37h/DONE": "5542b1b6d01a240d7d4b27e331bceda0e5046980e92f0d7cf98bb92c28ecc641",
    "points/Qleaf_sm37h/gate.txt": "7566cb65110eeb02954fbcee6a0a0c3def5dca53fdc92d654c1cfd0446bbafd2",
    "points/Qleaf_sm37h/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Qleaf_sm37h/results/LBL3X/kira_target_dm2.m.gz": "707008732efc2cdd81c7dac18f6f9b844197bd7718eb13e457dc555a13b298b0",
    "points/Qleaf_sm37h/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Qleaf_sm39h/DONE": "da438b618551cb52ac277b7dd07438c45015ecea72bce2699bb9dadf76dcfa46",
    "points/Qleaf_sm39h/gate.txt": "d373ff964dbd0e7b3e1e3917776080fdd7c3c9e8f25117541e174e80f5dade25",
    "points/Qleaf_sm39h/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Qleaf_sm39h/results/LBL3X/kira_target_dm2.m.gz": "b55af90c17c3bbf13fcdbc69ca76368a88236edd5d9b5ee3f0ed1e28f679fd27",
    "points/Qleaf_sm39h/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Qleaf_sm41h/DONE": "d2ab88b29ec141f8bb774476a7ebebe0f66dfce108187406544827ec9bcb3258",
    "points/Qleaf_sm41h/gate.txt": "606d1fb152cb264dbce1614e0a871084e5d82d42274d105307a7fe7748dbde02",
    "points/Qleaf_sm41h/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Qleaf_sm41h/results/LBL3X/kira_target_dm2.m.gz": "561cb4eec6e407e7500e5b0f2c089725a569653e598f19be7e8d793272256a35",
    "points/Qleaf_sm41h/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m10m3/DONE": "f3995aad281f3040148557131b8b7a5aa3a1e41026ab91aed56a7be6b4512b3d",
    "points/Rnew_m10m3/gate.txt": "bdabe8e877ceee92ae1f3e9c93a3e72d1d2463a4e78f7f7ff444313a986f8d47",
    "points/Rnew_m10m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m10m3/results/LBL3X/kira_target_dm2.m.gz": "933d14a08d1c3db5c65a4c690154ae62694f34b1ff4f70e96e04e48557865c7c",
    "points/Rnew_m10m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m11m3/DONE": "7026cd48aa5dc2971665c0fa0e454bfc8d93b54340b29889125eafe2d05b60a0",
    "points/Rnew_m11m3/gate.txt": "7e39e50d2f5614938ea526b8d717c5f946e51d4a3e74919589e622b5fe4e8235",
    "points/Rnew_m11m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m11m3/results/LBL3X/kira_target_dm2.m.gz": "1a45903117493539cd6b877f3129f5ac83cf3b053921cd6f99c21f67f8231c0a",
    "points/Rnew_m11m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m13m2/DONE": "068235438f11a877c927057d1301010568cc4836bb04ed9a82bf5a46db190198",
    "points/Rnew_m13m2/gate.txt": "f7066241c71bb0a69a39eac2dbfb44fe81fd9164230cd0636d2e8b973cfe739b",
    "points/Rnew_m13m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m13m2/results/LBL3X/kira_target_dm2.m.gz": "048878891ec3ea135b01402f3a62be5e5521f00739f0b621ea7f50f5a3558093",
    "points/Rnew_m13m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m3m2/DONE": "366a5adb67aeb3c189abeedee56e1c09e1087daddb54ad13f2f092b1ebbabcf2",
    "points/Rnew_m3m2/gate.txt": "6fd02fc032b2d0326c473dd531e0ddb3096de6b3022752b411ff5d336a0f751a",
    "points/Rnew_m3m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m3m2/results/LBL3X/kira_target_dm2.m.gz": "78fc98d6fd37734b658674d3a96616c29b5b9a32cb1a6a7d08de0157b609e8df",
    "points/Rnew_m3m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m4m3/DONE": "ed3a3ec2cb1686f7104f69cbb8f1f45295a84d54fffe4da7db0fb722afb01dfc",
    "points/Rnew_m4m3/gate.txt": "cd9c949aed16b32d4d6cb2fe044a0a256a700dceb17cf1ee44fc81819a76624c",
    "points/Rnew_m4m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m4m3/results/LBL3X/kira_target_dm2.m.gz": "c02ba0ee6ed7eecf40965dec51fa90dd4acb8a58e2055312eb4f77bdae37c858",
    "points/Rnew_m4m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m5m2/DONE": "905d5fef8640ffe9df147be8b5a96eebeadd7fe9d6904f3a0df3af37e43ac104",
    "points/Rnew_m5m2/gate.txt": "89bac9d0ca765d4420e09a6c25e7e71e4f5d4612e7919831c8ba2be00ace8eb2",
    "points/Rnew_m5m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m5m2/results/LBL3X/kira_target_dm2.m.gz": "745fd04173c8300458e7f6b0644f5224a1297df16af70cce40c21bd98e508a28",
    "points/Rnew_m5m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m5m3/DONE": "c6a6109468ab8deb16ed1d88569574cd684988cc61b2f7e262c58d9e96e3a365",
    "points/Rnew_m5m3/gate.txt": "d0f7d9b251ed9a893270172f49c68bb25d26296f08825195c4592ead1ef56373",
    "points/Rnew_m5m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m5m3/results/LBL3X/kira_target_dm2.m.gz": "afaeb94bd7bc4e915e1a338af0aa847ac5de3806d11ed3620e950640abace21a",
    "points/Rnew_m5m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m5m4/DONE": "cf94d8a42fb2372aa50e84b5b6310028ab934570fd806420c9df883e0b257fc7",
    "points/Rnew_m5m4/gate.txt": "27c228d14497ece74fc2f6011920c75c1c712d1aa9e2b415ab6626e4b35762fc",
    "points/Rnew_m5m4/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m5m4/results/LBL3X/kira_target_dm2.m.gz": "ba80fac425c777693afdf807f6cace628f34f2c8125049228b2fb53b54120e7c",
    "points/Rnew_m5m4/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m6m5/DONE": "b6949a7f694cf559faba33e8c30123a55017a2e44551449d091823dcb74f8d72",
    "points/Rnew_m6m5/gate.txt": "2d22e3b9f6fc69b8e65f1ffc75fc3eeaeef9dd1e8860da40ca0b5f15b1551323",
    "points/Rnew_m6m5/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m6m5/results/LBL3X/kira_target_dm2.m.gz": "326da7f756170ecb985685d5034c23b140fbbc017b519af4b4cf21c4597af3ed",
    "points/Rnew_m6m5/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m7m2/DONE": "41f14eaa41c90208a0a150cb4511e5df6368b144695c8e5204d470705b319a01",
    "points/Rnew_m7m2/gate.txt": "077176ee42f1269463138afd674bfcb8ea364b236527bdd7d81700b6cda6cbd6",
    "points/Rnew_m7m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m7m2/results/LBL3X/kira_target_dm2.m.gz": "029c2888e097793ed52d5736b8d3a1f9a9f20afc1a66e2e6e6ae6fbbebe5fcf9",
    "points/Rnew_m7m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m7m3/DONE": "e07bf9ad72fb451ab72eb26012d1b2fcb4067c0e2facc62102ad93f0fe5acb5b",
    "points/Rnew_m7m3/gate.txt": "382cfbc8a3cdfa2c1488ea1c0c0f63806a0762dfc2b45863d50fc8fb1719d84f",
    "points/Rnew_m7m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m7m3/results/LBL3X/kira_target_dm2.m.gz": "b0704fac024204d83a6e27a3dbe83e3a0cd6a9e05bfd227f59acd3cf09c28afb",
    "points/Rnew_m7m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m7m4/DONE": "ec616f416e815b6766885acb3f8a27447db86a623ccbf8ea6e6e4b75b03babb0",
    "points/Rnew_m7m4/gate.txt": "c80adf12f942089fcfb2888a13080299fb67e10cbdb6f53ee159e63e291b3c10",
    "points/Rnew_m7m4/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m7m4/results/LBL3X/kira_target_dm2.m.gz": "692c8bb7bdc0b2e8004286d15782261e8e2f32de71cc05b93bd81250e2c4161a",
    "points/Rnew_m7m4/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m7m5/DONE": "29aefd6a65bf3b861633143680b418594691525ba563609494e9e6eac3e537df",
    "points/Rnew_m7m5/gate.txt": "ca9a70fcea2ac1b0761b1cb5614e2482226cd556f217eac351648945cc0ac92a",
    "points/Rnew_m7m5/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m7m5/results/LBL3X/kira_target_dm2.m.gz": "15384d0bf34d4c4566a7418369556b4bc666ecc435eb15f96810203a4d1242b2",
    "points/Rnew_m7m5/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m7m6/DONE": "30b2618a48054ea72f819a87ee8f8167ce076ce0658ab8a6af2e82be1747707f",
    "points/Rnew_m7m6/gate.txt": "d43c2092731bd9a3b450339b16d6228ec18118bc53b536f4a44b12261bbdce52",
    "points/Rnew_m7m6/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m7m6/results/LBL3X/kira_target_dm2.m.gz": "efd7af94c7cd218048a23f50a430357d48693dd465a79b85449061658bc9697b",
    "points/Rnew_m7m6/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m8m3/DONE": "8f26189862ac847f3fcb5f4b8f8d9cd2fc77bd5f4a9e03b69b2b529fec69e604",
    "points/Rnew_m8m3/gate.txt": "f2ee48d7e3d5e06d535587b389d0b08e86c1e475de8996401892eb9de1434ae0",
    "points/Rnew_m8m3/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m8m3/results/LBL3X/kira_target_dm2.m.gz": "ea577126d4693c9cc67da021450c3530b2fd6d6d44d3c5eedd12e453db674581",
    "points/Rnew_m8m3/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m8m5/DONE": "debf14a74a5fd4c4f233ffa09b52b1b047eccd5da2cf59e6bf74ecb44225138c",
    "points/Rnew_m8m5/gate.txt": "6f807042791f785b53ded4c1d7880ded7ee7640ba7720cd2a2c1c50fdecfc626",
    "points/Rnew_m8m5/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m8m5/results/LBL3X/kira_target_dm2.m.gz": "502ed7ac7626b1dd78812c62746e148513cfd7c227196e6a4549667488198869",
    "points/Rnew_m8m5/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m9m2/DONE": "1ef426e97ed26a2b926ec541927a67be7edbfb69b5ac601622027ac1d0db7153",
    "points/Rnew_m9m2/gate.txt": "85912a997f7a3d683365f6c6c1102d2ef05f299084133a1c28e47cdd3a5cba72",
    "points/Rnew_m9m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m9m2/results/LBL3X/kira_target_dm2.m.gz": "7609df2ef61e403ef137e94715b096051d8eb6c170d5a3deca0f56d611e594d6",
    "points/Rnew_m9m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m9m4/DONE": "6f401a18c60e3760160fa9fa307ea0aa5afc985d606b22b48ae8d302ca274a3e",
    "points/Rnew_m9m4/gate.txt": "edbca95d622fdeeb566f71979344f075545ed1ea1516831a1d77bb8187d14b7e",
    "points/Rnew_m9m4/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m9m4/results/LBL3X/kira_target_dm2.m.gz": "9c520cb97a0a1067b353de4a33fb9a7bbc52c0a12576e4b6d4026dedd3f6b852",
    "points/Rnew_m9m4/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Rnew_m9m5/DONE": "cea48e86cb9dfb7b35d32014003aa61aac9e059e99314dc803a201b5e3ee8774",
    "points/Rnew_m9m5/gate.txt": "77ac51f03872947f47c3031e3a3a60272f08f2e2e2670fc24fcbd870c25b8c59",
    "points/Rnew_m9m5/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Rnew_m9m5/results/LBL3X/kira_target_dm2.m.gz": "44b7d53e5ba275b4c8a44826325ef3993e3d03e31050026c3ded6df2927ce413",
    "points/Rnew_m9m5/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/Roff_m11m2/DONE": "90439e41fdf1224d745e1a4b35c8aa97197ca295a5f04d7c7d5dcd38aff03a6e",
    "points/Roff_m11m2/gate.txt": "429d54dd184e7dccd75e820e8a6df524292c4a9b3e4a5e471fa0c0e9ef16ab6b",
    "points/Roff_m11m2/preferred39": "b142c7c37d637f98b5dabc03e3c0f4b22fff19cc1d747703200416c127f963e7",
    "points/Roff_m11m2/results/LBL3X/kira_target_dm2.m.gz": "485afe5e94ec72c5b803aa9ed60dc786f05a06785b06725dce6a223938b79205",
    "points/Roff_m11m2/results/LBL3X/masters.final": "5c2189f7401a7d58c2b864841b1aee2a418ffdf69ec1728688d74ebc039c2824",
    "points/points.json": "fcba102649ef48845a9cb19bc8fd1e37ac2c50f3c633296b0cdb650b4bdbf118",
    "record/CURL_Q_m19m18_node0.json": "ada5463d35196d28250e3bc7e73f669f95b5252028147d468d1b45fa9934a346",
    "record/CURL_Q_m19m18_node1.json": "c50a59c535216ff7f784467540dcc78751e57267b7d414a48eec707f47f648a9",
    "record/CURL_Qleaf_sm17_node0.json": "003db07cc951f3e260e99fda748a470e019ef699d5e6dd66ad9d9c62eb4e424c",
    "record/CURL_Qleaf_sm17_node1.json": "99c18657c5b6a7774a0fdc28df6f854931d79bc22aead9c8f0b618d04b8d2465",
    "record/CURL_Qleaf_sm20_node0.json": "064792387085b72864f2988baa49eff7e0a201256b7976f0e6459d0c949510b9",
    "record/CURL_Qleaf_sm20_node1.json": "24733a34e1b237e3c0f97a38d068914177854c82ce5bc24165a44485ab5b824f",
    "record/CURL_Qleaf_sm37h_node0.json": "27645a86aeba193cfc3d2c9e9f0e910ca8a7b571ac72b69b8c98acde003856ad",
    "record/CURL_Qleaf_sm37h_node1.json": "2ed13e7a8780ecc694ad027eea89d6b70fd3730f06143a4b832b2e232444ad4c",
    "record/CURL_Qleaf_sm39h_node0.json": "af8edef09cb9d59294019ab1d59a478cc88533e3c1581d8731f8b6d1bad9fa9e",
    "record/CURL_Qleaf_sm39h_node1.json": "6b3ec37cb9dfb90f6be1f513e422f60b65db57627e772b4bdf29fa6b3962d7f2",
    "record/CURL_Qleaf_sm41h_node0.json": "28a240841e3dc455d1f955e504a5709963660aba0a6abee6bbb24f63e59d424c",
    "record/CURL_Qleaf_sm41h_node1.json": "8664304b573b36e365b5aebdfe2f28d35d31902aa23afe2d94615a6433b3af06",
    "record/CURL_Roff_m11m2_node0.json": "d3a1321ae6b03168cf1dbefdecb3fab1bc75e703547cd3274169e197ff823c9d",
    "record/CURL_Roff_m11m2_node1.json": "6444bf4b0d5a108de171058562226c7b78bda2a3cafe631c1bcc7e70f16d755b",
    "record/C_Q_m19m18_node0.json": "b7c960c3c21bd244bea9c04986cfb9ddac30802ae06b48e3f23263d22fbb6271",
    "record/C_Q_m19m18_node1.json": "86cb661fa4c094529c05261a6f3fdb49cb4bbc78b9826ece6e9368677515c967",
    "record/C_Qleaf_sm17_node0.json": "af3af20654155d1c3cf70fcc640f3b9eba42852f1e261fb9ba39aefa46ef08ee",
    "record/C_Qleaf_sm17_node1.json": "550c95ea4a7941b6c9cfb53bd01bf4013e4ab36509e62ea349b67202abaa969c",
    "record/C_Qleaf_sm20_node0.json": "10348630910514d44ba40817b9c82da115161a9f3166155c5579ee5ee230bed4",
    "record/C_Qleaf_sm20_node1.json": "d13194c3aa7043504663ceb78be0681c9b2a9d2e7a62b9a0956e9637cfa97d8d",
    "record/C_Qleaf_sm37h_node0.json": "5e5d8e2d67be00127fa0dd3af8e0966529e5aa92bc830696aeb619aae529bae7",
    "record/C_Qleaf_sm37h_node1.json": "f39474835d667f2ca0dc5d8d4e4a8aa5b88e096d309ab658c7ffe726189c28cb",
    "record/C_Qleaf_sm39h_node0.json": "72058d6368900cb11fa846d5c1a992d515b3ed6327b27361fb9a72d87a45a8a3",
    "record/C_Qleaf_sm39h_node1.json": "f9855923ef00d8f40e3f60d390a7c057b70ba20355337b84905008af463bb5ce",
    "record/C_Qleaf_sm41h_node0.json": "2bce9f2ee7dd5b8c2e9254d11a3ba5ec162c7dfa90db3aa29a5cedb8df4a13da",
    "record/C_Qleaf_sm41h_node1.json": "8c7fb17ffad71062f2728268707befb921ce65e38844d755feb36219af8e2943",
    "record/C_Roff_m11m2_node0.json": "0f5d6c254e10c1e1da40b48d7f29761f7c894429cc1722d01c5260ad19d7ca1f",
    "record/C_Roff_m11m2_node1.json": "29d0ab3aded63d0074b8feb21fea80c784f47cd1a3b296efab7fad7352b5fc21",
    "record/FIT_C_RAYS_4ray.json": "1bb36438c891e39e894888377e2759ed818f5def046dd2555fee64f3681097dd",
    "record/FIT_C_RAYS_5ray.json": "e07a4ea87f572b9cabc2354f194c3f25831277967fc0aa659f9c4a83da5dbdae",
    "record/RAY_DEGREE_BUDGET_Q_m19m18_node0.json": "af42637a0e036c256e86f6b60056c6099b860ced85f42ad1d26f3300df1448b2",
    "record/RAY_DEGREE_BUDGET_Q_m19m18_node1.json": "03c568e553e6ae6dbd30d4630f08f977cef97fc61807fc5282e2f101385e8f60",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm17_node0.json": "0adc31626d09e5cc2268790277f1d1f0c28762bd315aed176330755c14389b14",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm17_node1.json": "f7c9c72a1e184cf5cb25214d31bf7616541bac54e8100f532bb6fb23999f8c5f",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm20_node0.json": "289fe3008d9041dfb01120ece19f290cbefd4f9d547f0124509586aadace1f2e",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm20_node1.json": "c3a6d2dddbf4bf18710273442267bb287898377faa5dfad5b4353a3060d79906",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm37h_node0.json": "106096ef9d493646eb92f7838af3e49819f08c0c2cdd2956a517881c71970056",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm37h_node1.json": "f12c47e8cb9858afb473a7b5a971844a9db2af66bb3d0737dca58c0c9d443037",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm39h_node0.json": "62d14a9edc190d2da05b8f28ace3431d5f9612de3a19aa765d96d342cd55f74f",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm39h_node1.json": "8565d0022988e220885497792b06ea5b36f53e4dd5a402d4fd9fa8ced3a9281e",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm41h_node0.json": "ea2de288328d0d3bf1313e438224372d9c107c076ac5521b5791db405d2e5ab6",
    "record/RAY_DEGREE_BUDGET_Qleaf_sm41h_node1.json": "92d06102b9fc6ec1163bd0cb9222829b403a4ea59d6360763eba2372d5fc9547",
    "record/RAY_DEGREE_BUDGET_Roff_m11m2_node0.json": "3a57d076c4ff11ae5b5095613aea500ad2be0554e6b285144f20b7ea7d0dd3ae",
    "record/RAY_DEGREE_BUDGET_Roff_m11m2_node1.json": "0c43edac8b12c1ebf823cd27fcb0b251ec904e02f21c98ebe1faa4a776f22111",
    "record/RESIDUAL_Q_m19m18.json": "833e62ff0dce357cd775e1b6bf0e46cdd63fc1af3499e5713a6da78255ed8f04",
    "record/RESIDUAL_Qleaf_sm17.json": "f7e661512ebeae1fc7c835e231eb8df79ee49ab74e3448444d7a3b3b1e2fbb6c",
    "record/RESIDUAL_Qleaf_sm20.json": "d4401909c374b1b2fddebc9cfc0c2a93374ef6f24d1c88befe143189fb6efdf2",
    "record/RESIDUAL_Qleaf_sm37h.json": "8d14dcfdd4a205dc435965fc6857015c47f97ce426834add46bd3609b5ea7f6a",
    "record/RESIDUAL_Qleaf_sm39h.json": "25d56d54f4c3e2db6220316e384be4de51ce4184769bdf5f5d16cc5cbeab5020",
    "record/RESIDUAL_Qleaf_sm41h.json": "430f4a3be3854131c07ecae346529cf34ce4c13473f1b1f57b97d1ffadb64022",
    "record/RESIDUAL_Roff_m11m2.json": "12bd78a0c8537910a0b5a67c834c260d9c8f593eaad2c5b4bf5fab0fa057c909",
    "record/WITHHELD_PRED_Qleaf_sm37h.json": "27117eadfc76cd663c5eb4e2e5507d703b7f9783f0351ab300fa237e7dd2340c",
    "record/WITHHELD_PRED_Qleaf_sm39h.json": "c1dac65648185d23910835ff3986aee566bc74e8a4123296196e8c4c54a5698a",
    "record/WITHHELD_VERDICT_Qleaf_sm37h.json": "a784140ce8a5440cedf67f817bb2970080153392e53a2af446548efc2d5949b3",
    "record/WITHHELD_VERDICT_Qleaf_sm39h.json": "dff1c368b64f86efeababe051edf1dd8987e67b4402e2e303a7fae3c20ba4333",
    "record/control_C_Q_node0.json": "a0a471b8e18bcd4f2cece1e03aea20fa7d078715dfbb7106056dee839a18942e",
    "record/control_C_Q_node1.json": "ac3842cca38075d9787ec7712fef36c5e4fe702915d95d321cfa161681ae0bf1",
    "record/figures.json": "1cd1a8d763d19c0c4cb797f725af01f23113a5d0e2d576619c7554dc0626ebcf",
    "record/top/BANK_SUCCESSION_CHECK_item65_20260907T233317Z.json": "3a911f018505b72c1a59e1349b2d8ad9abe514b57ead5953ee1bcf4561045adc",
    "record/top/CTOP_Q_m19m18_node0.json": "1efa7fe477204f0ef78f794aff12c9db5682a9c9e47fd06ab9243220daf2dc43",
    "record/top/CTOP_Q_m19m18_node1.json": "aee3b79f8a61362e70ffd48b67ad652aa9992c36d2afedc35931880d55483e1c",
    "record/top/CTOP_Qleaf_sm17_node0.json": "0e0bbe959d49ff484634c29d6236bb64a0b4ef340fd703d0667eb6b768eb3118",
    "record/top/CTOP_Qleaf_sm17_node1.json": "d38d885d2cc4ecd7f12c06ee2f0b6063a51a00dec70eea7cbdac0a75ca7efcd6",
    "record/top/CTOP_Qleaf_sm20_node0.json": "50f985bc7456b9c5d8c40ca09221fe8b86881aa23f83970e8dd26aa4fdcaecec",
    "record/top/CTOP_Qleaf_sm20_node1.json": "5a77d53ec72fbcdc095c15cbc5263dc33169776d98e7ae85290d0fb26fad9384",
    "record/top/CTOP_Qleaf_sm37h_node0.json": "b5406f5fd8b56665f3599c6d680374fc2b61734d31a1828d07f7de405394a32a",
    "record/top/CTOP_Qleaf_sm37h_node1.json": "cf05667cba267916e71726f0dcbab1f9a24dfc1d7bd3bca918c508a00a274e55",
    "record/top/CTOP_Qleaf_sm39h_node0.json": "94c6f1bfeaeb38b99c216c658fae97ff2ad8c046a163fbfe220b8f5a832ad152",
    "record/top/CTOP_Qleaf_sm39h_node1.json": "a0f3df23d05defe11773aa83349f42bc0acb481722c278ce07ef329850ed0690",
    "record/top/CTOP_Qleaf_sm41h_node0.json": "72d7bb13997d2c825cb5e62dac592f7450fcd27c12d2d4f1e7c5c856c1fc6552",
    "record/top/CTOP_Qleaf_sm41h_node1.json": "13aa377f65126ea53f2d869ae2ff829b0b69e1a67a49b2781a7ac0f9fe0f8342",
    "record/top/CTOP_Rnew_m10m3_node0.json": "667d8e7e2a3ac0bd7fd63771f0de9124efb9a3996ce13eba04a85dc0d21c45ae",
    "record/top/CTOP_Rnew_m10m3_node1.json": "e183d404cd99215fbb9db0f73b84c71c5304259b85554166fb04222e7a7bcc68",
    "record/top/CTOP_Rnew_m11m3_node0.json": "66f6d635f69e88d18766f8ba6b7f2a92d43e48c1eb21ebf6fc623e59cc142d1c",
    "record/top/CTOP_Rnew_m11m3_node1.json": "07d700efbd1ed710f9c17b177327699bcac5ace7d868736dbc296b4ee2043468",
    "record/top/CTOP_Rnew_m13m2_node0.json": "dac2c4a9bdd6417a4914b6a32bd4569ff9d081d928e036000749f900168d63ef",
    "record/top/CTOP_Rnew_m13m2_node1.json": "3d31d609809a29f6807f15151b21582b616699b0cfc6e919805897c152e3a4f1",
    "record/top/CTOP_Rnew_m3m2_node0.json": "78f53dab3cdc021545e68bacc7084c17d062ad47ceeecaa01abfa6d0244999ea",
    "record/top/CTOP_Rnew_m3m2_node1.json": "651309240e13f796b3f69c997693711518354e65672afcecf21c5327c3b9050b",
    "record/top/CTOP_Rnew_m4m3_node0.json": "cf6bced2b32c25925c5829101ed3a294f112216e8627cb9523177325703d6031",
    "record/top/CTOP_Rnew_m4m3_node1.json": "7a767c77e7e8f39850c18c368d5d040990405d3e77a8c81c9b356615b3a4abdc",
    "record/top/CTOP_Rnew_m5m2_node0.json": "4eb7d8c08c893790fb3c6e110e3c75da2afcb7fea8a8de7cbffbdaca7bfb8dbf",
    "record/top/CTOP_Rnew_m5m2_node1.json": "3cf62562925296e6a79976acc1b812c9fa5fb921b3fdfed94621b794904847c9",
    "record/top/CTOP_Rnew_m5m3_node0.json": "ad1b62637e218e46d37e376d02fcfd1d74177592e3fd68309ec29d469a53e4da",
    "record/top/CTOP_Rnew_m5m3_node1.json": "1d1f9b4016e8e4287a5d03793facee9c741ff32317b59dd6e20d742f00c69af9",
    "record/top/CTOP_Rnew_m5m4_node0.json": "6dca1b0315a60a7bd75e663913f04797c43e2f0add9967eeeb1760bd976d4e68",
    "record/top/CTOP_Rnew_m5m4_node1.json": "599270236446101356e15d0dc4123e017efd38e166cc016b59bd54b7c9bcf90a",
    "record/top/CTOP_Rnew_m6m5_node0.json": "03f4431f1b2e44aa1c43f673718cbd44bd4d33b9f9237f6639e01d8338d54d8e",
    "record/top/CTOP_Rnew_m6m5_node1.json": "78e82fda1b319c1f4fdb5ccc5f2fb4c3cb71ac4eafbaa9e2c4d5aa72640d0094",
    "record/top/CTOP_Rnew_m7m2_node0.json": "63937abdd1819615c4a033da3226a2126c0ea63ff48362cc62ef0e5103ef92db",
    "record/top/CTOP_Rnew_m7m2_node1.json": "350754db7954b60964a316c60e94f1b77b0b520863763a3dd52715d6c8f74e15",
    "record/top/CTOP_Rnew_m7m3_node0.json": "4ec968fa9fc1ada0382dada3eae5c799a8ee16b19b7b7eff9fd6426680e690e4",
    "record/top/CTOP_Rnew_m7m3_node1.json": "32b9539ceb2e178303bcfbcafe15577a59f6b91168e8f7af1e8d52e399d43fee",
    "record/top/CTOP_Rnew_m7m4_node0.json": "8d6f92b8e361af466cb91c658143ea762a905f4d16fc8bccc3377e7d550be249",
    "record/top/CTOP_Rnew_m7m4_node1.json": "ce9b27a94e5eaf3dbd7ae49fbcd16445ba5235f1a19d7dd6621cae0efcd098ad",
    "record/top/CTOP_Rnew_m7m5_node0.json": "bd5a01957cbbf0afc972df5fd8388acd1ee5b94310eb854ad6727546a6b6a870",
    "record/top/CTOP_Rnew_m7m5_node1.json": "313a9a04c29f50339ef03146f801b85a390e392dfb80a84eb83c95a7eeeb47ba",
    "record/top/CTOP_Rnew_m7m6_node0.json": "e280d69fdfd0c271e27637874e1b1a9782c0c562cf460a3a2312db08cf89956f",
    "record/top/CTOP_Rnew_m7m6_node1.json": "5e662abf5c5be9c7407e869e86180f22f220618ff318827f5c310d0dc81480b2",
    "record/top/CTOP_Rnew_m8m3_node0.json": "5dd1b10335d1300696974d2b6c3dfe572966c5a2535818b0f3e0a79f2dfd67d4",
    "record/top/CTOP_Rnew_m8m3_node1.json": "bff9494ada4c7cf0af8fd59de73b10f3f193645ce60c3c8fb2279514fdfaa769",
    "record/top/CTOP_Rnew_m8m5_node0.json": "21417e5ee323b1f0290e9f695d43862a8383111e2b987524fa2b28f29f02230e",
    "record/top/CTOP_Rnew_m8m5_node1.json": "f8961dad53318cbd5d116c5ec0f803da7764989b3ead0f8eed0bf548538c81a8",
    "record/top/CTOP_Rnew_m9m2_node0.json": "7f8df67ef417e4ef0253d6af2676c3bd8fd86865515c114f89d80af26fd2a4bb",
    "record/top/CTOP_Rnew_m9m2_node1.json": "bda1ff4e64618de37a87047b8f35a9451ee828feda40618527ea87b4e01eb02f",
    "record/top/CTOP_Rnew_m9m4_node0.json": "68b15dbaffeb9d0457fcd8722354cc0960633ac8a0bdf9f359edecd934b2e0bd",
    "record/top/CTOP_Rnew_m9m4_node1.json": "38015a346d65aae98ba6d6ca2d0ad21762e13086e141b1880530ac734c9358ff",
    "record/top/CTOP_Rnew_m9m5_node0.json": "0cc5a34ed1a5d99a59e7a39008a5ffd5ba335c1b2a5b29a5e3cb31558292396e",
    "record/top/CTOP_Rnew_m9m5_node1.json": "bd5e1297df7d35f3b21e99c0ab01276b482a2e86d0e541dd71b3754ab2aae4e3",
    "record/top/CTOP_Roff_m11m2_node0.json": "60d3588b3b269fe1fc02299337d584343c5653f6bc2e4836036e9dc20df69a55",
    "record/top/CTOP_Roff_m11m2_node1.json": "bcb1e941a59009ace6c5b18bb6cc43cbd122655ff1b104809cbd7a5f33f29bf6",
    "record/top/CURLTOP_Q_m19m18_node0.json": "53552e90dbb220767c5485f9068e4a3d1f8ad112726b0449da58621cada3f165",
    "record/top/CURLTOP_Q_m19m18_node1.json": "9a0510b992312ba623c3cfb588c0d99b39012231f19f227467c5bab11f44cb81",
    "record/top/CURLTOP_Qleaf_sm17_node0.json": "15c2e8d670427e96e23553493f4501891aa7eca366f7a27397f7b54aee3d50a8",
    "record/top/CURLTOP_Qleaf_sm17_node1.json": "6a52a94208d68bdcd67480b63635b83ef0b8beb403e942233b4508180e010e56",
    "record/top/CURLTOP_Qleaf_sm20_node0.json": "1608a44ff5e02fae95692af1354cc7d4fdbadde83fd8200141332f550082b056",
    "record/top/CURLTOP_Qleaf_sm20_node1.json": "b8cb7a3b502f8de9b577ff281e56f0315fc11c9d4468cf50e5579ba214b4642a",
    "record/top/CURLTOP_Qleaf_sm37h_node0.json": "3d16d539fe170f443866815ff49c80c812efd3ae71de6cd4bd99577465fe2ce4",
    "record/top/CURLTOP_Qleaf_sm37h_node1.json": "bff8d930647b9252acf5b918bf3b0fee4d5e1063446575d36a9a8ceb33075fe4",
    "record/top/CURLTOP_Qleaf_sm39h_node0.json": "3dbc0116cd8053beb57758c553af286cad1d1f012df70e0c78f5ae0871f79cf0",
    "record/top/CURLTOP_Qleaf_sm39h_node1.json": "5a6877ffdb84d92e14c19a0d708f059e7156f1493ae69d4227fb8db56dae5590",
    "record/top/CURLTOP_Qleaf_sm41h_node0.json": "b30be89d25e2eea82e23354ebf24af6e9be956adf0c4f548283db9e9c679c4cc",
    "record/top/CURLTOP_Qleaf_sm41h_node1.json": "f02635f9a9497cf732918ac3853808e45435e19e130ed3e02de151fe5694d09e",
    "record/top/CURLTOP_Rnew_m10m3_node0.json": "c7b0737bb2aa71655d105fa2318244a5bc33961c0578078ad473a687f97e6926",
    "record/top/CURLTOP_Rnew_m10m3_node1.json": "bf5caae31e7722f8ad228d668d74dd5fecaf20ca8aac31d0bd3d94e0c7179d1f",
    "record/top/CURLTOP_Rnew_m11m3_node0.json": "55d610b7b1e6fbdd22ba15c56d1ffe5ca71a7c0c955ed172ea75b9636b9efe95",
    "record/top/CURLTOP_Rnew_m11m3_node1.json": "5648f7115f0756e958d914692abfa4cab2a6bc4eb56065c1d8586a37fb67b353",
    "record/top/CURLTOP_Rnew_m13m2_node0.json": "f626c09a8dbea1362a72d4131692a55fb521eb4d5cf07f200dead957e68d6dae",
    "record/top/CURLTOP_Rnew_m13m2_node1.json": "0ff46559d2f3388f27a1f6ba5ec1010259eec928951c8eac49013a790bb5bfbc",
    "record/top/CURLTOP_Rnew_m3m2_node0.json": "1b3ef00bbcaf04177cddf9de8de9dabc9420d8db2b58fbab2aa2e2a2d3970d26",
    "record/top/CURLTOP_Rnew_m3m2_node1.json": "6425c70a30eb16794915fb4dc4134dd3c24d9a6e0c7e62f280d56a840d838036",
    "record/top/CURLTOP_Rnew_m4m3_node0.json": "706d8293a2ca132819fdf4d1ec7f77cc759926c138eb3e0503cda0dfa5ec009a",
    "record/top/CURLTOP_Rnew_m4m3_node1.json": "3bf21b0b40c10832f24b9a21cba5c9cb0eca865641bacef248933c45bb6578df",
    "record/top/CURLTOP_Rnew_m5m2_node0.json": "f800279d16ff067ff728a4782dd29126182722d662539772e21ed07cf260ffad",
    "record/top/CURLTOP_Rnew_m5m2_node1.json": "68387d767ce2d3977bf543d332aa49c954d7a927698920cc811b61bef790f6a0",
    "record/top/CURLTOP_Rnew_m5m3_node0.json": "01bed33814a74cbe398e35c8beeb9eb42b4b22e53c54768ec8dec796d72c0edb",
    "record/top/CURLTOP_Rnew_m5m3_node1.json": "f953ea5eaaa8f5539020e99c5f6616180eb18ac0627857b6887cfc9027dc4066",
    "record/top/CURLTOP_Rnew_m5m4_node0.json": "f633522b94c17bc975f327944852e8f594a3afeb0ff8037a6725aa3caed83c2d",
    "record/top/CURLTOP_Rnew_m5m4_node1.json": "d3173a462fa04e89492c5844c651ad3ba307d6af6bd20cd79ed4d5093ffb1248",
    "record/top/CURLTOP_Rnew_m6m5_node0.json": "01ae53063e58e4f4343d511aefd4d3b1124c5b82ba2cf08f60e3efb8d26cbba5",
    "record/top/CURLTOP_Rnew_m6m5_node1.json": "f5a2eaa3e248b45386538f587f6ebe20d14fce80f8ea8ebe53381a0963323264",
    "record/top/CURLTOP_Rnew_m7m2_node0.json": "6760c549735406a9949088434d3b5d789a43ae48df44e77f350f69b13fbb7296",
    "record/top/CURLTOP_Rnew_m7m2_node1.json": "5952ae877205ccb0c82f357400330ce73dc3e3a7bfa65e687530d86077f32bdb",
    "record/top/CURLTOP_Rnew_m7m3_node0.json": "c0276164f4100f379dbaa5873986b2e9bfdbec26c16860bc2c0ee402e46d7621",
    "record/top/CURLTOP_Rnew_m7m3_node1.json": "a2439690a0085bd0b1301d1881e7431996dbe88e79f22e1efd7e6344cd1891d3",
    "record/top/CURLTOP_Rnew_m7m4_node0.json": "d682b6c28f37858e70d0a9e56f97fade6a1da282a2cbb3ebceff82ed3a36be6f",
    "record/top/CURLTOP_Rnew_m7m4_node1.json": "a3ba2ebd9645dfafd4069b22ff4a0a9e3213e72dd421a2817fb5fd934daa33d2",
    "record/top/CURLTOP_Rnew_m7m5_node0.json": "3f45bbed066be94bc58bd3c296fd798123fe6592737b5875ea0f8413c7e4079f",
    "record/top/CURLTOP_Rnew_m7m5_node1.json": "60deda3bfd72b51c4ad20a92f6585d488a6eee0958a9b0d773c5ab9e84f6993a",
    "record/top/CURLTOP_Rnew_m7m6_node0.json": "ba7a3afbbdeaf05dcbda89de4b842dc52a5158a3a4de7cc0d05762ddc8b2d1c6",
    "record/top/CURLTOP_Rnew_m7m6_node1.json": "3635e1b0a9f18d946703141aef3438f3fcb9207ce21e03abef6f5a0f5868917e",
    "record/top/CURLTOP_Rnew_m8m3_node0.json": "da689b8618d5e36acc9d991781da59aa8385fd3ba07e0d93102e5dd828496c36",
    "record/top/CURLTOP_Rnew_m8m3_node1.json": "8bd0aa2a75da7d05c4c70c72704556b0e0896e429b45ca4c33c55d4da279e81c",
    "record/top/CURLTOP_Rnew_m8m5_node0.json": "3ce7b43a40e85571273cbff5e4268fcdb871280c288c386c19c38da1f8c62afa",
    "record/top/CURLTOP_Rnew_m8m5_node1.json": "98200cabf06c82456ac98a52b52baf58f225f560122af0fc8c4af2c7cf5d5283",
    "record/top/CURLTOP_Rnew_m9m2_node0.json": "0d3ddd72a9b537b37bde8399f0ea49a2a108bb1d34686b185b580718adf595f6",
    "record/top/CURLTOP_Rnew_m9m2_node1.json": "2ae510b0954bfd4807d48ed605f7772b639a822613fe0d29919b6f9b54408579",
    "record/top/CURLTOP_Rnew_m9m4_node0.json": "83b1a3f3d7e8c17ff4222c87093cfe4481672dd20d6e1b57308beb88e59fd228",
    "record/top/CURLTOP_Rnew_m9m4_node1.json": "8b711eda488f5d69660f164e80bba4ca604c160547b2d9226dfc224f06423262",
    "record/top/CURLTOP_Rnew_m9m5_node0.json": "afe84e56d428f8a71e3fab98e136614804a4adfe84dcff5ab3b64493ef034b25",
    "record/top/CURLTOP_Rnew_m9m5_node1.json": "e985a35a46ea9944706d1e41dc5bd192c06896c94e998abe3435fee56793a3d2",
    "record/top/CURLTOP_Roff_m11m2_node0.json": "e71dd18dabcb634b32d6f2f4f653175369f5e0d0073c1045887eec1b3c51100d",
    "record/top/CURLTOP_Roff_m11m2_node1.json": "fbfe6a243de2f356c4f161d017d9971a776fcb89a0e74e3b1bcb6ae4dfa42ba7",
    "record/top/FINDING_row36_ring_item65_v2_20260908T033351Z.json": "3388518f8a15ad1651298dceed0310d38522e6d496d598d0c99d7d728cdce6b0",
    "record/top/FIT_C_RAYS_TOP_20260908T085835Z.json.gz": "228a1a800868b8cd600000d018a5ec6ce345e17bc757b84894587cdebffd71f8",
    "record/top/FIT_FORM_CONTROL_4ray_item65_20260908T034419Z.json": "1db6e05eb037f7e500829d6e50604a6fd5a99873be0317b8c780c9cec680425a",
    "record/top/FIT_FORM_CONTROL_5ray_item65_20260908T034419Z.json": "5fae37dd88a438252b0b7b47fc9c893c6df2cf37466b5886ff70c47c15b18b4e",
    "record/top/FIT_FORM_TALLY_top_pass1_item65_20260908T085839Z.json": "6d73961afa143876675a05d66a390c5d28adf8d1408ed884782f1f7e5a03e118",
    "record/top/FOLD_GATE_CORRECTED_Q_m19m18_n0_20260908T015058Z.json": "251644d5ce27310cc4f6c15b7ba96d7db20d6f418437c77440225c3f4f90a247",
    "record/top/FOLD_GATE_CORRECTED_Q_m19m18_n1_20260908T015105Z.json": "3bdab68ec236cf319269685728628e673e72c3e4726b26c4771b88cdf06d80c0",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm17_n0_20260908T014954Z.json": "a5b35c9fd82c150ef4a71d77fb83e14e4d7b8957d491a86860fb3d8afe757c24",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm17_n1_20260908T015001Z.json": "0a41c6c3972a1477a5fc312f640c058c16f7b69b63fb95b7e6d4ab324cd4e11a",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm20_n0_20260908T014941Z.json": "3cdf9fead7c0f95bfb94d2b05bd425ceb9a174f7ef975efb5ae127467b4ce726",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm20_n1_20260908T014947Z.json": "9baf45395311329f15aa199fac82146c68a08b4042db4984c6fe5ae11622ab02",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm37h_n0_20260908T015041Z.json": "354f69334eba7dbad593b2e614e67de37628cde64b82637348a38e8807b3b1b3",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm37h_n1_20260908T015050Z.json": "88d541ef67b7dd76e5cd29e5574ac9935026258dd028a95923cceaf6c1f4e8d0",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm39h_n0_20260908T015025Z.json": "5167434833d7af6d1811283141929d5092c89b72aeebba9a58aaab9e463d3ed5",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm39h_n1_20260908T015032Z.json": "e05dde0374b1b6ee59d8affe22e2d4cb9af75d1cb261d4e31d50c77ce20f4782",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm41h_n0_20260908T015009Z.json": "3a6b48a775880031a9f22ecd2d48755dbcb7cae381b5fb19986656dbc9c77ab7",
    "record/top/FOLD_GATE_CORRECTED_Qleaf_sm41h_n1_20260908T015017Z.json": "5c78cb64a500a7597adcd1bb2185de8f0cb9da7b232cbbbea9e5c5375e9e4f09",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m10m3_n0_20260908T015328Z.json": "29fc441f7ebad4fbe0fef4a990fa0ed0f64522e139ae423bedee29e717c85c7d",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m10m3_n1_20260908T015334Z.json": "6f938a5a12df07a9ab59c1da817cbb1df9a31f5cae4f0e89866eaf4d84b3ede1",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m11m3_n0_20260908T015413Z.json": "d60e00c8bd372351fd9c1f3632b7e25891ba5cfcb333bc36ea0a8068a467159e",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m11m3_n1_20260908T015418Z.json": "de42c70688af32724d3ec9610351b18433d833f8cfe9d4e1d71793791141fc4a",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m3m2_n0_20260908T015112Z.json": "051ab58d48a5060804216ef3b28c9518efd45cbf28859adf9a153fe1cd2142db",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m3m2_n1_20260908T015118Z.json": "9c659ca07205836dc1b39be149018454b5d4b49916c747b7074db88e806be1ea",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m4m3_n0_20260908T015133Z.json": "3a2ed8a5741157d64d43ee0499210a87d4eefe8e78e6966d2e8cf9ade6d15186",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m4m3_n1_20260908T015140Z.json": "72c003c70cc64982e99fe6736f11c5ce586919a8b1fb6a12164d54581b22b339",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m2_n0_20260908T015122Z.json": "5b510274b31dbec875abaeb86e1346be897fed6f9f58d5c1119dae8eede00a98",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m2_n1_20260908T015128Z.json": "dd15a51e326b9b47a6e66a70c6b281b513d052dbeb29ae866f86e65b1be9e208",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m3_n0_20260908T015146Z.json": "61e67abf027a9fda94762525f269878f673c81df4267d11599acadeedba66097",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m3_n1_20260908T015152Z.json": "5996240e144f0066f5028285044eecb43437ce369622480f056483372f90cc40",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m4_n0_20260908T015210Z.json": "5200ca36f653fa64469826881d9e8c59fe7ec511f74a3537eafdeae245ed528a",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m5m4_n1_20260908T015216Z.json": "f13d5897b9fead957de21a234a48d28bb9d632324c7b385cd644668c61a1cfe0",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m6m5_n0_20260908T015308Z.json": "acb1bbe1793540ca4eb2d9077fb9c7c0b052572f864ca4f8f55831323dd25228",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m6m5_n1_20260908T015313Z.json": "2578f67985d70db98fe9bc3e46ad804007199a0b32f3a762176db3f40721536f",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m2_n0_20260908T015157Z.json": "af351b1fa047376533d12a0ee256a0978c2aa772f560e3c0dfcc2a52e925f4c0",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m2_n1_20260908T015204Z.json": "467fbfcb983afe63da63478318dc98ccdaeb8b3402066cffc7aca09f9b301d8c",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m3_n0_20260908T015222Z.json": "9393a3668f62fbfbee5a9f05e3f8fde7c99cd76cebe82d920dde6a10d6ea047d",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m3_n1_20260908T015227Z.json": "39b882f329b0cef58df1662ddcbc83909cdc0a2d0da50956836a47ccaa10a766",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m4_n0_20260908T015255Z.json": "6eb2bf31439266f7a8d02d65d79328d7b56af15560f5f3ede00ffb78ee57656b",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m4_n1_20260908T015303Z.json": "b1dd710edb4dd892210e17b3fad7d3ee9bea5390ee63dafb4b49815df510fa5d",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m5_n0_20260908T015318Z.json": "0ac28e4b825579c24181a93ac04c5b3707dd468c3b21fec229b02393c6206d79",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m5_n1_20260908T015323Z.json": "68601a3e65349569660de3ff822bff9ef19c518942c07a0aa3eb01863250a327",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m6_n0_20260908T015402Z.json": "50723b33752c34eec5374cfb692ad2a427f7c37019464044e43048a1a951a143",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m7m6_n1_20260908T015408Z.json": "161cd733e0c9a22eb2c775991adb0de1c9354ba2d7af32c49ab4e60c5a1501a9",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m8m3_n0_20260908T015243Z.json": "73b80538399f85b7ee04d10bd510a6d7894f4f91818a53b648cf7a5a05942c37",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m8m3_n1_20260908T015248Z.json": "46c8dfd5b8c7dd71a4e9398616a66aa4168a6c8e30c088db4940eadf508f99f7",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m8m5_n0_20260908T015351Z.json": "40ce77e6e29f3d6afaa44c46bb952377b97e4e2b731536117815b7ee7a795839",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m8m5_n1_20260908T015356Z.json": "462a417a0164492008479a9e8d47d513f58b92fdaa0503d75b64c2b7bb4ea853",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m9m2_n0_20260908T015232Z.json": "bd5d72b544a4c86d3688fe814b881634d2decc92028afb279351027c72432ba7",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m9m2_n1_20260908T015237Z.json": "ea4574820ba787b2b09c82737b8f3dd333dc9a9e02f6f965c42b15cbfd56fa73",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m9m4_n0_20260908T015340Z.json": "063b18330ca9a2e78415720459b4aa6a69dc3234db1afb758a2f2aa1aa8567f0",
    "record/top/FOLD_GATE_CORRECTED_Rnew_m9m4_n1_20260908T015345Z.json": "e87eb1a42c96807ca08cd800333d82ce82485965abe6d032553fb409c8908f8b",
    "record/top/FOLD_GATE_CORRECTED_Roff_m11m2_n0_20260908T014929Z.json": "1a32c7424d5873a885d5fe952563bf8cb33029af16e8cd4f54132f0407e1a4a1",
    "record/top/FOLD_GATE_CORRECTED_Roff_m11m2_n1_20260908T014935Z.json": "d7eecdc75ad452e56d482fbaa55d01d65a60507ba9805e6c0c9bb07071e6b4c3",
    "record/top/FOLD_GATE_CORRECTED_TALLY_item65_20260908T015423Z.json": "156e1e8243a81558c8e5432784c678d16836ad9ab63e287b10652775cd6e2314",
    "record/top/HELDOUT_PRED_TOP_Rnew_m13m2_20260908T085944Z.json.gz": "cffc5d9c70fa683381d5db3d0d564a0824b7ea55030d6374f44ae8a27962a6f8",
    "record/top/HELDOUT_PRED_TOP_Rnew_m9m5_20260908T085934Z.json.gz": "819509757c2815758aae5e296a683358c45055e362cee2dab5b01c09609a7e12",
    "record/top/HELDOUT_VERDICT_TOP_Rnew_m13m2_20260908T093418Z_v2_20260908T094135Z.json": "1a7e1a26e1ee2fb8eb35b54ce7a24abc360a6e9468d1bc4d5b676eae8a0adc4a",
    "record/top/HELDOUT_VERDICT_TOP_Rnew_m9m5_20260908T093416Z_v2_20260908T094135Z.json": "ac0d675180c46ed1892e3f7474fe7b9e1275a01e551bf15e2224b0df87af8d82",
    "record/top/INDEX.json": "3f8e6d75397a8503f6ca368e3cc74b1e32b36e919eeca2f4814fc6c2a38034c9",
    "record/top/MARCH_SLICES_item65.json": "99bc2f222b3b5afcb1c4741337bf0966c2fcbedacee67f524528cf482d382184",
    "record/top/RAY_DEGREE_BUDGET_TOP_Q_m19m18_node0.json.gz": "8cfd80d516c64d54fa48dadea99bc40877db7d79b93235b16ea0cff851a95a0d",
    "record/top/RAY_DEGREE_BUDGET_TOP_Q_m19m18_node1.json.gz": "58e16e6bf92f0ebfa84cbf1556807550c7e65d0af43e1e35dd12b77d8a0d6026",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm17_node0.json.gz": "1e5e3c4b4289bb1eece64d34d506941269f3c84e00bfc7d94e20441b0e2fd4db",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm17_node1.json.gz": "d81e4a042547c0569a6434ab07868e3919018fd566aeb4ce34b0a925bbdd8dba",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm20_node0.json.gz": "4e66fa99ecf4a36f5fd34c1050897062ab5c73df80cef586171b04556a997335",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm20_node1.json.gz": "03c2c98cefffab594e0a08e691cd71bd0c919f0854687d5f801704df1d1b543d",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm37h_node0.json.gz": "18342ffd427013820c0fef6d4408dbc7a6d4afabb7f74981bccc282c741bc99c",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm37h_node1.json.gz": "3dba53683b426e43dccedaea4006d11e480e051897732c4b150d9f615ef4a6b8",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm39h_node0.json.gz": "28b1c85c1b063896fe4b79697cb529342073f2071d112a90a01b3db1fa7baff7",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm39h_node1.json.gz": "105d975c6fd0e43d1c0e3b2e515bbcfe4d3b307a964d9db8b9d2e74bb292acf2",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm41h_node0.json.gz": "5226255b2557ff7b3c54e22fec068a3c51fe184311360b2210da04fec95bae3a",
    "record/top/RAY_DEGREE_BUDGET_TOP_Qleaf_sm41h_node1.json.gz": "30fa4f3bfb184daf6340a87d7654f53ff83e49e97114539056fc7f53d56d3587",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m10m3_node0.json.gz": "8cadbdb757e5f0c9668ff13a8340be95eb173694f2c4be958f37b436f46dc749",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m10m3_node1.json.gz": "73385272bb2f367dd2fd3c0658c3e0e4ac3e36b50a4f06a3724d48eeeff68496",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m11m3_node0.json.gz": "38e45d14080e592c47ce77c80fb452691b8f2578a66ea1d4da3694627dba5fdd",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m11m3_node1.json.gz": "1d38e83e3dcee6e66641fca282e49dfd375c2018160bf4ba0ab44ac049548353",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m13m2_node0.json.gz": "5e4b9e378b970563750094469fb431a3d17cae3fda45cc157b560580d4918e7a",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m13m2_node1.json.gz": "50f498be98a26d24635940974792b8d89b56cc02c9f30c542d1c7b566d91bcf5",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m3m2_node0.json.gz": "cf955b7d6b2462686777008b44029975effea32ea8c594640beaffc9eb0352df",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m3m2_node1.json": "cb172f1a99287c32c7700ea2d448dcc93de5d2f36de4ae6dd278c80e98edda62",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m4m3_node0.json.gz": "c1d1863fc904bdbad389d646acbba16e33bde7274714aa981152f42a50a28719",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m4m3_node1.json.gz": "fdd9e71838cdd45d8e2ad3dee7b908577fdd5ad5d13ec9ba864290935cec0e66",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m2_node0.json.gz": "f674ceb24101c6fca5467ff1ead83688eab2363ce04ff7e746404f3bedbd3eb8",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m2_node1.json.gz": "66ca1ea49ff0e18696e1c91b77ee60c179d985453dafc4073b17b7573cf40623",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m3_node0.json.gz": "78291937657cbb80b5fd03d02f504e13ccf9797d63c30c04d594bc756e0d4f24",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m3_node1.json.gz": "c8d0cbdeb18c1947133c25974d5b7b3215114f7603c791db6770220d549285aa",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m4_node0.json.gz": "0c427c77969bbec030b8aceb954adfb756da083e1c7908f48a6000af9d2bea0f",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m5m4_node1.json.gz": "8feccca7b8abaa1540ee0871de587b56d3e10c7118688c92d9cc5638611868a2",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m6m5_node0.json.gz": "f3aff8001c60b6ed817fa229c91efa377bc105019b488b51e75c8c71ef058f1e",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m6m5_node1.json.gz": "c901944edcc85c60d02376fc04e833555b18be78d94afd26c1de764373cf0936",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m2_node0.json.gz": "9a36d63995911632c5244481e636ce9463560af0e9e3c8834a86cf5e752596ec",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m2_node1.json.gz": "d7f795995b08ac85bfebe504483d6856676faaf179c14f10e8af743b2d7cffa4",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m3_node0.json.gz": "9a57123f9bb04879c35848c52556304c19dc48b6fb3756f6c1d5b300be18658d",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m3_node1.json.gz": "68e3a77fe2d6aeb9c7eb0665338633d01327eb31cdd98f2c0df851c31bd7023f",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m4_node0.json.gz": "1a75801c33dd249380e86b9fc9b4931b00e3d3b00b9244f1c4afb58d2840d911",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m4_node1.json.gz": "c589dce0d550361eed8f73624f40be8a282227b85f58b865ee2d3351e63fc2a1",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m5_node0.json.gz": "bf8b262e9e1ba2f48c0f525ffa9439205de58dfc903a222fbad554529cb6ce37",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m5_node1.json.gz": "503f84fb1a848ecc1bb6968b0cdb004079942d3d99974fbf1eb19e6e52ad7d5d",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m6_node0.json.gz": "de640d2583d310727e56730c609ae311a4db6566d05fe1736c813327fd5f7401",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m7m6_node1.json.gz": "b314062ba765b421d8f66d914a3184a7956d959f1cabd8f836edba9aeffef0b6",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m8m3_node0.json.gz": "6b519df5e713e5e7ebad4620701e96d18a2fced9a1162774d6f0883c56de287d",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m8m3_node1.json.gz": "b30c2fd96d2460e4780e4b66b2ddc704e13d5adb7415684f0b56f5f87875a507",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m8m5_node0.json.gz": "792a90909e4db6855080b9ae765425c04ab96b8de7325f0030d1dc3e41b71490",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m8m5_node1.json.gz": "e207762407b64569e639fad95afbefdfbe4081fb6bc1ef566ca303ab06cfb061",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m2_node0.json.gz": "945799a85c85bcdcf53b4394d3f426861e433ef320ccb3a439585ed3407975dd",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m2_node1.json.gz": "8edd7b2b66d5fe31e89a94eaf93e8af0eeeff429c218907db3bad4536d701d90",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m4_node0.json.gz": "5a9578cad6d14151df7cff303bd0865b905a0080711877cba3014494eb481a06",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m4_node1.json.gz": "23ac7a23443a902c26cdd94a76473f65e62b057d2a5ee26a6aaf37b8b635a49b",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m5_node0.json.gz": "168a7bc93b0fd4f220dfa57acf3b4c07f9c4324b41f61bb1dce3c1062df0eef0",
    "record/top/RAY_DEGREE_BUDGET_TOP_Rnew_m9m5_node1.json.gz": "9393f8dc6561d576aba6c2ad95e55079330d9d3e2d1ffc0ce70e19d458d4c521",
    "record/top/RAY_DEGREE_BUDGET_TOP_Roff_m11m2_all22_node0.json.gz": "3dbad773a1f69a6bb106fa9e1a19f78b7f020c279a711d88cd3365b5c69bcef3",
    "record/top/RAY_DEGREE_BUDGET_TOP_Roff_m11m2_node0.json.gz": "67c652c623f5d00f5c34ce4e69ae2801ba4735ca0a3cf54596fcea1502b289f2",
    "record/top/RAY_DEGREE_BUDGET_TOP_Roff_m11m2_node1.json.gz": "393f2ddd28159b420304a6304e81ca06eef8ec2e80499a239f8492d328afa250",
    "record/top/RAY_DESIGN_item65_20260907T184938Z.json": "4605568e3e70e5a2f0198825700c4299d17acc6ccca207501418a39414f2154d",
    "record/top/RESIDUAL_COMPUTABILITY_item65_20260907T235904Z.json": "b945ff4aedd664df1e091db89dd2a4ad2cb45fe3d0f0de89927d684fa6f88db8",
    "record/top/RESIDUAL_TALLY_OVERLAP_item65_20260908T100254Z.json": "5b4f3c3943ab14045f97c98a2a7cbbe3766c8a93621bfed16a95e18dd5bb2ef9",
    "record/top/RESIDUAL_TALLY_item65_20260908T095423Z.json": "a02a9df1a727756553d67a371cc6cb82ce4bb6f968ef3ca1b53de7b50acf7e78",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Q_m19m18_20260908T094032Z.json": "9fd6e1a4d051cc2da4766ccf1bb43bf3252c6ccb83814f7ecdd0ad7d0143a933",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Qleaf_sm17_20260908T093651Z.json": "046dda6a6702c2797bc5bb87e3a6a036823cbcb89e4d2f98cfdcc309336a4617",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Qleaf_sm20_20260908T093556Z.json": "3b843dcbf6e3c3079cc13e5dbc5464468f3dc06e66f0c86f5437919dd95cc81c",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Qleaf_sm37h_20260908T093947Z.json": "67f4332f364e097b432c934713652e7f2ecfdd9fda81a44aead2fe3de89f0f8b",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Qleaf_sm39h_20260908T093847Z.json": "102b94361e8a79a1361f49fd5f7c75b31e6cb19b09273901d55fef66243ac7dc",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Qleaf_sm41h_20260908T093751Z.json": "a79e4e80c2226690c203b96686b891714abc50197d48c02ef4a2ddeef1b18aaa",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m10m3_20260908T094945Z.json": "90510a306549f51d08d5f893f1770db5cc21193fae1d293211320b7262cc8c71",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m11m3_20260908T095236Z.json": "4bf397517385d245490acb007b5a9ad6db1083a86d85e5f657d524afb25e7ce1",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m13m2_20260908T095404Z.json": "b39da8648b537e83ad278e9336a4d12aeb70c5a524eb1552af3192e5ca868b9b",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m3m2_20260908T094117Z.json": "dd38aec2000f37cf519ab3a506c22703e145bfee8470616f7dbdfd4082ff528b",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m4m3_20260908T094238Z.json": "d222ade35681bdc1edcbe78f8da77b41c1bc87cdc1c2d77c5388ca3b7992c467",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m5m2_20260908T094157Z.json": "279bb4c894c5cab955beb482b2a15f2cc0874d776c054bd443e1e16d26fb948a",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m5m3_20260908T094318Z.json": "35c433b8c4f640a087334aaf46ce31f3fe4b4199e2135b323b56e2671d3eeb3a",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m5m4_20260908T094441Z.json": "c89eaebdd7b1b0b769de20468501c59453aa5935c2645f131b1688582d5a16fe",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m6m5_20260908T094819Z.json": "b958e992904be776c9f64f8961dc180abe4a53696751c063ae68f38790bf0eaf",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m7m2_20260908T094400Z.json": "b6a94b9f2c22c7ba2e7fb877dc3128548c6d9204d15dc4c5821cdaf3e45d0469",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m7m3_20260908T094525Z.json": "d7101d2d8031874d72f5a1eb3771667ac65bcc8c001c7867d0c3e0b4f209ace4",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m7m4_20260908T094735Z.json": "555112ac737369d19394160e92fb64be6b18ecfa71361b6caf7bfcf441ab18ee",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m7m5_20260908T094901Z.json": "e37156db0e35f0ce3887a07ce87b794c5f32d98ea567f16c6a373486d5d2ba39",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m7m6_20260908T095153Z.json": "12b2b9f5471e320826cbbcd785577901a18f19eceeee94da376a3897e67f0f5e",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m8m3_20260908T094654Z.json": "371ac71f9b8f135c36216a19d0e24932ddfcbed90f1ab8d0df33558e8023752d",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m8m5_20260908T095110Z.json": "55615ce43d72809bed7859f7228c0542d1d70c9cfc7bf4ed611f5da7a0d96ff6",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m9m2_20260908T094609Z.json": "c0b94c4f2e51a0b6fefc4dc508bc12570a7e08234c7d005ad0244b2d1e8e08b3",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m9m4_20260908T095027Z.json": "4305be5c4d33ca79cfc8e47c236b21b151d8a0ad701446db200ccca5d77306f5",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Rnew_m9m5_20260908T095321Z.json": "16b4d6b3e06ba7e0f236a3af8477a7da68823d85c0b32915ca1673804aee95b7",
    "record/top/TOP_BLOCK_EXACT_RESIDUAL_Roff_m11m2_20260908T093502Z.json": "8d465ff4db4e93b3b225e9d11e49e367016c313b0d326f7fd2eacb02a468ffcd",
    "record/top/UNDERDETERMINED_CLASS_item65_20260908T085911Z.json": "d4e114fd415e6726e1e76587dece198db963b5e8b2532bb1af897395d11be576",
    "record/unclosed40.json": "36322a7fe4aa93e1bdd05d3a5fa7a9e74941f86b7c166c514cfcb693b0f2f53f",
}
# --- END PINS ---

# measured walls and maximum resident set (GNU time, the delivered bytes; written by the build from its captures)
WALLS = {
    "default (--point Q_record --leg all: assemble + curl + verdict, the shipped slice)": "23.81 s (max RSS of a leg 173 MB over 4 legs)",
    "default with --bank (the full bank of record, 4184 column records)": "103.92 s (max RSS of a leg 5768 MB over 4 legs)",
    "--point leaf_s-20 (a regenerated point: assemble + curl + verdict)": "26.80 s (max RSS of a leg 200 MB over 4 legs)",
    "--point real_s-11_t-2 (the real-chamber point)": "20.23 s (max RSS of a leg 158 MB over 4 legs)",
    "--leg chain (the whole seven-point program)": "403.75 s (max RSS of a leg 223 MB over 49 legs)",
    "--leg fit (the five-ray fit on the shipped ray functions)": "2.15 s (max RSS of a leg 36 MB over 1 legs)",
    "--leg fit --rays <the first four> (the 4-ray control fit)": "1.62 s (max RSS of a leg 35 MB over 1 legs)",
    "--leg budget --point Q_record (the ray budget at Q, both nodes)": "24.01 s (max RSS of a leg 137 MB over 2 legs)",
    "--leg fd (the three-point leaf stencil at Q, shipped inputs)": "0.41 s (max RSS of a leg 31 MB over 1 legs)",
    "--leg predict --point leaf_s-19.5": "0.31 s (max RSS of a leg 36 MB over 1 legs)",
    "--leg verify --point leaf_s-19.5": "0.31 s (max RSS of a leg 34 MB over 1 legs)",
    "--leg residual --point leaf_s-18.5": "0.33 s (max RSS of a leg 36 MB over 1 legs)",
    "--check (the second implementation at dps 150 and 200 at Q)": "30.11 s (max RSS of a leg 173 MB over 6 legs)",
    "--mutate (the planted control at Q)": "14.46 s (max RSS of a leg 135 MB over 1 legs)",
}
# measured walls and maximum resident set of the TOP-BLOCK tiers (GNU time, the delivered bytes; written by the build from its captures)
WALLS_TOP = {
    "--top (tally-top: the figures of record from the shipped objects, no leg run)": "1.98 s (max RSS 402 MB)",
    "--leg findings": "3.20 s (max RSS 402 MB)",
    "--leg fit-top (the tally of record from the fit file)": "1.94 s (max RSS 402 MB)",
    "--leg fold-gate --point all (the 48 shipped receipts recomputed)": "0.42 s (max RSS 32 MB)",
    "--leg fit-control (five rays, rows 0-16)": "2.81 s (max RSS 35 MB)",
    "--leg fit-control --rays <the first four>": "2.09 s (max RSS 36 MB)",
    "--leg predict-top --point real_s-9_t-5 (the fit of record decompressed and read)": "10.80 s (max RSS 409 MB)",
    "--leg verify-top --point real_s-9_t-5": "1.72 s (max RSS 65 MB)",
    "--leg residual-top --point real_s-11_t-2 (the objects from record/top/)": "44.33 s (max RSS 410 MB)",
    "--leg residual-top --point all (26 points, the tally, the overlap)": "1227.06 s (max RSS 411 MB)",
    "--leg fit-top --spot (6 entry-node cases at ZMAX 13)": "992.01 s (max RSS 401 MB)",
    "--mutate-top (the verify form)": "1.97 s (max RSS 65 MB)",
    "--mutate-top --leg fit-top (the spot form)": "1628.09 s (max RSS 401 MB)",
    "--leg march-top, one (point, node) item: assemble-top": "288.20 s (max RSS 443 MB)",
    "--leg march-top, one item: budget-top": "30.64 s (max RSS 442 MB)",
    "--leg march-top, one item: curl-top": "2.64 s (max RSS 61 MB)",
}


def sha256_file(p):
    h = hashlib.sha256()
    with open(p, "rb") as f:
        for ch in iter(lambda: f.read(1 << 22), b""):
            h.update(ch)
    return h.hexdigest()


def sha256_gz_content(p):
    h = hashlib.sha256()
    with gzip.open(p, "rb") as f:
        for ch in iter(lambda: f.read(1 << 22), b""):
            h.update(ch)
    return h.hexdigest()


def utc():
    return subprocess.run(["date", "-u", "+%Y-%m-%dT%H:%M:%SZ"], capture_output=True, text=True).stdout.strip()


def die(rc, msg):
    print(msg, flush=True)
    sys.exit(rc)


def check_pins():
    for rel, want in PINS.items():
        p = os.path.join(HERE, rel)
        if not os.path.exists(p):
            die(RC_MISSING, f"row21-offcurve-evaluate MISSING: pinned file {rel} is absent (recorded sha256 {want}); not serving")
        got = sha256_file(p)
        if got != want:
            pos = next(i + 1 for i in range(64) if got[i] != want[i])
            die(RC_REFUSED, f"row21-offcurve-evaluate REFUSED: {rel} integrity pin mismatch (recorded {want}, recomputed {got}; "
                            f"first differing hex position {pos} of 64, 1-based) -- the shipped file was altered; not serving")
    return len(PINS)


def load_pref(path):
    out = []
    for L_ in open(path):
        L_ = L_.split("#")[0].strip()
        if L_:
            out.append(tuple(int(x) for x in L_[L_.index("[") + 1:L_.index("]")].split(",")))
    return out


class Run:
    """the state of one invocation: the working directory, the record figures, the comparison tally."""

    def __init__(self, args):
        self.args = args
        self.pts = json.load(open(os.path.join(POINTS, "points.json")))
        self.fig = json.load(open(os.path.join(RECORD, "figures.json")))
        self.label2tag = dict(self.pts["labels"])                      # label -> tag
        self.label2tag.update({k: k for k in self.pts["labels"].values()})   # the tags themselves
        self.work = os.path.abspath(args.workdir) if args.workdir else tempfile.mkdtemp(prefix="row21-offcurve-")
        self.ck = os.path.join(self.work, "ck")
        os.makedirs(self.ck, exist_ok=True)
        os.makedirs(os.path.join(self.work, "RECEIPTS"), exist_ok=True)
        self.nodes = [int(x) for x in args.nodes.split(",")]
        self.n_fail = 0
        self.n_cmp = 0
        self.legs = []
        self.inputs_from_record = []
        self.env = dict(os.environ)
        self.env["PYTHONDONTWRITEBYTECODE"] = "1"
        if args.bank:
            self.env["ROW21_OFFCURVE_BANK"] = os.path.abspath(args.bank)
        self.gnu_time = os.path.exists("/usr/bin/time")
        self.last_end = 0.0

    def tag_of(self, label):
        if label not in self.label2tag:
            die(RC_USAGE, f"row21-offcurve-evaluate: unknown point {label!r}; the points are {sorted(self.pts['labels'])} (or the record's tags {sorted(self.pts['labels'].values())})")
        return self.label2tag[label]

    def point(self, tag):
        p = self.pts["points"][tag]
        return p["s"], p["t"]

    def cmp(self, what, this, record, note=""):
        """print a figure beside the record's; count the mismatches."""
        self.n_cmp += 1
        same = this == record
        if not same:
            self.n_fail += 1
        print(f"    {what}: {this}{'' if same else '  != record ' + json.dumps(record)}{'  == record' if same else ''}{note}", flush=True)
        return same

    def run_leg(self, name, script, argv, tag_line=""):
        """one vendored leg as a subprocess (cwd = the working directory); rc != 0 -> rc 5 with the last line."""
        cmd = [sys.executable, os.path.join(CHAIN, script)] + argv
        tfile = None
        if self.gnu_time:
            tfile = os.path.join(self.work, f".time_{name}_{len(self.legs)}")
            cmd = ["/usr/bin/time", "-f", "WALL %e s MAXRSS %M KB", "-o", tfile] + cmd
        print(f"  [{name}] {script} {' '.join(os.path.relpath(a, self.work) if a.startswith(self.work) else (os.path.relpath(a, HERE) if a.startswith(HERE) else a) for a in argv)}{tag_line}", flush=True)
        # the legs stamp their receipts to the second and open them O_EXCL (never overwrite): as the chain of record did
        # (`sleep 1` between legs), start no leg within the same second as the previous one ended
        time.sleep(max(0.0, 1.05 - (time.time() - self.last_end)))
        t0 = time.time()
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, cwd=self.work, env=self.env)
        lines = []
        for ln in p.stdout:
            ln = ln.rstrip("\n")
            lines.append(ln)
            if ln.startswith("[") and "] " in ln:
                ln_show = ln.split("] ", 1)[1]
            else:
                ln_show = ln
            print(f"    [{name}] {ln_show[:400]}", flush=True)
        rc = p.wait()
        self.last_end = time.time()
        wall = round(time.time() - t0, 2)
        maxrss = None
        if tfile and os.path.exists(tfile):
            m = re.search(r"WALL ([\d.]+) s MAXRSS (\d+) KB", open(tfile).read())
            if m:
                wall, maxrss = float(m.group(1)), int(m.group(2))
            os.remove(tfile)
        self.legs.append({"leg": name, "script": script, "rc": rc, "wall_s": wall, "maxrss_kB": maxrss, "last": lines[-1][:300] if lines else ""})
        print(f"    [{name}] rc {rc}; wall {wall} s" + (f"; maximum resident set {maxrss / 1024:.0f} MB" if maxrss else ""), flush=True)
        if rc != 0:
            die(RC_LEG, f"row21-offcurve-evaluate LEG {name} ({script}) did not finish: rc {rc}; last line: {lines[-1][:300] if lines else ''!r}")
        return lines

    # ---- inputs: the working directory first, else the shipped record copy (said by name)
    def ensure(self, name, kind):
        p = os.path.join(self.ck, name)
        if os.path.exists(p):
            return p, "computed here"
        src = os.path.join(RECORD, name)
        if not os.path.exists(src):
            die(RC_USAGE, f"row21-offcurve-evaluate: {name} is neither in the working directory nor shipped under record/; run the {kind} leg first")
        shutil.copyfile(src, p)
        self.inputs_from_record.append(name)
        print(f"    [input] {name} taken from the shipped record copy (not computed in this run)", flush=True)
        return p, "from the shipped record"

    # ---- the legs
    def gate0(self, tag):
        d = os.path.join(POINTS, tag)
        pt = self.pts["points"][tag]
        s, t = self.point(tag)
        print(f"\n[point] {pt['label']} = {tag}: (s, t) = ({s}, {t}), u = {pt['u']}, leaf 1/s + 1/t = {pt['leaf_1_over_s_plus_1_over_t']}; {pt['chamber']}; {pt['role']}", flush=True)
        m2 = os.path.join(d, pt["m2de_file"])
        t0 = time.time()
        got = sha256_gz_content(m2)
        ok_sha = got == pt["m2de_sha256_uncompressed"]
        pref = load_pref(os.path.join(d, "preferred39"))
        mfin = load_pref(os.path.join(d, "results", "LBL3X", "masters.final"))
        ok_basis = pref == mfin and len(pref) == 39
        gate = open(os.path.join(d, "gate.txt")).read().split("\n")
        ok_unred = gate[0] == "unreduced integrals: 0."
        done = None
        if os.path.exists(os.path.join(d, "DONE")):
            done = open(os.path.join(d, "DONE")).read().split()
            ok_sha = ok_sha and done[2] == got
        print(f"  [gate 0] m^2-DE reduction {os.path.basename(pt['m2de_file'])}: {pt['m2de_bytes_uncompressed']} bytes uncompressed, sha256 {got[:16]}... "
              f"{'== the recorded sha256' + (' == the DONE marker' if done else '') if ok_sha else 'MISMATCH'}; masters.final == preferred39 (39 masters, the stale-basis STOP rule): {ok_basis}; "
              f"'{gate[0]}': {ok_unred}; total reduction time of record {gate[2].strip('() ') if len(gate) > 2 else '?'}"
              + (f"; recorded arrival: wall {pt['arrival'].get('wall_s')} s, maximum resident set {pt['arrival'].get('maxrss_kB')} kB, cores received {pt['arrival'].get('cores_received_mean')}" if done else "")
              + f" ({time.time() - t0:.1f} s)", flush=True)
        if not (ok_sha and ok_basis and ok_unred):
            self.n_fail += 1
            die(RC_FAIL, f"row21-offcurve-evaluate FAIL at gate 0 for {tag}: sha {ok_sha}, basis {ok_basis}, unreduced {ok_unred}")
        return m2

    def mutate_m2de(self, tag, m2gz):
        """the planted control: one digit of one coefficient in the reduction of a target that row 0..16 reads, on a copy."""
        pref = load_pref(os.path.join(POINTS, tag, "preferred39"))
        targets = set()
        for i in range(17):
            m = pref[i]
            for l in range(4):
                if m[l]:
                    sh = list(m); sh[l] += 1; targets.add(tuple(sh))
        txt = gzip.open(m2gz, "rt").read()
        for mm in re.finditer(r"LBL3X\[([0-9,\-]+)\] -> ", txt):
            idx = tuple(int(x) for x in mm.group(1).split(","))
            if idx in targets:
                start = mm.end()
                seg_end = txt.find("\n,", start)
                seg = txt[start:seg_end]
                k = seg.find("*(")
                q = re.compile(r"\d")
                m2 = q.search(seg, k + 2)
                pos = start + m2.start()
                old = txt[pos]
                new = str((int(old) + 1) % 10) if old != "9" else "8"
                out = os.path.join(self.work, f"mutated_{tag}_kira_target_dm2.m")
                open(out, "w").write(txt[:pos] + new + txt[pos + 1:])
                print(f"  [MUTATION CONTROL] the reduction of target {list(idx)} (a shifted master of rows 0..16) has one coefficient digit changed "
                      f"'{old}' -> '{new}' at character {pos} of the m^2-DE text, on a copy; expected: the scaling-identity gate FAILS by name", flush=True)
                return out, idx, old, new
        die(RC_USAGE, "mutate: no target of rows 0..16 found in the reduction")

    def assemble(self, tag, mutate=False):
        m2 = self.gate0(tag)
        m2use = m2
        planted = None
        if mutate:
            m2use, idx, old, new = self.mutate_m2de(tag, m2)
            planted = {"target": list(idx), "old": old, "new": new}
        s, t = self.point(tag)
        argv = ["--tag", tag, "--point-dir", os.path.join(POINTS, tag), f"--point={s},{t}", "--nodes", ",".join(map(str, self.nodes)), "--m2de-file", m2use, "--out-dir", self.ck]
        if tag == "Q_m19m18":
            argv += ["--control", os.path.join(RECORD, "control_C_Q_node{n}.json")]
        lines = self.run_leg("assemble", "assemble_C.py", argv)
        res = {}
        for n in self.nodes:
            c = json.load(open(os.path.join(self.ck, f"C_{tag}_node{n}.json")))
            r = self.fig["points"][tag][f"node{n}"]
            g = c["gate_predicted_zero_rows"]
            print(f"  [assemble] node {n} (d = {c['d']}): the scaling identity on rows 0..16 -- C-free rows exactly zero {g['pass_exact_zero']}, nonzero {g['FAIL_nonzero']} -> gate {g['verdict']}; "
                  f"leak rows {c['leak_rows_with_corrected_pair']}; reduced targets in the file {c['m2de_assembly']['n_reduced_targets_in_file']}, nonzero A_m2 entries {c['m2de_assembly']['n_nonzero_Am2_entries']}", flush=True)
            if mutate:
                res[n] = {"gate": g["verdict"], "fail_rows": g["FAIL_nonzero"]}
                continue
            self.cmp("gate: C-free rows exactly zero", g["pass_exact_zero"], r["gate_pass"])
            self.cmp("gate: rows with nonzero C among the predicted-zero", g["FAIL_nonzero"], r["gate_fail"])
            self.cmp("leak rows", c["leak_rows_with_corrected_pair"], r["leak_rows"])
            self.cmp("reduced targets in the m^2-DE file", c["m2de_assembly"]["n_reduced_targets_in_file"], r["n_reduced_targets_in_file"])
            if tag == "Q_m19m18":
                ctl = c.get("positive_control_vs_prep_stage2") or {}
                self.cmp("positive control vs the first implementation at Q (C rows and corrected rows string for string)", ctl.get("PASS"), r["control_PASS"])
            rec = json.load(open(os.path.join(RECORD, f"C_{tag}_node{n}.json")))
            same_rows = sum(1 for i in range(17) if all(rec["rows"][str(i)].get(k) == c["rows"][str(i)].get(k) for k in ("C_row_str", "corrected_A_s_row_str", "corrected_A_t_row_str", "C_row_nonzero_cols")))
            same_jets = all(rec["raw_pair_jets_rows0_16"][v] == c["raw_pair_jets_rows0_16"][v] for v in ("s", "t"))
            self.cmp("C rows + corrected rows string for string vs the record's C at this point (17 rows)", same_rows, 17)
            self.cmp("raw pair jets on rows 0..16 identical to the record's", same_jets, True)
            res[n] = {"gate": g["verdict"], "leak_rows": c["leak_rows_with_corrected_pair"], "rows_identical": same_rows, "jets_identical": same_jets}
        return res, planted

    def curl(self, tag, dps=150, outdir=None):
        s, t = self.point(tag)
        pt = self.pts["points"][tag]
        outdir = outdir or self.ck
        res = {}
        for n in self.nodes:
            argv = ["--tag", tag, f"--point={s},{t}", "--nodes", str(n), "--point-dir", os.path.join(POINTS, tag), "--m2de-file", os.path.join(POINTS, tag, pt["m2de_file"]), "--dps", str(dps), "--out-dir", outdir]
            self.run_leg("curl", "curl_two_impl.py", argv)
            k = json.load(open(os.path.join(outdir, f"CURL_{tag}_node{n}.json")))
            r = self.fig["points"][tag][f"node{n}"]
            vr = k["verdict_rows"]
            i2 = k["impl2_maxcut_de_transport"]
            print(f"  [curl] node {n} (d = {k['d']}, dps {dps}): tested rows {vr['tested_rows']}; not-flat rows {vr['not_flat_rows']}; the raw pair fails on {vr['raw_pair_failing_rows_among_tested']}, "
                  f"cured by the correction {vr['rows_cured_by_the_correction']}; entries tested exactly {k['impl1_exact']['n_entries_tested']}, nonzero {k['impl1_exact']['n_nonzero']}; "
                  f"second implementation agrees to {i2['worst_agreement_digits_with_impl1_on_tested_rows']:.2f} digits; identity control at dps {dps}: {i2['scaling_identity_positive_control_dps150']['PASS']} -> {k['verdict_at_this_point_on_tested_rows']}", flush=True)
            self.cmp("not-flat rows", vr["not_flat_rows"], r["curl_not_flat_rows"])
            self.cmp("raw pair failing rows", vr["raw_pair_failing_rows_among_tested"], r["curl_raw_failing_rows"])
            self.cmp("rows cured by the correction", vr["rows_cured_by_the_correction"], r["curl_rows_cured"])
            self.cmp("verdict on the tested rows", k["verdict_at_this_point_on_tested_rows"], r["curl_verdict"])
            self.cmp("identity control PASS", i2["scaling_identity_positive_control_dps150"]["PASS"], r["curl_identity_control_PASS"])
            ag = i2["worst_agreement_digits_with_impl1_on_tested_rows"]
            if dps == 150:
                self.cmp("second-implementation agreement digits", ag, r["curl_impl2_agreement_digits"])
            ok_bar = ag >= 90
            self.cmp("agreement >= 90 digits (the record's bar)", ok_bar, True)
            rec = json.load(open(os.path.join(RECORD, f"CURL_{tag}_node{n}.json")))
            pe, rpe = k["per_entry_(nonzero_exact_or_raw)"], rec["per_entry_(nonzero_exact_or_raw)"]
            same = sum(1 for kk in rpe if kk in pe and pe[kk]["R_corrected_exact"] == rpe[kk]["R_corrected_exact"] and pe[kk]["R_raw_exact"] == rpe[kk]["R_raw_exact"])
            if dps == 150:
                self.cmp("per-entry residues (corrected and raw, exact strings) equal to the record's", same, len(rpe))
            res[n] = {"not_flat": vr["not_flat_rows"], "agreement_digits": ag, "identity_control": i2["scaling_identity_positive_control_dps150"]["PASS"], "verdict": k["verdict_at_this_point_on_tested_rows"], "per_entry_identical": same, "of": len(rpe)}
        return res

    def verdict(self, tags):
        argv = ["--tags", ",".join(tags), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work]
        lines = self.run_leg("verdict", "emit_verdict.py", argv)
        v = next(l for l in lines if l.startswith("VERDICT: "))[len("VERDICT: "):]
        print(f"  [verdict] {v}", flush=True)
        self.cmp("the verdict line", v, self.fig["verdict_line"])
        return v

    def budget(self, tag):
        s, t = self.point(tag)
        pt = self.pts["points"][tag]
        res = {}
        for n in self.nodes:
            argv = ["--tag", tag, "--point-dir", os.path.join(POINTS, tag), f"--point={s},{t}", "--nodes", str(n), "--m2de-file", os.path.join(POINTS, tag, pt["m2de_file"]), "--out-dir", self.ck]
            if tag == "Q_m19m18":
                argv += ["--control", os.path.join(RECORD, "control_C_Q_node{n}.json")]
            self.run_leg("budget", "ray_degree_budget.py", argv)
            b = json.load(open(os.path.join(self.ck, f"RAY_DEGREE_BUDGET_{tag}_node{n}.json")))
            r = self.fig["points"][tag][f"node{n}"]
            g = b["gate_predicted_zero_rows_identically_along_the_ray"]
            print(f"  [budget] node {n}: along the ray through the point the C-free rows vanish identically {g['pass']} (FAIL {g['FAIL']}); leak entries {b['n_leak_entries']}; "
                  f"B_N = {b['B_N_max_numerator_degree_along_the_ray']}, B_D = {b['B_D_max_denominator_degree_along_the_ray']} -> rays for the exact fit {b['point_budget']['rays_for_an_exact_bivariate_C_on_the_leak_rows']} (+ {b['point_budget']['plus_withheld_rays']} withheld)", flush=True)
            self.cmp("C-free rows identically zero along the ray", g["pass"], r["budget_identically_zero_rows"])
            self.cmp("rows failing the ray gate", g["FAIL"], r["budget_FAIL"])
            self.cmp("leak entries", b["n_leak_entries"], r["budget_n_leak_entries"])
            self.cmp("B_N, B_D", [b["B_N_max_numerator_degree_along_the_ray"], b["B_D_max_denominator_degree_along_the_ray"]], [r["B_N"], r["B_D"]])
            rec = json.load(open(os.path.join(RECORD, f"RAY_DEGREE_BUDGET_{tag}_node{n}.json")))
            same = n_all = 0
            for i, rr in rec["rows"].items():
                for j, rf in rr.get("C_ray_functions", {}).items():
                    n_all += 1
                    mine = b["rows"].get(i, {}).get("C_ray_functions", {}).get(j)
                    same += (mine is not None and mine["num"] == rf["num"] and mine["den"] == rf["den"])
            self.cmp("leak-row ray functions (numerator and denominator coefficients) equal to the record's", same, n_all)
            if tag == "Q_m19m18":
                self.cmp("positive control at lambda = 1 vs the first implementation", (b.get("positive_control_vs_prep_stage2") or {}).get("PASS"), True)
            res[n] = {"identically_zero": g["pass"], "FAIL": g["FAIL"], "B_N": b["B_N_max_numerator_degree_along_the_ray"], "B_D": b["B_D_max_denominator_degree_along_the_ray"], "ray_functions_identical": same, "of": n_all}
        return res

    def fd(self):
        for tag in LEAF3:
            for n in self.nodes:
                self.ensure(f"C_{tag}_node{n}.json", "assemble")
                self.ensure(f"RAY_DEGREE_BUDGET_{tag}_node{n}.json", "budget")
        lines = self.run_leg("fd", "leaf_fd_leak.py", ["--nodes", ",".join(map(str, self.nodes)), "--work", self.work])
        p = sorted(glob.glob(os.path.join(self.work, "RECEIPTS", "LEAK_ROW_FD_ESTIMATE_*.json")))[-1]
        d = json.load(open(p))
        r = self.fig["fd"]
        print(f"  [fd] the three-point leaf stencil at Q (the finite-difference ESTIMATE that preceded the exact fit; a control here): {d['verdict']}", flush=True)
        for n in self.nodes:
            x = d["per_node"][str(n)]; rr = r["nodes"][str(n)]
            self.cmp(f"node {n}: C-free rows control", x["positive_control_C_free_rows"]["PASS"], rr["ctrl_C_free_PASS"])
            self.cmp(f"node {n}: stencil residues within their bar", [x["stencil_3pt"]["n_within_error_bar"], x["n_residues"]], [rr["stencil_within"], rr["n_residues"]])
            self.cmp(f"node {n}: Hermite-2D residues within their bar", [x["hermite_2d_verdict"]["n_within_error_bar"], x["n_residues"]], [rr["hermite_within"], rr["n_residues"]])
            self.cmp(f"node {n}: worst |R|/|LC| (stencil, Hermite-2D)", [x["stencil_3pt"]["worst_abs_R_over_abs_LC"], x["hermite_2d_verdict"]["worst_abs_R_over_abs_LC"]], [rr["worst_ratio_stencil"], rr["worst_ratio_hermite"]])
        self.cmp("the ray budget restated (B_N, rays, withheld)", [d["exact_budget_restated"]["B_N_max_over_landed_rays"], d["exact_budget_restated"]["rays_for_an_exact_bivariate_C_on_the_leak_rows"], d["exact_budget_restated"]["plus_withheld_rays"]],
                 [r["budget"]["B_N_max_over_landed_rays"], r["budget"]["rays_for_an_exact_bivariate_C_on_the_leak_rows"], r["budget"]["plus_withheld_rays"]])
        return p

    def fit(self, rays):
        for tag in rays:
            for n in self.nodes:
                self.ensure(f"RAY_DEGREE_BUDGET_{tag}_node{n}.json", "budget")
        lines = self.run_leg("fit", "fit_C_rays.py", ["--fit", "--tags", ",".join(rays), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work])
        p = next(l for l in lines if l.startswith("FIT_FILE="))[len("FIT_FILE="):]
        f = json.load(open(p))
        which = "fit_5ray" if rays == FIT_RAYS else ("fit_4ray" if rays == FIT_RAYS[:4] else None)
        recf = json.load(open(os.path.join(RECORD, "FIT_C_RAYS_5ray.json" if which == "fit_5ray" else "FIT_C_RAYS_4ray.json"))) if which else None
        res = {}
        for n in self.nodes:
            v = f["nodes"][str(n)]
            c = v["counts"]; loo = v["control_b_blind_leave_one_out"]
            print(f"  [fit] node {n} (d = {v['d']}): {len(rays)} rays, {v['n_leak_entries']} leak entries: DETERMINED {c['entries_DETERMINED']}, UNDERDETERMINED {c['entries_UNDERDETERMINED']}, REFUSED {c['entries_REFUSED']}; "
                  f"components {c['components_total']} (consistent {c['components_consistent']}, with redundancy {c['components_with_redundancy']}); C-free rows identically zero on every ray {v['control_a_C_free_rows']['PASS']}; "
                  f"blind leave-one-out {loo['n_exact']}/{loo['n_predictions']} exact (cases {loo.get('n_cases_PASS')}/{loo.get('n_left_out_cases')}); null vectors {list(v['control_c_null_vectors'])}; top degree {v['max_p']}", flush=True)
            if which:
                r = self.fig[which]["nodes"][str(n)]
                self.cmp("counts", c, r["counts"])
                self.cmp("C-free rows control (a)", v["control_a_C_free_rows"]["PASS"], r["control_a_PASS"])
                self.cmp("blind leave-one-out exact / predictions", [loo["n_exact"], loo["n_predictions"]], [r["loo_n_exact"], r["loo_n_predictions"]])
                self.cmp("null vectors", list(v["control_c_null_vectors"]), r["null_vectors"])
                self.cmp("top degree p", v["max_p"], r["max_p"])
                rv = recf["nodes"][str(n)]["entries"]
                same = sum(1 for k, e in rv.items() if k in v["entries"] and all(v["entries"][k].get(kk) == e.get(kk) for kk in ("status", "P", "Q", "g", "P_null")))
                self.cmp("per-entry (status, P, Q, g, null forms) equal to the record's fit", same, len(rv))
            res[n] = {"counts": c, "loo": [loo["n_exact"], loo["n_predictions"]], "null": list(v["control_c_null_vectors"]), "max_p": v["max_p"]}
        return p, res

    def fit_file(self):
        fs = sorted(glob.glob(os.path.join(self.ck, "FIT_C_RAYS_*.json")))
        if fs:
            return fs[-1], "computed here"
        p = os.path.join(self.ck, "FIT_C_RAYS_5ray.json")
        shutil.copyfile(os.path.join(RECORD, "FIT_C_RAYS_5ray.json"), p)
        self.inputs_from_record.append("FIT_C_RAYS_5ray.json")
        print("    [input] the five-ray fit taken from the shipped record copy (not computed in this run)", flush=True)
        return p, "from the shipped record"

    def predict(self, tag):
        fitp, src = self.fit_file()
        lines = self.run_leg("predict", "fit_C_rays.py", ["--predict", "--fit-file", fitp, "--tag", tag, "--work", self.work])
        p = next(l for l in lines if l.startswith("PRED_FILE="))[len("PRED_FILE="):]
        d = json.load(open(p))
        rec = json.load(open(os.path.join(RECORD, f"WITHHELD_PRED_{tag}.json")))
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = self.fig["withheld"][tag]["predict"][str(n)]
            print(f"  [predict] {tag} node {n}: {v['n_entries']} entries predicted ({v['n_exact']} exact, {v['n_family']} family, {v['n_not_predicted']} not predicted); withheld objects present at emission: {d['withheld_outputs_present_at_emission']}", flush=True)
            self.cmp("entries predicted / exact / family / not predicted", [v["n_entries"], v["n_exact"], v["n_family"], v["n_not_predicted"]], [r["n_entries"], r["n_exact"], r["n_family"], r["n_not_predicted"]])
            rv = rec["nodes"][str(n)]["entries"]
            same = sum(1 for k, e in rv.items() if k in v["entries"] and v["entries"][k].get("C_ray_function") == e.get("C_ray_function"))
            self.cmp("predicted ray functions equal to the prediction of record", same, len(rv))
            recC = json.load(open(os.path.join(RECORD, f"C_{tag}_node{n}.json")))
            cmpC = sum(1 for k, e in v["entries"].items() if e.get("C_at_lambda_1") is not None and F(e["C_at_lambda_1"]) == F(recC["rows"][k.split(",")[0]].get("C_row_str", {}).get(k.split(",")[1], "0")))
            self.cmp("C at the point (lambda = 1) equal, as exact rationals, to the C assembled from the withheld point's own reduction (the record's independent check)", cmpC, len(v["entries"]))
            res[n] = {"n_entries": v["n_entries"], "n_exact": v["n_exact"], "ray_functions_identical": same, "of": len(rv), "C_at_point_equal": cmpC}
        return p, res

    def verify(self, tag):
        preds = sorted(glob.glob(os.path.join(self.ck, f"WITHHELD_PRED_{tag}_*.json")))
        if not preds:
            p = os.path.join(self.ck, f"WITHHELD_PRED_{tag}.json")
            shutil.copyfile(os.path.join(RECORD, f"WITHHELD_PRED_{tag}.json"), p)
            self.inputs_from_record.append(f"WITHHELD_PRED_{tag}.json")
            print(f"    [input] the prediction of record for {tag} taken from the shipped record copy (not computed in this run)", flush=True)
            preds = [p]
        for n in self.nodes:
            self.ensure(f"RAY_DEGREE_BUDGET_{tag}_node{n}.json", "budget")
        lines = self.run_leg("verify", "fit_C_rays.py", ["--verify", "--pred-file", preds[-1], "--work", self.work])
        p = next(l for l in lines if l.startswith("VERDICT_FILE="))[len("VERDICT_FILE="):]
        d = json.load(open(p))
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = self.fig["withheld"][tag]["verify"][str(n)]
            print(f"  [verify] {tag} node {n}: {v['n_exact_match']}/{v['n_predicted_exact']} exact matches, {v['n_mismatch']} mismatches, {v['n_family']} family; C-free rows on the withheld ray {v['C_free_rows_identically_zero_on_the_landed_ray']} -> {v['verdict']}", flush=True)
            self.cmp("exact matches / mismatches / family", [v["n_exact_match"], v["n_mismatch"], v["n_family"]], [r["n_exact_match"], r["n_mismatch"], r["n_family"]])
            self.cmp("verdict", v["verdict"], r["verdict"])
            res[n] = {"n_exact_match": v["n_exact_match"], "n_mismatch": v["n_mismatch"], "verdict": v["verdict"]}
        self.cmp("the verification verdict", d["verdict"], self.fig["withheld"][tag]["verify_verdict"])
        return p, res

    def residual(self, tag):
        fitp, src = self.fit_file()
        for n in self.nodes:
            self.ensure(f"C_{tag}_node{n}.json", "assemble")
            self.ensure(f"CURL_{tag}_node{n}.json", "curl")
            self.ensure(f"RAY_DEGREE_BUDGET_{tag}_node{n}.json", "budget")
        argv = ["--residual", "--fit-file", fitp, "--at", tag, "--work", self.work]
        fdp = sorted(glob.glob(os.path.join(self.work, "RECEIPTS", "LEAK_ROW_FD_ESTIMATE_*.json")))
        if tag == "Q_m19m18" and fdp:
            argv += ["--fd-file", fdp[-1]]
        lines = self.run_leg("residual", "fit_C_rays.py", argv)
        p = next(l for l in lines if l.startswith("RESIDUAL_FILE="))[len("RESIDUAL_FILE="):]
        d = json.load(open(p))
        rec = json.load(open(os.path.join(RECORD, f"RESIDUAL_{tag}.json")))
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = self.fig["residual"][tag]["nodes"][str(n)]
            fdc = v.get("fd_comparison")
            print(f"  [residual] {tag} node {n}: residues {v['n_residues']} (EXACT {v['n_EXACT']}, family {v['n_family']}); exact nonzero {v['n_exact_nonzero']}; controls: fit value = C at the point {v['positive_control_fit_value_equals_point_C']['PASS']}, "
                  f"Euler derivative {v['positive_control_fit_euler_derivative_equals_ray_derivative']['PASS']}, C-free rows reproduce the curl receipt {(v['positive_control_C_free_rows_reproduce_CURL_receipt'] or {}).get('PASS')}"
                  + (f"; vs the finite-difference estimate: {fdc['n_hermite_within_bar']}/{fdc['n_exact_entries_compared']} Hermite-2D, {fdc['n_stencil_within_bar']}/{fdc['n_exact_entries_compared']} stencil within their bars" if fdc else "") + f" -> {v['verdict']}", flush=True)
            self.cmp("residues / EXACT / exact nonzero", [v["n_residues"], v["n_EXACT"], v["n_exact_nonzero"]], [r["n_residues"], r["n_EXACT"], r["n_exact_nonzero"]])
            self.cmp("controls (value, Euler, curl)", [v["positive_control_fit_value_equals_point_C"]["PASS"], v["positive_control_fit_euler_derivative_equals_ray_derivative"]["PASS"], (v["positive_control_C_free_rows_reproduce_CURL_receipt"] or {}).get("PASS")], [r["ctrl_value"], r["ctrl_euler"], r["ctrl_curl"]])
            if fdc and r.get("fd"):
                self.cmp("finite-difference comparison (Hermite-2D within bar, stencil within bar, compared)", [fdc["n_hermite_within_bar"], fdc["n_stencil_within_bar"], fdc["n_exact_entries_compared"]], [r["fd"]["n_hermite_within_bar"], r["fd"]["n_stencil_within_bar"], r["fd"]["n_exact_entries_compared"]])
            rv = rec["nodes"][str(n)]["leak_residues"]
            same = sum(1 for k, e in rv.items() if k in v["leak_residues"] and v["leak_residues"][k]["R"] == e["R"] and v["leak_residues"][k]["LC_exact"] == e["LC_exact"])
            self.cmp("per-entry residues (R and LC, exact strings) equal to the record's", same, len(rv))
            res[n] = {"n_residues": v["n_residues"], "n_EXACT": v["n_EXACT"], "n_exact_nonzero": v["n_exact_nonzero"], "per_entry_identical": same, "of": len(rv)}
        self.cmp("the residual verdict", d["verdict"], self.fig["residual"][tag]["verdict"])
        return p, res

# ---------------------------------------------------------------- THE TOP BLOCK (rows 17-38): the same front end, the same working directory
TOP_ROWS = list(range(17, 39))
TOP_ROWS_ARG = ",".join(str(i) for i in TOP_ROWS)
RECORD_TOP = os.path.join(RECORD, "top")
TOP_LEGS = ["assemble-top", "budget-top", "curl-top", "march-top", "fold-gate", "fit-top", "fit-control", "predict-top", "verify-top", "residual-top", "findings", "tally-top", "chain-top"]
SCOPE_TOP = ("[scope] the 40 unclosed kernel entries remain not established; no off-curve evaluator of the amplitude is claimed.  "
             "The sampled leave-one-out is in progress; no figure is served.  The top block's figures are the record's own objects under record/top/ "
             "(INDEX.json), reproduced here leg by leg; the 209 families per d-node and the 38 entries of row 36 are stated, never counted as closures.")
FIT_KEYS_TOP = ("status", "P", "Q", "g", "P_null", "p_deg_P", "deg_Q", "e0_pure_degree", "z_numerator_lambda_valuation", "den_structure", "components", "dropped_rays", "reproduces_every_fit_ray_exactly", "g_candidates_tested", "row_master", "col_master", "homogeneity_degree_w_i_minus_w_j_minus_1")


def cls_of(status):
    return "DETERMINED" if status.startswith("DETERMINED") else ("UNDERDETERMINED" if status.startswith("UNDERDETERMINED") else "REFUSED")


class TopRun(Run):
    """the top block (rows 17-38) on the same working directory: the record's objects under record/top/ (sha256-pinned; the large ones
    gzipped with their uncompressed sha256 pinned in INDEX.json), the vendored legs under chain/, every figure printed beside the record's."""

    def __init__(self, args):
        super().__init__(args)
        self.top = self.pts["top_block"]
        self.fit_top = list(self.top["fit_rays"])
        self.withheld_top = list(self.top["withheld_rays"])
        self.idx = json.load(open(os.path.join(RECORD_TOP, "INDEX.json")))["files"]
        self.rec_cache = os.path.join(self.work, "rec")
        os.makedirs(self.rec_cache, exist_ok=True)
        os.makedirs(os.path.join(self.work, "RECEIPTS"), exist_ok=True)

    # ---- the record's objects (gz-aware, pinned twice: the file by PINS, the content by INDEX.json)
    def rec_top(self, name):
        """the path of a readable copy of record/top/<name>: a plain file as shipped; a gzipped one decompressed into <work>/rec/ once, its
        uncompressed sha256 checked against INDEX.json (a mismatch REFUSES by name, rc 3)."""
        if name in self.idx:
            return os.path.join(RECORD_TOP, name)
        gz = name + ".gz"
        if gz not in self.idx:
            die(RC_MISSING, f"row21-offcurve-evaluate MISSING: record/top/{name} is not a shipped object (INDEX.json); not serving")
        p = os.path.join(self.rec_cache, name)
        if not os.path.exists(p):
            # decompressed to a private temporary name, checked, then renamed atomically: a second run sharing the working directory
            # never reads a partial copy (the rename replaces an identical file at worst)
            tmp = p + f".tmp.{os.getpid()}"
            with gzip.open(os.path.join(RECORD_TOP, gz), "rb") as f, open(tmp, "wb") as g:
                shutil.copyfileobj(f, g, 1 << 22)
            got = sha256_file(tmp)
            want = self.idx[gz]["uncompressed_sha256"]
            if got != want:
                die(RC_REFUSED, f"row21-offcurve-evaluate REFUSED: record/top/{gz} decompresses to sha256 {got}, INDEX.json pins {want}; not serving")
            os.replace(tmp, p)
        return p

    def rec_json(self, name):
        return json.load(open(self.rec_top(name)))

    def ensure_top(self, name, kind):
        """an input object: the working directory's ck/ first (computed here), else the shipped record/top/ copy (said by name)."""
        p = os.path.join(self.ck, name)
        if os.path.exists(p):
            return p, "computed here"
        src = self.rec_top(name)
        shutil.copyfile(src, p)
        self.inputs_from_record.append(name)
        print(f"    [input] {name} taken from the shipped record/top/ copy (not computed in this run; run the {kind} leg to recompute it)", flush=True)
        return p, "from the shipped record"

    def run_leg_top(self, name, script, argv, ok_rc=(0,)):
        """one vendored top-block leg as a subprocess (cwd = the working directory); an rc outside ok_rc -> rc 5 with the last line."""
        cmd = [sys.executable, os.path.join(CHAIN, script)] + argv
        tfile = None
        if self.gnu_time:
            tfile = os.path.join(self.work, f".time_{name}_{len(self.legs)}")
            cmd = ["/usr/bin/time", "-f", "WALL %e s MAXRSS %M KB", "-o", tfile] + cmd
        print(f"  [{name}] {script} {' '.join(os.path.relpath(a, self.work) if a.startswith(self.work) else (os.path.relpath(a, HERE) if a.startswith(HERE) else a) for a in argv)}", flush=True)
        time.sleep(max(0.0, 1.05 - (time.time() - self.last_end)))
        t0 = time.time()
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, cwd=self.work, env=self.env)
        lines = []
        for ln in p.stdout:
            ln = ln.rstrip("\n")
            lines.append(ln)
            ln_show = ln.split("] ", 1)[1] if (ln.startswith("[") and "] " in ln) else ln
            print(f"    [{name}] {ln_show[:400]}", flush=True)
        rc = p.wait()
        self.last_end = time.time()
        wall = round(time.time() - t0, 2)
        maxrss = None
        if tfile and os.path.exists(tfile):
            m = re.search(r"WALL ([\d.]+) s MAXRSS (\d+) KB", open(tfile).read())
            if m:
                wall, maxrss = float(m.group(1)), int(m.group(2))
            os.remove(tfile)
        self.legs.append({"leg": name, "script": script, "rc": rc, "wall_s": wall, "maxrss_kB": maxrss, "last": lines[-1][:300] if lines else ""})
        print(f"    [{name}] rc {rc}; wall {wall} s" + (f"; maximum resident set {maxrss / 1024:.0f} MB" if maxrss else ""), flush=True)
        if rc not in ok_rc:
            die(RC_LEG, f"row21-offcurve-evaluate LEG {name} ({script}) did not finish: rc {rc}; last line: {lines[-1][:300] if lines else ''!r}")
        return lines

    def m2de_argv(self, tag):
        pt = self.pts["points"][tag]
        return [os.path.join(POINTS, tag), os.path.join(POINTS, tag, pt["m2de_file"])]

    # ---- leg (a): assemble-top
    def assemble_top(self, tag, n):
        m2 = self.gate0(tag)
        s, t = self.point(tag)
        pdir, m2p = self.m2de_argv(tag)
        argv = ["--tag", tag, "--point-dir", pdir, f"--point={s},{t}", "--nodes", str(n), "--rows", TOP_ROWS_ARG, "--m2de-file", m2p, "--out-dir", self.ck]
        ctl = os.path.join(RECORD, f"C_{tag}_node{n}.json")
        if os.path.exists(ctl):
            argv += ["--control", os.path.join(RECORD, "C_" + tag + "_node{n}.json")]
        self.run_leg_top("assemble-top", "assemble_C_top.py", argv)
        c = json.load(open(os.path.join(self.ck, f"CTOP_{tag}_node{n}.json")))
        r = self.rec_json(f"CTOP_{tag}_node{n}.json")
        g = c["fold_consistency_gate_rows_39_40"]
        print(f"  [assemble-top] {tag} node {n} (d = {c['d']}): the folded 41x39 matrices at the point; the RAW-row fold gate on rows 39/40 {g['PASS']} PASS / {g['FAIL']} FAIL "
              f"(the leak signature of the uncorrected rows -- the record's reading; the corrected-pair gate is the fold-gate leg); own-exact rows {c['rows_17_40_own_entries_all_exact_class']}; "
              f"blocked rows {c['rows_17_40_with_a_blocked_own_entry']}; computable C entries {c['C_all_computable_entries_n']}", flush=True)
        self.cmp("raw-row fold gate rows 39/40 (PASS, FAIL)", [g["PASS"], g["FAIL"]], [r["fold_consistency_gate_rows_39_40"]["PASS"], r["fold_consistency_gate_rows_39_40"]["FAIL"]])
        self.cmp("rows 17..40 with every own entry exact-class", c["rows_17_40_own_entries_all_exact_class"], r["rows_17_40_own_entries_all_exact_class"])
        self.cmp("rows 17..40 with a blocked own entry", c["rows_17_40_with_a_blocked_own_entry"], r["rows_17_40_with_a_blocked_own_entry"])
        self.cmp("computable C entries of the 39-block", c["C_all_computable_entries_n"], r["C_all_computable_entries_n"])
        self.cmp("residual computability by row (rows 17..38)", c["residual_computability_rows_17_38"]["n_computable_entries_by_row"], r["residual_computability_rows_17_38"]["n_computable_entries_by_row"])
        self.cmp("entry status counts (s, t)", c["entry_status_counts"], r["entry_status_counts"])
        same = sum(1 for i in TOP_ROWS if all(c["rows"][str(i)].get(k) == r["rows"][str(i)].get(k) for k in ("C_row_str", "corrected_A_s_row_str", "corrected_A_t_row_str", "C_row_nonzero_cols", "blocked_cols", "status", "n_cols_determined")))
        self.cmp("C rows + corrected rows string for string vs the record's (22 rows)", same, 22)
        if os.path.exists(ctl):
            self.cmp("positive control rows 0..16 vs the rows-0..16 chain's C of record", (c.get("positive_control_rows_0_16_vs_step10") or {}).get("PASS"), (r.get("positive_control_rows_0_16_vs_step10") or {}).get("PASS"))
        return {"raw_gate": [g["PASS"], g["FAIL"]], "rows_identical": same, "of": 22, "own_exact_rows": c["rows_17_40_own_entries_all_exact_class"]}

    # ---- leg (b): budget-top
    def budget_top(self, tag, n):
        s, t = self.point(tag)
        pdir, m2p = self.m2de_argv(tag)
        argv = ["--tag", tag, "--point-dir", pdir, f"--point={s},{t}", "--nodes", str(n), "--rows", TOP_ROWS_ARG, "--m2de-file", m2p, "--out-dir", self.ck]
        self.run_leg_top("budget-top", "ray_budget_top.py", argv)
        b = json.load(open(os.path.join(self.ck, f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json")))
        r = self.rec_json(f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json")
        print(f"  [budget-top] {tag} node {n}: leak entries on the ray {b['n_leak_entries_on_the_requested_rows']}; B_N = {b['B_N_max_numerator_degree_along_the_ray']}, B_D = {b['B_D_max_denominator_degree_along_the_ray']}", flush=True)
        self.cmp("leak entries on the ray", b["n_leak_entries_on_the_requested_rows"], r["n_leak_entries_on_the_requested_rows"])
        self.cmp("B_N, B_D", [b["B_N_max_numerator_degree_along_the_ray"], b["B_D_max_denominator_degree_along_the_ray"]], [r["B_N_max_numerator_degree_along_the_ray"], r["B_D_max_denominator_degree_along_the_ray"]])
        same = n_all = 0
        for i, rr in r["rows"].items():
            for j, rf in rr.get("C_ray_functions", {}).items():
                n_all += 1
                mine = b["rows"].get(i, {}).get("C_ray_functions", {}).get(j)
                same += (mine is not None and mine["num"] == rf["num"] and mine["den"] == rf["den"])
        self.cmp("ray functions (numerator and denominator coefficients) equal to the record's", same, n_all)
        self.cmp("blocked columns per row", {i: rr.get("blocked_cols") for i, rr in b["rows"].items()}, {i: rr.get("blocked_cols") for i, rr in r["rows"].items()})
        return {"ray_functions_identical": same, "of": n_all, "B_N": b["B_N_max_numerator_degree_along_the_ray"], "B_D": b["B_D_max_denominator_degree_along_the_ray"]}

    # ---- leg (c): curl-top
    def curl_top(self, tag, n):
        for nm in (f"CTOP_{tag}_node{n}.json", f"MATTOP_{tag}_node{n}.json"):
            if not os.path.exists(os.path.join(self.ck, nm)):
                print(f"    [input] {nm} absent from the working directory (the folded matrices are not shipped): running assemble-top first", flush=True)
                self.assemble_top(tag, n)
                break
        s, t = self.point(tag)
        argv = ["--tag", tag, f"--point={s},{t}", "--nodes", str(n), "--rows", TOP_ROWS_ARG, "--out-dir", self.ck]
        self.run_leg_top("curl-top", "curl_top.py", argv)
        k = json.load(open(os.path.join(self.ck, f"CURLTOP_{tag}_node{n}.json")))
        r = self.rec_json(f"CURLTOP_{tag}_node{n}.json")
        i2 = k["impl2"]
        print(f"  [curl-top] {tag} node {n}: R_point on rows 17..38 -- {k['tally_by_status']['COMPUTED']} computed / {k['tally_by_status']['BLOCKED']} blocked; R_point nonzero on {k['n_R_point_nonzero_entries']}; "
              f"second implementation: finite-difference curl >= {i2['worst_fd_curl_agreement_digits']:.1f} digits, commutator at dps {i2['dps']} >= {i2['worst_mp_commutator_agreement_digits']:.1f} digits", flush=True)
        self.cmp("computed / blocked", [k["tally_by_status"]["COMPUTED"], k["tally_by_status"]["BLOCKED"]], [r["tally_by_status"]["COMPUTED"], r["tally_by_status"]["BLOCKED"]])
        self.cmp("R_point nonzero entries", k["n_R_point_nonzero_entries"], r["n_R_point_nonzero_entries"])
        self.cmp("second-implementation agreement (integer floors: fd curl, commutator)", [int(i2["worst_fd_curl_agreement_digits"]), int(i2["worst_mp_commutator_agreement_digits"])], [int(r["impl2"]["worst_fd_curl_agreement_digits"]), int(r["impl2"]["worst_mp_commutator_agreement_digits"])])
        pe, rpe = k["per_entry"], r["per_entry"]
        same = sum(1 for kk, e in rpe.items() if kk in pe and pe[kk].get("status") == e.get("status") and pe[kk].get("R_point_exact") == e.get("R_point_exact") and pe[kk].get("known_term_(1/s-1/t)C_exact") == e.get("known_term_(1/s-1/t)C_exact") and pe[kk].get("blockers") == e.get("blockers"))
        self.cmp("per-entry R_point, the known C term and the blockers equal to the record's (exact strings)", same, len(rpe))
        return {"computed": k["tally_by_status"]["COMPUTED"], "blocked": k["tally_by_status"]["BLOCKED"], "per_entry_identical": same, "of": len(rpe)}

    # ---- the corrected fold gate at one (point, node) item
    def fold_gate_item(self, tag, n):
        if not os.path.exists(os.path.join(self.ck, f"MATTOP_{tag}_node{n}.json")):
            print(f"    [input] MATTOP_{tag}_node{n}.json absent from the working directory (not shipped): running assemble-top first", flush=True)
            self.assemble_top(tag, n)
        lines = self.run_leg_top("fold-gate", "fold_gate_corrected_top.py", ["--tag", tag, "--node", str(n), "--work", self.work])
        p = next(l for l in lines if l.startswith("RECEIPT_GATE="))[len("RECEIPT_GATE="):].split(" sha16=")[0]
        d = json.load(open(p))
        item = f"{tag}_n{n}"
        print(f"  [fold-gate] {item}: the corrected-pair fold identity {d['gate_corrected']['PASS']} PASS / {d['gate_corrected']['FAIL']} FAIL of 156; the leak identity {d['leak_identity']['PASS']} PASS / {d['leak_identity']['FAIL']} FAIL of 78", flush=True)
        recs = [nm for nm in self.idx if nm.startswith(f"FOLD_GATE_CORRECTED_{item}_")]
        if recs:
            r = self.rec_json(recs[0])
            self.cmp("corrected fold gate (PASS, FAIL)", [d["gate_corrected"]["PASS"], d["gate_corrected"]["FAIL"]], [r["gate_corrected"]["PASS"], r["gate_corrected"]["FAIL"]])
            self.cmp("leak identity (PASS, FAIL)", [d["leak_identity"]["PASS"], d["leak_identity"]["FAIL"]], [r["leak_identity"]["PASS"], r["leak_identity"]["FAIL"]])
            self.cmp("the C rows of the gate (rows 16..20, 39, 40) equal to the record's, string for string", d["C_rows_values"], r["C_rows_values"])
        else:
            print(f"    [fold-gate] {item}: no receipt of record (the tally of record covers the 48 fit items; this item is a withheld ray) -- the identities above are this run's own; the record's reading: 156/0 and 78/0 is the bar", flush=True)
            self.cmp("corrected fold gate at a withheld item (PASS, FAIL) against the record's bar", [d["gate_corrected"]["PASS"], d["gate_corrected"]["FAIL"]], [156, 0])
            self.cmp("leak identity at a withheld item (PASS, FAIL) against the record's bar", [d["leak_identity"]["PASS"], d["leak_identity"]["FAIL"]], [78, 0])
        return {"gate": [d["gate_corrected"]["PASS"], d["gate_corrected"]["FAIL"]], "leak": [d["leak_identity"]["PASS"], d["leak_identity"]["FAIL"]]}

    def fold_gate_tally(self):
        """the tally of record (48 of 48 fit items) recomputed from the 48 shipped receipts; every item with a fresh receipt in the working directory compared."""
        T = self.rec_json("FOLD_GATE_CORRECTED_TALLY_item65_20260908T015423Z.json")
        n_pass = 0
        per = {}
        for item, v in T["per_item"].items():
            r = self.rec_json(os.path.basename(v["receipt"]))
            ok = r["gate_corrected"] == {"PASS": 156, "FAIL": 0} and r["leak_identity"] == {"PASS": 78, "FAIL": 0}
            n_pass += ok
            per[item] = [r["gate_corrected"]["PASS"], r["gate_corrected"]["FAIL"], r["leak_identity"]["PASS"], r["leak_identity"]["FAIL"]]
            tb = v["tally_by_line_suffix"]
            assert per[item] == [tb["gate_PASS"], tb["gate_FAIL"], tb["leak_PASS"], tb["leak_FAIL"]], item
        print(f"  [fold-gate] the tally of record recomputed from the 48 shipped receipts: {n_pass} of {len(per)} items 156/0 and 78/0 (the tally receipt: {T['n_items_PASS']} of {T['n_items_expected']})", flush=True)
        self.cmp("fold-gate items PASS (of 48)", [n_pass, len(per)], [T["n_items_PASS"], T["n_items_expected"]])
        fresh = sorted(glob.glob(os.path.join(self.work, "RECEIPTS", "FOLD_GATE_CORRECTED_*_n[01]_*.json")))
        n_fresh = n_fresh_ok = 0
        for f in fresh:
            d = json.load(open(f))
            n_fresh += 1
            n_fresh_ok += (d["gate_corrected"] == {"PASS": 156, "FAIL": 0} and d["leak_identity"] == {"PASS": 78, "FAIL": 0})
        if n_fresh:
            self.cmp(f"items recomputed in this working directory at 156/0 and 78/0", n_fresh_ok, n_fresh)
        return {"record_items_PASS": n_pass, "of": len(per), "fresh_items": n_fresh, "fresh_PASS": n_fresh_ok}

    # ---- the fit of record: its tally, the spot re-derivation, the sharded form
    def fit_file_top(self):
        return self.rec_top("FIT_C_RAYS_TOP_20260908T085835Z.json")

    def fit_tally(self):
        F = self.rec_json("FIT_C_RAYS_TOP_20260908T085835Z.json")
        T = self.rec_json("FIT_FORM_TALLY_top_pass1_item65_20260908T085839Z.json")
        res = {}
        for nn in ("0", "1"):
            v = F["nodes"][nn]
            c = v["counts"]
            cnt = {"DETERMINED": 0, "UNDERDETERMINED": 0, "REFUSED": 0}
            drops = {}
            for k, e in v["entries"].items():
                cnt[cls_of(e["status"])] += 1
                for dr in (e.get("dropped_rays") or []):
                    drops[k] = dr["tag"]
            print(f"  [fit-top] the fit of record, node {nn} (d = {v['d']}): {len(v['rays'])} rays, {v['n_leak_entries']} entries -- DETERMINED {cnt['DETERMINED']}, UNDERDETERMINED {cnt['UNDERDETERMINED']}, REFUSED {cnt['REFUSED']}; "
                  f"one ray dropped on {len(drops)} entries {drops}; components {c['components_total']} (consistent {c['components_consistent']}, with redundancy {c['components_with_redundancy']}); top degree {v['max_p']}", flush=True)
            self.cmp("entries DETERMINED / UNDERDETERMINED / REFUSED (recounted from the entries vs the receipt counts)", [cnt["DETERMINED"], cnt["UNDERDETERMINED"], cnt["REFUSED"]], [c["entries_DETERMINED"], c["entries_UNDERDETERMINED"], c["entries_REFUSED"]])
            tb = T["per_node"][nn]["tally_by_line_suffix"]
            self.cmp("the tally of record by line suffix (DETERMINED, UNDERDETERMINED, REFUSED, DROPPED)", [cnt["DETERMINED"], cnt["UNDERDETERMINED"], cnt["REFUSED"], len(drops)], [tb["DETERMINED"], tb["UNDERDETERMINED"], tb["REFUSED"], tb["DROPPED"]])
            self.cmp("the two entries with one ray dropped", drops, T["per_node"][nn].get("dropped_rays_by_entry", drops) if "dropped_rays_by_entry" in T["per_node"][nn] else drops)
            self.cmp("components total / consistent", [c["components_total"], c["components_consistent"]], [c["components_total"], c["components_total"]])
            self.cmp("every DETERMINED entry reproduces every fit ray exactly", sum(1 for e in v["entries"].values() if e["status"].startswith("DETERMINED") and e.get("reproduces_every_fit_ray_exactly") is True), cnt["DETERMINED"])
            res[nn] = {"counts": cnt, "dropped": drops}
        self.cmp("the two d-nodes identical in their counts", res["0"]["counts"], res["1"]["counts"])
        return res

    def fit_spot(self, shard, width):
        """a deterministic set of entry-node cases re-derived from the shipped ray budgets by the vendored fit form (its sharded, resumable
        mode: the entries with index % width == shard, per node) and compared entry by entry with the fit of record."""
        for tg in self.fit_top:
            for n in self.nodes:
                self.ensure_top(f"RAY_DEGREE_BUDGET_TOP_{tg}_node{n}.json", "budget-top")
        fitwork = os.path.join(self.work, "fitwork")
        os.makedirs(fitwork, exist_ok=True)
        self.run_leg_top("fit-top", "fit_C_rays_top.py", ["--shard-fit", "--shard", str(shard), "--width", str(width), "--tags", ",".join(self.fit_top), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work, "--out-dir", self.ck])
        F = self.rec_json("FIT_C_RAYS_TOP_20260908T085835Z.json")
        res = {}
        n_same = n_all = 0
        for n in self.nodes:
            path = os.path.join(self.work, f"node{n}", f"shard{shard}.jsonl")
            for ln in open(path):
                ln = ln.strip()
                if not ln:
                    continue
                rec = json.loads(ln)
                key = rec["key"]
                mine = rec["rec"]
                theirs = F["nodes"][str(n)]["entries"].get(key)
                n_all += 1
                same = theirs is not None and all(mine.get(k) == theirs.get(k) for k in FIT_KEYS_TOP)
                n_same += same
                diff = [k for k in FIT_KEYS_TOP if theirs is not None and mine.get(k) != theirs.get(k)]
                print(f"  [fit-top --spot] entry ({key}) node {n}: {cls_of(mine['status'])} (record {cls_of(theirs['status']) if theirs else 'absent'}); p = {mine.get('p_deg_P')}, e0 = {mine.get('e0_pure_degree')}, z = {mine.get('z_numerator_lambda_valuation')}, g = {mine.get('g')}; "
                      f"wall {mine.get('wall_s')} s -> {'equal to the fit of record on every compared key' if same else 'DIFFERS on ' + str(diff)}", flush=True)
                res[f"{key}:{n}"] = {"class": cls_of(mine["status"]), "equal": bool(same), "wall_s": mine.get("wall_s"), "p": mine.get("p_deg_P")}
        self.cmp(f"spot cases equal to the fit of record entry by entry ({', '.join(FIT_KEYS_TOP[:5])}, ... {len(FIT_KEYS_TOP)} keys)", n_same, n_all)
        return res

    def fit_shard(self, shard, width):
        for tg in self.fit_top:
            for n in self.nodes:
                self.ensure_top(f"RAY_DEGREE_BUDGET_TOP_{tg}_node{n}.json", "budget-top")
        self.run_leg_top("fit-top", "fit_C_rays_top.py", ["--shard-fit", "--shard", str(shard), "--width", str(width), "--tags", ",".join(self.fit_top), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work, "--out-dir", self.ck])
        done = {}
        for n in self.nodes:
            path = os.path.join(self.work, f"node{n}", f"shard{shard}.jsonl")
            done[n] = sum(1 for ln in open(path) if ln.strip()) if os.path.exists(path) else 0
        print(f"  [fit-top --shard] shard {shard} of {width}: done-set per node {done} (resumable: a re-run skips them)", flush=True)
        return {"shard": shard, "width": width, "done": done}

    def fit_merge(self, width):
        lines = self.run_leg_top("fit-top", "fit_C_rays_top.py", ["--merge", "--width", str(width), "--tags", ",".join(self.fit_top), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work, "--out-dir", self.ck], ok_rc=(0, 2))
        p = next(l for l in lines if l.startswith("FIT_FILE="))[len("FIT_FILE="):]
        f = json.load(open(p))
        F = self.rec_json("FIT_C_RAYS_TOP_20260908T085835Z.json")
        res = {}
        for n in self.nodes:
            v = f["nodes"][str(n)]
            r = F["nodes"][str(n)]
            print(f"  [fit-top --merge] node {n}: merged {v['n_entries_merged']} of {v['n_leak_entries']} entries; DETERMINED {v['counts']['entries_DETERMINED']}, UNDERDETERMINED {v['counts']['entries_UNDERDETERMINED']}, REFUSED {v['counts']['entries_REFUSED']}; complete {f['complete']}", flush=True)
            if f["complete"]:
                self.cmp("merged counts equal to the fit of record", v["counts"], r["counts"])
                same = sum(1 for k, e in r["entries"].items() if k in v["entries"] and all(v["entries"][k].get(kk) == e.get(kk) for kk in FIT_KEYS_TOP))
                self.cmp("entries equal to the fit of record", same, len(r["entries"]))
            res[n] = {"merged": v["n_entries_merged"], "counts": v["counts"], "complete": f["complete"]}
        return res

    def fit_control(self, rays):
        """the fit form's control copy on rows 0-16: the rows-0..16 chain's ray budgets of record (record/) under the top-block fit form (ZMAX 13, the non-generic-ray drop) -> the record's 27/1/0 (4 rays) and 28/0/0 (5 rays), 0 entries differing."""
        for tg in rays:
            for n in self.nodes:
                self.ensure(f"RAY_DEGREE_BUDGET_{tg}_node{n}.json", "budget")
        lines = self.run_leg_top("fit-control", "fit_C_rays_control.py", ["--fit", "--tags", ",".join(rays), "--nodes", ",".join(map(str, self.nodes)), "--work", self.work, "--out-dir", self.ck])
        p = next(l for l in lines if l.startswith("FIT_FILE="))[len("FIT_FILE="):]
        f = json.load(open(p))
        which = "5ray" if rays == FIT_RAYS else ("4ray" if rays == FIT_RAYS[:4] else None)
        ctl = self.rec_json(f"FIT_FORM_CONTROL_{which}_item65_20260908T034419Z.json") if which else None
        recf = json.load(open(os.path.join(RECORD, f"FIT_C_RAYS_{which}.json"))) if which else None
        res = {}
        for n in self.nodes:
            v = f["nodes"][str(n)]
            c = v["counts"]
            print(f"  [fit-control] node {n}: {len(rays)} rays on rows 0..16 under the top-block fit form: DETERMINED {c['entries_DETERMINED']}, UNDERDETERMINED {c['entries_UNDERDETERMINED']}, REFUSED {c['entries_REFUSED']}", flush=True)
            if ctl:
                self.cmp("counts equal to the control receipt of record (counts_new)", c, ctl["per_node"][str(n)]["counts_new"])
                self.cmp("counts equal to the rows-0..16 fit of record (counts_record)", c, ctl["per_node"][str(n)]["counts_record"])
                rv = recf["nodes"][str(n)]["entries"]
                same = sum(1 for k, e in rv.items() if k in v["entries"] and all(v["entries"][k].get(kk) == e.get(kk) for kk in ("status", "P", "Q", "g", "P_null")))
                self.cmp("per-entry (status, P, Q, g, null forms) equal to the rows-0..16 fit of record", same, len(rv))
                self.cmp("entries differing in the control receipt of record", ctl["per_node"][str(n)]["n_differing"], 0)
            res[n] = c
        return res

    # ---- the withheld rays: predict (before their objects exist here) / verify
    def predict_top(self, tag):
        present = [os.path.basename(p) for p in glob.glob(os.path.join(self.ck, f"RAY_DEGREE_BUDGET_TOP_{tag}_node*.json")) + glob.glob(os.path.join(self.ck, f"CTOP_{tag}_node*.json"))]
        if present:
            die(RC_USAGE, f"row21-offcurve-evaluate: --leg predict-top refuses: the withheld point {tag} already has derived objects in the working directory ({present}); the prediction is emitted BEFORE they exist (use a fresh --workdir)")
        fitp = self.fit_file_top()
        lines = self.run_leg_top("predict-top", "fit_C_rays_top.py", ["--predict", "--fit-file", fitp, "--tag", tag, "--allow-family", "--work", self.work, "--out-dir", self.ck])
        p = next(l for l in lines if l.startswith("PRED_FILE="))[len("PRED_FILE="):]
        d = json.load(open(p))
        recn = [nm for nm in self.idx if nm.startswith(f"HELDOUT_PRED_TOP_{tag}_")][0]
        rec = self.rec_json(recn[:-3] if recn.endswith(".gz") else recn)
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = rec["nodes"][str(n)]
            print(f"  [predict-top] {tag} node {n}: {v['n_entries']} entries -- {v['n_exact']} EXACT predictions, {v['n_family']} families (stated, not closures), {v['n_not_predicted']} not predicted (row 36); withheld objects present at emission: {d['held_out_outputs_present_at_emission']}", flush=True)
            self.cmp("entries / exact / family / not predicted", [v["n_entries"], v["n_exact"], v["n_family"], v["n_not_predicted"]], [r["n_entries"], r["n_exact"], r["n_family"], r["n_not_predicted"]])
            same = sum(1 for k, e in r["entries"].items() if k in v["entries"] and v["entries"][k].get("status") == e.get("status") and v["entries"][k].get("C_ray_function") == e.get("C_ray_function") and v["entries"][k].get("C_at_lambda_1") == e.get("C_at_lambda_1") and v["entries"][k].get("family") == e.get("family"))
            self.cmp("predicted ray functions (and families) equal to the prediction of record", same, len(r["entries"]))
            res[n] = {"n_exact": v["n_exact"], "n_family": v["n_family"], "identical": same, "of": len(r["entries"])}
        self.cmp("withheld objects present at emission (must be none)", d["held_out_outputs_present_at_emission"], [])
        return p, res

    def verify_top(self, tag):
        preds = sorted(glob.glob(os.path.join(self.ck, f"HELDOUT_PRED_TOP_{tag}_*.json")))
        if not preds:
            recn = [nm for nm in self.idx if nm.startswith(f"HELDOUT_PRED_TOP_{tag}_")][0]
            nm = recn[:-3] if recn.endswith(".gz") else recn
            p = os.path.join(self.ck, nm)
            shutil.copyfile(self.rec_top(nm), p)
            self.inputs_from_record.append(nm)
            print(f"    [input] the prediction of record for {tag} taken from the shipped record/top/ copy (not computed in this run)", flush=True)
            preds = [p]
        for n in self.nodes:
            self.ensure_top(f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json", "budget-top")
        lines = self.run_leg_top("verify-top", "fit_C_rays_top.py", ["--verify", "--pred-file", preds[-1], "--work", self.work, "--out-dir", self.ck], ok_rc=(0, 1))
        p = next(l for l in lines if l.startswith("VERDICT_FILE="))[len("VERDICT_FILE="):]
        d = json.load(open(p))
        recn = [nm for nm in self.idx if nm.startswith(f"HELDOUT_VERDICT_TOP_{tag}_")][0]
        rec = self.rec_json(recn)
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = rec["nodes"][str(n)]
            fam1 = sum(1 for e in v["entries"].values() if e.get("landed_in_family") is True)
            famn = sum(1 for e in v["entries"].values() if isinstance(e.get("landed_in_family"), str))
            print(f"  [verify-top] {tag} node {n}: {v['n_exact_match']}/{v['n_predicted_exact']} exact matches, {v['n_mismatch']} mismatches, {v['n_family']} families ({fam1} nullity-1 families contain the landed value; {famn} of nullity >= 3: membership not implemented, not a closure), "
                  f"{v['n_not_predicted']} not predicted; n_compared {v['n_compared']} -> {v['verdict']}", flush=True)
            self.cmp("exact matches / mismatches / families / not predicted", [v["n_exact_match"], v["n_mismatch"], v["n_family"], v["n_not_predicted"]], [r["n_exact_match"], r["n_mismatch"], r["n_family"], r["n_not_predicted"]])
            self.cmp("n_compared", v["n_compared"], r["n_compared"])
            self.cmp("nullity-1 families containing the landed value / families of nullity >= 3 (not a closure)", [fam1, famn], [sum(1 for e in r["entries"].values() if e.get("landed_in_family") is True), sum(1 for e in r["entries"].values() if isinstance(e.get("landed_in_family"), str))])
            self.cmp("per-entry status equal to the verdict of record", sum(1 for k, e in r["entries"].items() if k in v["entries"] and v["entries"][k].get("status") == e.get("status")), len(r["entries"]))
            self.cmp("verdict", v["verdict"], r["verdict"])
            self.cmp("VACUOUS never PASS (n_compared 0 -> VACUOUS)", (v["n_compared"] > 0) or v["verdict"].startswith("VACUOUS"), True)
            res[n] = {"n_exact_match": v["n_exact_match"], "n_mismatch": v["n_mismatch"], "n_compared": v["n_compared"], "verdict": v["verdict"]}
        self.cmp("the verification verdict", d["verdict"], rec["verdict"])
        return p, res

    # ---- the exact residual at a point (both nodes) and the tally over the 26
    def residual_top(self, tag):
        fitp = self.fit_file_top()
        for n in self.nodes:
            self.ensure_top(f"CTOP_{tag}_node{n}.json", "assemble-top")
            self.ensure_top(f"CURLTOP_{tag}_node{n}.json", "curl-top")
            self.ensure_top(f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json", "budget-top")
        lines = self.run_leg_top("residual-top", "fit_C_rays_top.py", ["--residual", "--fit-file", fitp, "--at", tag, "--work", self.work, "--out-dir", self.ck], ok_rc=(0, 1))
        p = next(l for l in lines if l.startswith("RESIDUAL_FILE="))[len("RESIDUAL_FILE="):]
        d = json.load(open(p))
        recn = [nm for nm in self.idx if nm.startswith(f"TOP_BLOCK_EXACT_RESIDUAL_{tag}_")][0]
        rec = self.rec_json(recn)
        res = {}
        for n in self.nodes:
            v = d["nodes"][str(n)]
            r = rec["nodes"][str(n)]
            print(f"  [residual-top] {tag} node {n}: {v['n_EXACT']} EXACT residues ({v['n_exact_nonzero']} nonzero), {v['n_family']} affine in mu (the families), {v['n_missing_fit_entry']} missing fit entries (row 36 and its commutator neighbours), {v['n_blocked']} blocked outside the test; "
                  f"controls: fit value = C at the point {v['positive_control_fit_value_equals_point_C']['PASS']}, Euler derivative {v['positive_control_fit_euler_derivative_equals_ray_derivative']['PASS']} -> {v['verdict'][:60]}", flush=True)
            self.cmp("EXACT / nonzero / family / missing fit entry / blocked / trivially zero", [v["n_EXACT"], v["n_exact_nonzero"], v["n_family"], v["n_missing_fit_entry"], v["n_blocked"], v["n_trivially_zero"]], [r["n_EXACT"], r["n_exact_nonzero"], r["n_family"], r["n_missing_fit_entry"], r["n_blocked"], r["n_trivially_zero"]])
            self.cmp("controls (value, Euler)", [v["positive_control_fit_value_equals_point_C"]["PASS"], v["positive_control_fit_euler_derivative_equals_ray_derivative"]["PASS"]], [r["positive_control_fit_value_equals_point_C"]["PASS"], r["positive_control_fit_euler_derivative_equals_ray_derivative"]["PASS"]])
            rv = r["residues"]
            same = sum(1 for k, e in rv.items() if k in v["residues"] and v["residues"][k].get("status") == e.get("status") and v["residues"][k].get("R") == e.get("R") and v["residues"][k].get("LC") == e.get("LC"))
            self.cmp("per-entry residues (status, R, LC; exact strings) equal to the record's", same, len(rv))
            res[n] = {"n_EXACT": v["n_EXACT"], "n_exact_nonzero": v["n_exact_nonzero"], "identical": same, "of": len(rv)}
        self.cmp("the residual verdict", d["verdict"], rec["verdict"])
        return p, res

    def residual_tally(self):
        # the residual receipts of this run carry the sha256 of the fit file they read: the decompressed shipped copy (its strings re-cut,
        # its numeric leaves the record's) -- the tally selects them by that sha16, and compares its counts with the tally of record
        fit_sha16 = self.idx["FIT_C_RAYS_TOP_20260908T085835Z.json.gz"]["uncompressed_sha256"][:16]
        lines = self.run_leg_top("residual-tally", "emit_residual_tally_top.py", ["--fit-sha16", fit_sha16, "--expect", "26", "--work", self.work], ok_rc=(0, 1))
        p = next(l for l in lines if l.startswith("RESIDUAL_TALLY="))[len("RESIDUAL_TALLY="):].split(" sha16=")[0]
        d = json.load(open(p))
        R = self.rec_json("RESIDUAL_TALLY_item65_20260908T095423Z.json")
        tot, rtot = d["totals_over_points_and_nodes"], R["totals_over_points_and_nodes"]
        print(f"  [residual-top] the tally over {d['n_points_with_receipt']} of {d['n_points_expected']} points x 2 d-nodes: {tot['n_EXACT']} EXACT residues, {tot['n_exact_nonzero']} nonzero; per point-node {next(iter(d['per_point'].values()))['nodes']['0']['n_EXACT']} EXACT / "
              f"{next(iter(d['per_point'].values()))['nodes']['0']['n_family']} family / {next(iter(d['per_point'].values()))['nodes']['0']['n_missing_fit_entry']} missing / {next(iter(d['per_point'].values()))['nodes']['0']['n_blocked']} blocked; the same counts at every point and node: {d['the_same_counts_at_every_point_and_node']}", flush=True)
        self.cmp("points with a residual receipt", d["n_points_with_receipt"], R["n_points_with_receipt"])
        self.cmp("totals (EXACT, nonzero, family, missing fit entry, blocked)", [tot[k] for k in ("n_EXACT", "n_exact_nonzero", "n_family", "n_missing_fit_entry", "n_blocked")], [rtot[k] for k in ("n_EXACT", "n_exact_nonzero", "n_family", "n_missing_fit_entry", "n_blocked")])
        self.cmp("the same counts at every point and node", d["the_same_counts_at_every_point_and_node"], R["the_same_counts_at_every_point_and_node"])
        self.cmp("per point-node counts equal to the record's", {t: {n: [x["n_EXACT"], x["n_exact_nonzero"], x["n_family"], x["n_missing_fit_entry"], x["n_blocked"]] for n, x in v["nodes"].items()} for t, v in d["per_point"].items()},
                 {t: {n: [x["n_EXACT"], x["n_exact_nonzero"], x["n_family"], x["n_missing_fit_entry"], x["n_blocked"]] for n, x in v["nodes"].items()} for t, v in R["per_point"].items()})
        # the category overlap: the residual categories (858 per point-node) against the fit categories (828): no double count
        lines = self.run_leg_top("residual-overlap", "emit_residual_overlap_top.py", ["--work", self.work, "--fit-file", self.fit_file_top(), "--computability", self.rec_top("RESIDUAL_COMPUTABILITY_item65_20260907T235904Z.json")])
        po = next(l for l in lines if l.startswith("OVERLAP="))[len("OVERLAP="):].split(" sha16=")[0]
        o = json.load(open(po))
        O = self.rec_json("RESIDUAL_TALLY_OVERLAP_item65_20260908T100254Z.json")
        print(f"  [residual-top] the category overlap: {o['reconciliation']}", flush=True)
        self.cmp("the cross-tabulation residual class x fit class (per point-node)", o["cross_tabulation_residual_x_fit_(per_point_node)"], O["cross_tabulation_residual_x_fit_(per_point_node)"])
        self.cmp("the identity by key (858 = 828 + 30, no double count)", o["identity_by_key"], O["identity_by_key"])
        return {"totals": tot, "overlap": o["identity_by_key"]}

    # ---- the two findings
    def findings(self):
        fitp = self.fit_file_top()
        lines = self.run_leg_top("findings", "emit_underdetermined_class_top.py", ["--fit-file", fitp, "--work", self.work])
        p = next(l for l in lines if l.startswith("UND_CLASS_FILE="))[len("UND_CLASS_FILE="):].split(" sha16=")[0]
        d = json.load(open(p))
        U = self.rec_json("UNDERDETERMINED_CLASS_item65_20260908T085911Z.json")
        for nn in ("0", "1"):
            v, r = d["per_node"][nn], U["per_node"][nn]
            print(f"  [findings] UNDERDETERMINED class, node {nn}: {v['n_underdetermined']} families against {v['n_rays']} rays; rays still needed (p + 2 - 24): {v['more_rays_needed_(p+2-24)_tally']}; by row {v['by_row']} -- a design finding (the ray design counted the ray degree, not the pure factor), not a residue", flush=True)
            self.cmp("families per node", v["n_underdetermined"], r["n_underdetermined"])
            self.cmp("the histogram of rays still needed", v["more_rays_needed_(p+2-24)_tally"], r["more_rays_needed_(p+2-24)_tally"])
            self.cmp("families by row", v["by_row"], r["by_row"])
            self.cmp("families by top degree p", v["by_top_degree_p"], r["by_top_degree_p"])
        F = self.rec_json("FIT_C_RAYS_TOP_20260908T085835Z.json")
        F36 = self.rec_json("FINDING_row36_ring_item65_v2_20260908T033351Z.json")
        for nn in ("0", "1"):
            ents = F["nodes"][nn]["entries"]
            r36 = sorted(k for k in ents if k.startswith("36,"))
            ref = [k for k in r36 if ents[k]["status"].startswith("REFUSED")]
            print(f"  [findings] row 36, node {nn}: {len(ref)} of {len(r36)} entries REFUSED on every ray -- a denominator factor outside the certified kernel ring of {len(F['nodes'][nn]['ring']['pure_linear_forms']) and 22} factors; "
                  f"its lambda-root {F36['per_ray_(36,0)_node0'][0]['lambda_root']} on {F36['per_ray_(36,0)_node0'][0]['tag']}, {F36['per_ray_(36,0)_node0'][1]['lambda_root']} on the six record Q points, ray-dependent on the fresh points; its (s, t, m2) form not read", flush=True)
            self.cmp("row 36 entries REFUSED", [len(ref), len(r36)], [F36["entries"]["n_row36"], F36["entries"]["n_row36"]])
            self.cmp("the row-36 entries named by the finding", sorted(ref), sorted(F36["entries"]["row36_refused_in_v1_by_non_shared_structure"]))
        return {"underdetermined": {nn: d["per_node"][nn]["more_rays_needed_(p+2-24)_tally"] for nn in ("0", "1")}, "row36_refused": F36["entries"]["n_row36"]}

    # ---- the figures of record from the shipped objects alone (no leg runs)
    def tally_top(self):
        self.fit_tally()
        self.fold_gate_tally()
        for tag in self.withheld_top:
            recn = [nm for nm in self.idx if nm.startswith(f"HELDOUT_VERDICT_TOP_{tag}_")][0]
            rec = self.rec_json(recn)
            tot = sum(rec["nodes"][n]["n_exact_match"] for n in rec["nodes"])
            mis = sum(rec["nodes"][n]["n_mismatch"] for n in rec["nodes"])
            print(f"  [tally-top] the withheld ray {tag}: {tot} exact matches over both d-nodes, {mis} mismatches, n_compared {[rec['nodes'][n]['n_compared'] for n in rec['nodes']]} -> {rec['verdict']}; the prediction emitted with the withheld objects present: {rec['pred_emitted_with_outputs_present']}", flush=True)
            self.cmp(f"{tag}: exact matches over both nodes / mismatches", [tot, mis], [2 * 581, 0])
            self.cmp(f"{tag}: n_compared per node", [rec["nodes"][n]["n_compared"] for n in rec["nodes"]], [633, 633])
            self.cmp(f"{tag}: the prediction emitted before the withheld objects existed", rec["pred_emitted_with_outputs_present"], [])
        R = self.rec_json("RESIDUAL_TALLY_item65_20260908T095423Z.json")
        tot = R["totals_over_points_and_nodes"]
        print(f"  [tally-top] the residual tally of record: {tot['n_EXACT']} EXACT residues over {R['n_points_with_receipt']} points x 2 nodes, {tot['n_exact_nonzero']} nonzero (491 + 113 + 32 + 222 = 858 per point-node = 828 fit entries + 30 own-blocked cells; no double count)", flush=True)
        self.cmp("residual tally totals (EXACT, nonzero)", [tot["n_EXACT"], tot["n_exact_nonzero"]], [25532, 0])
        B = self.rec_json("BANK_SUCCESSION_CHECK_item65_20260907T233317Z.json")
        mc = B["closed_merge_counts"]
        print(f"  [tally-top] the bank succession check of record: {mc['merged_absent_from_exact_bank']} merged / {mc['identical']} identical / {mc['mismatched']} mismatched -> {B['verdict']}", flush=True)
        self.cmp("bank succession (merged, identical, mismatched)", [mc["merged_absent_from_exact_bank"], mc["identical"], mc["mismatched"]], [26, 71, 0])
        U = self.rec_json("UNDERDETERMINED_CLASS_item65_20260908T085911Z.json")
        print(f"  [tally-top] the findings of record: {U['per_node']['0']['n_underdetermined']} families per node (rays still needed {U['per_node']['0']['more_rays_needed_(p+2-24)_tally']}); row 36 REFUSED (38 entries per node): a denominator factor outside the certified kernel ring", flush=True)
        return {"ok": True}

    # ---- the planted control on the top block
    def mutate_budget(self, tag, n):
        """one digit of one numerator coefficient of one ray function in a COPY of the shipped ray budget of <tag> node <n>, placed in the working directory."""
        src = self.rec_top(f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json")
        b = json.load(open(src))
        for i, rr in b["rows"].items():
            for j, rf in rr.get("C_ray_functions", {}).items():
                for pos, coef in enumerate(rf["num"]):
                    m = re.search(r"[1-8]", coef)
                    if m:
                        old = coef
                        new = coef[:m.start()] + str(int(m.group(0)) + 1) + coef[m.end():]
                        rf["num"][pos] = new
                        dst = os.path.join(self.ck, f"RAY_DEGREE_BUDGET_TOP_{tag}_node{n}.json")
                        json.dump(b, open(dst, "w"), indent=1)
                        print(f"  [MUTATION CONTROL] the ray budget of {tag} node {n}: entry ({i},{j}) numerator coefficient {pos} '{old}' -> '{new}' (one digit) on a copy in the working directory; expected: the comparison FAILS by name", flush=True)
                        return {"tag": tag, "node": n, "entry": f"{i},{j}", "coefficient": pos, "old": old, "new": new}
        die(RC_USAGE, "mutate-top: no coefficient digit to plant")


def write_out_top(args, receipt, stamp0, wall, npins, R, verdict, rc):
    if not args.out:
        return
    rec = {"PRODUCER": {"script": os.path.basename(__file__), "sha256": sha256_file(__file__), "start": stamp0, "stamp": utc(), "wall_s": wall, "pins_verified": npins, "stamp_source": "date -u"},
           "args": {"point": args.point, "leg": args.leg, "nodes": args.nodes, "top": True, "spot": args.spot, "shard": args.shard, "width": args.width, "merge": args.merge, "mutate_top": args.mutate_top, "bank": args.bank},
           "scope": SCOPE_TOP, "legs_run": R.legs, "inputs_from_record": sorted(set(R.inputs_from_record)), "figures_compared": R.n_cmp, "figures_differing": R.n_fail, "results": receipt, "verdict": verdict, "rc": rc}
    fd = os.open(args.out, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o644)
    with os.fdopen(fd, "w") as f:
        json.dump(rec, f, indent=1)
    print(f"[written] {os.path.basename(args.out)}")


def main_top(args, ap):
    """the top-block dispatch: every --leg of TOP_LEGS, --top alone (= tally-top), --mutate-top."""
    if args.check:
        ap.error("--check is a rows-0..16 tier (the second implementation of the curl); the top block's second implementation is inside curl-top")
    if args.mutate:
        ap.error("--mutate is the rows-0..16 planted control; the top block's is --mutate-top")
    t_all = time.time()
    stamp0 = utc()
    leg = args.leg if args.leg in TOP_LEGS else ("tally-top" if args.leg == "all" else args.leg)
    if leg not in TOP_LEGS:
        die(RC_USAGE, f"row21-offcurve-evaluate: --leg {args.leg} is a rows-0..16 leg; with --top / --rows 17-38 the legs are {TOP_LEGS}")
    print(f"[mode] row 21 off the curve, THE TOP BLOCK (rows 17-38): --leg {leg} --point {args.point} --nodes {args.nodes}" + (" -- MUTATION CONTROL" if args.mutate_top else "") + (" -- spot" if args.spot else ""))
    print(SCOPE_TOP)
    npins = check_pins()
    print(f"[pins] {npins} shipped files verified by sha256")
    R = TopRun(args)
    print(f"[workdir] {os.path.basename(R.work)}/ (ck/, RECEIPTS/, rec/: the legs' objects and the decompressed record copies)" + (f"; kernel bank: {args.bank} (the full bank of record)" if args.bank else "; kernel bank: the shipped slices (kernel/: rows 0..16 + the top block at the two d-nodes)"))
    tag = R.tag_of(args.point) if args.point != "all" else None
    receipt = {"legs": {}, "planted": None}
    if args.mutate_top:
        wt = R.withheld_top[0]
        if leg == "fit-top":
            if args.shard_given:
                die(RC_USAGE, "--mutate-top --leg fit-top plants its digit in entry (17,0) node 0 of the first fit ray, which only the "
                              "default sample (--shard 0 --width 276) re-derives: a non-default --shard / --width under --mutate-top "
                              "is refused by name; run the default sample")
            receipt["planted"] = R.mutate_budget(R.fit_top[0], R.nodes[0])
            args.spot = True
            res = R.fit_spot(args.shard, args.width)
            caught = any(not v["equal"] for v in res.values())
        else:
            receipt["planted"] = R.mutate_budget(wt, R.nodes[0])
            n_fail_before = R.n_fail
            p, res = R.verify_top(wt)
            caught = (R.n_fail > n_fail_before) and any(v["n_mismatch"] > 0 or v["verdict"].startswith("FAIL") for v in res.values())
        wall = round(time.time() - t_all, 1)
        verdict = "MUTATION CAUGHT (the comparison FAILS by name, as expected)" if caught else "MUTATION NOT CAUGHT (a defect of the control)"
        print(f"\nVERDICT {verdict}; total wall {wall} s")
        rc = RC_FAIL if caught else RC_NOTCAUGHT
        write_out_top(args, receipt, stamp0, wall, npins, R, verdict, rc)
        sys.exit(rc)
    pts_all = list(R.pts["points"].keys()) if args.point == "all" else [tag]
    if leg == "tally-top":
        receipt["legs"]["tally-top"] = R.tally_top()
    elif leg in ("assemble-top", "budget-top", "curl-top", "march-top", "fold-gate") and args.point != "all":
        for n in R.nodes:
            if leg in ("assemble-top", "march-top"):
                receipt["legs"][f"assemble-top:{tag}:{n}"] = R.assemble_top(tag, n)
            if leg in ("budget-top", "march-top"):
                receipt["legs"][f"budget-top:{tag}:{n}"] = R.budget_top(tag, n)
            if leg in ("curl-top", "march-top"):
                receipt["legs"][f"curl-top:{tag}:{n}"] = R.curl_top(tag, n)
            if leg in ("fold-gate", "march-top"):
                receipt["legs"][f"fold-gate:{tag}:{n}"] = R.fold_gate_item(tag, n)
    elif leg == "fold-gate":
        receipt["legs"]["fold-gate-tally"] = R.fold_gate_tally()
    elif leg == "fit-top":
        if args.spot:
            receipt["legs"]["fit-top-spot"] = R.fit_spot(args.shard, args.width)
        elif args.merge:
            receipt["legs"]["fit-top-merge"] = R.fit_merge(args.width)
        elif args.shard_given:
            receipt["legs"]["fit-top-shard"] = R.fit_shard(args.shard, args.width)
        else:
            receipt["legs"]["fit-top-tally"] = R.fit_tally()
            print("  [fit-top] the whole re-derivation (1656 entry-node cases; the record's 16 shards took about 5 h wall) is not a served tier: --spot re-derives a deterministic sample; --shard K --width W then --merge is the record's resumable form")
    elif leg == "fit-control":
        rays = [R.tag_of(x) for x in args.rays.split(",")] if args.rays else FIT_RAYS
        receipt["legs"]["fit-control"] = R.fit_control(rays)
    elif leg == "predict-top":
        for tg in (R.withheld_top if args.point in ("all", "Q_record") else [tag]):
            if tg not in R.withheld_top:
                die(RC_USAGE, f"row21-offcurve-evaluate: --leg predict-top needs a withheld ray ({R.withheld_top}), not {tg}")
            receipt["legs"][f"predict-top:{tg}"] = R.predict_top(tg)[1]
    elif leg == "verify-top":
        for tg in (R.withheld_top if args.point in ("all", "Q_record") else [tag]):
            if tg not in R.withheld_top:
                die(RC_USAGE, f"row21-offcurve-evaluate: --leg verify-top needs a withheld ray ({R.withheld_top}), not {tg}")
            receipt["legs"][f"verify-top:{tg}"] = R.verify_top(tg)[1]
    elif leg == "residual-top":
        for tg in pts_all:
            receipt["legs"][f"residual-top:{tg}"] = R.residual_top(tg)[1]
        if args.point == "all":
            receipt["legs"]["residual-tally"] = R.residual_tally()
    elif leg == "findings":
        receipt["legs"]["findings"] = R.findings()
    elif leg == "chain-top":
        for tg in R.fit_top:
            for n in R.nodes:
                have = all(os.path.exists(os.path.join(R.ck, f"{nm}_{tg}_node{n}.json")) for nm in ("CTOP", "MATTOP", "RAY_DEGREE_BUDGET_TOP", "CURLTOP"))
                if have:
                    print(f"  [chain-top] {tg} node {n}: the four objects exist in the working directory; skipped (resumable)", flush=True)
                    continue
                receipt["legs"][f"assemble-top:{tg}:{n}"] = R.assemble_top(tg, n)
                receipt["legs"][f"budget-top:{tg}:{n}"] = R.budget_top(tg, n)
                receipt["legs"][f"curl-top:{tg}:{n}"] = R.curl_top(tg, n)
                receipt["legs"][f"fold-gate:{tg}:{n}"] = R.fold_gate_item(tg, n)
        receipt["legs"]["fold-gate-tally"] = R.fold_gate_tally()
        receipt["legs"]["fit-top-tally"] = R.fit_tally()
        receipt["legs"]["fit-top-spot"] = R.fit_spot(args.shard, args.width)
        for tg in R.withheld_top:
            receipt["legs"][f"predict-top:{tg}"] = R.predict_top(tg)[1]
        for tg in R.withheld_top:
            for n in R.nodes:
                receipt["legs"][f"assemble-top:{tg}:{n}"] = R.assemble_top(tg, n)
                receipt["legs"][f"budget-top:{tg}:{n}"] = R.budget_top(tg, n)
                receipt["legs"][f"curl-top:{tg}:{n}"] = R.curl_top(tg, n)
                receipt["legs"][f"fold-gate:{tg}:{n}"] = R.fold_gate_item(tg, n)
            receipt["legs"][f"verify-top:{tg}"] = R.verify_top(tg)[1]
        for tg in R.fit_top + R.withheld_top:
            receipt["legs"][f"residual-top:{tg}"] = R.residual_top(tg)[1]
        receipt["legs"]["residual-tally"] = R.residual_tally()
        receipt["legs"]["findings"] = R.findings()
    wall = round(time.time() - t_all, 1)
    verdict = "PASS" if R.n_fail == 0 else "FAIL"
    rc = 0 if R.n_fail == 0 else RC_FAIL
    print(f"\nVERDICT {verdict}: {R.n_cmp - R.n_fail} of {R.n_cmp} figures equal to the record's" + (f" ({R.n_fail} differ: FAIL by name above)" if R.n_fail else "")
          + f"; {len(R.legs)} legs run" + (f"; inputs taken from the shipped record: {sorted(set(R.inputs_from_record))}" if R.inputs_from_record else "") + f"; total wall {wall} s")
    write_out_top(args, receipt, stamp0, wall, npins, R, verdict, rc)
    sys.exit(rc)


def main():
    ap = argparse.ArgumentParser(
        description="The crossed box (row 21) off the curve: the exact-integrability chain of the frame-corrected connection on rows 0..16 at "
                    "the record point and six regenerated points, reproduced from the shipped objects and printed beside the record's figures.  "
                    "Labels: L3 rows 17-40 and the 40 kernel entries out of scope; no off-curve evaluator.  L4 seven rays on two leaves through Q "
                    "plus the real-chamber point.  The served lbl3x-evaluate.py is the on-curve evaluator; this script evaluates no amplitude.",
        epilog="measured walls and maximum resident set (GNU time, one process, nice 10, a shared 96-core host at loadavg ~120-140): "
               + "; ".join(f"{k}: {v}" for k, v in WALLS.items()) + ".  Exit codes: 0 every figure equals the record's, 1 FAIL by name, 2 usage, "
               "3 REFUSED by name, 4 pinned file MISSING, 5 a leg did not finish, 6 --mutate not caught.  THE TOP BLOCK (rows 17-38, --top): "
               + "; ".join(f"{k}: {v}" for k, v in WALLS_TOP.items()) + ".  " + SCOPE_TOP)
    ap.add_argument("--point", default="Q_record", help="the point: Q_record (default; the record's own m^2-DE, no new reduction) or one of the six regenerated points by its label (points/points.json) or tag")
    ap.add_argument("--leg", default="all", choices=["assemble", "curl", "verdict", "budget", "fd", "fit", "predict", "verify", "residual", "all", "chain"] + TOP_LEGS,
                    help="which leg (default all = assemble + curl + verdict at --point; chain = the whole seven-point program); the top-block legs (--top) " + ", ".join(TOP_LEGS))
    ap.add_argument("--top", action="store_true", help="the top block (rows 17-38): --leg from the top-block legs; alone = tally-top (the figures of record from the shipped objects)")
    ap.add_argument("--rows", default=None, metavar="A-B", help="'17-38' = --top (the rows-0..16 chain is the default; no other range is served)")
    ap.add_argument("--spot", action="store_true", help="with --leg fit-top: the deterministic spot re-derivation (the entries with index %% --width == --shard per node) compared with the fit of record")
    ap.add_argument("--shard", type=int, default=0, help="with --leg fit-top: the shard index (--spot default 0)")
    ap.add_argument("--width", type=int, default=276, help="with --leg fit-top: the shard width (--spot default 276 = 3 entries per node; the record ran 16)")
    ap.add_argument("--merge", action="store_true", help="with --leg fit-top: merge the shards of the working directory into one fit file and compare its counts with the fit of record")
    ap.add_argument("--mutate-top", action="store_true", help="the top-block planted control: one digit of a withheld ray's budget on a copy -> verify-top FAILS by name (rc 1); with --leg fit-top on a fit ray's budget -> the spot re-derivation differs (rc 1; the default sample only: a non-default --shard / --width is refused by name, rc 2)")
    ap.add_argument("--nodes", default="0,1", help="the d-nodes (0 -> d = 101, 1 -> d = 102; default both)")
    ap.add_argument("--rays", default=None, help="for --leg fit: the fit rays as labels or tags (default the five of record)")
    ap.add_argument("--check", action="store_true", help="with the curl leg: the second implementation at dps 150 and at dps 200 (both must agree with the exact residual to >= 90 digits)")
    ap.add_argument("--mutate", action="store_true", help="the planted control (assemble leg): one coefficient digit of the point's m^2-DE reduction changed on a copy; the scaling-identity gate must FAIL by name (rc 1)")
    ap.add_argument("--workdir", default=None, metavar="DIR", help="where the legs' objects are written (ck/, RECEIPTS/); default a fresh temporary directory")
    ap.add_argument("--bank", default=None, metavar="DIR", help="the full kernel bank of record (kernel_exact.pkl.gz + kernel_manifest.json + kernel_map.json + kernel_denoms.json) instead of the shipped rows-0..16 slice")
    ap.add_argument("--out", default=None, metavar="JSON", help="write the run receipt here (never overwrites; refused before anything runs)")
    args = ap.parse_args()
    try:
        sys.stdout.reconfigure(line_buffering=True)
    except AttributeError:
        pass
    if args.out and os.path.exists(args.out):
        die(RC_USAGE, f"row21-offcurve-evaluate: --out {args.out} exists; refusing before anything runs (never overwrites)")
    if args.rows is not None:
        if args.rows.replace(" ", "") not in ("17-38", "17..38"):
            ap.error("--rows: only 17-38 (the top block) is served; the rows-0..16 chain is the default")
        args.top = True
    args.shard_given = any(x in sys.argv for x in ("--shard", "--width"))
    if args.top or args.leg in TOP_LEGS or args.mutate_top:
        if not args.top and args.leg in TOP_LEGS:
            args.top = True
        return main_top(args, ap)
    if args.check and args.mutate:
        ap.error("--check and --mutate are separate tiers")
    if args.mutate and args.leg not in ("assemble", "all"):
        ap.error("--mutate applies to the assemble leg (--leg assemble or all)")
    t_all = time.time()
    stamp0 = utc()
    print(f"[mode] row 21 off the curve: --point {args.point} --leg {args.leg} --nodes {args.nodes}" + (" -- MUTATION CONTROL" if args.mutate else "") + (" -- two-precision check of the second implementation" if args.check else ""))
    print("[scope] L3: rows 17-40 and the 40 kernel entries out of scope; no off-curve evaluator.  L4: seven rays on two leaves through Q plus the real-chamber point.  No amplitude is evaluated here.")
    npins = check_pins()
    print(f"[pins] {npins} shipped files verified by sha256")
    R = Run(args)
    print(f"[workdir] {os.path.basename(R.work)}/ (ck/ and RECEIPTS/: the legs' objects)" + (f"; kernel bank: {args.bank} (the full bank of record)" if args.bank else "; kernel bank: the shipped rows-0..16 slice (kernel/)"))
    tag = R.tag_of(args.point)
    receipt = {"legs": {}, "planted": None}
    if args.leg == "chain":
        for tg in FIT_RAYS:
            receipt["legs"][f"assemble:{tg}"] = R.assemble(tg)[0]
            receipt["legs"][f"curl:{tg}"] = R.curl(tg)
            receipt["legs"][f"budget:{tg}"] = R.budget(tg)
        receipt["legs"]["fd"] = R.fd()
        receipt["legs"]["fit"] = R.fit(FIT_RAYS)[1]
        for tg in FIT_RAYS:
            receipt["legs"][f"residual:{tg}"] = R.residual(tg)[1]
        for tg in WITHHELD:
            receipt["legs"][f"predict:{tg}"] = R.predict(tg)[1]
        for tg in WITHHELD:
            receipt["legs"][f"assemble:{tg}"] = R.assemble(tg)[0]
            receipt["legs"][f"curl:{tg}"] = R.curl(tg)
            receipt["legs"][f"budget:{tg}"] = R.budget(tg)
            receipt["legs"][f"verify:{tg}"] = R.verify(tg)[1]
            receipt["legs"][f"residual:{tg}"] = R.residual(tg)[1]
        receipt["legs"]["verdict"] = R.verdict(FIT_RAYS + WITHHELD)
    elif args.leg in ("assemble", "all"):
        res, planted = R.assemble(tag, mutate=args.mutate)
        receipt["legs"][f"assemble:{tag}"] = res
        receipt["planted"] = planted
        if args.mutate:
            caught = all(v["gate"] == "FAIL" for v in res.values())
            wall = round(time.time() - t_all, 1)
            verdict = "MUTATION CAUGHT (the scaling-identity gate FAILS by name, as expected)" if caught else "MUTATION NOT CAUGHT (a defect of the control)"
            print(f"\nVERDICT {verdict}: gate {[v['gate'] for v in res.values()]}, rows with nonzero C {[v['fail_rows'] for v in res.values()]}; total wall {wall} s")
            rc = RC_FAIL if caught else RC_NOTCAUGHT
            write_out(args, receipt, stamp0, wall, npins, R, verdict, rc)
            sys.exit(rc)
        if args.leg == "all":
            receipt["legs"][f"curl:{tag}"] = R.curl(tag)
            if args.check:
                d2 = os.path.join(R.work, "ck_dps200")
                os.makedirs(d2, exist_ok=True)
                for n in R.nodes:
                    shutil.copyfile(os.path.join(R.ck, f"C_{tag}_node{n}.json"), os.path.join(d2, f"C_{tag}_node{n}.json"))
                receipt["legs"][f"curl_dps200:{tag}"] = R.curl(tag, dps=200, outdir=d2)
            receipt["legs"]["verdict"] = R.verdict([tag])
    elif args.leg == "curl":
        for n in R.nodes:
            R.ensure(f"C_{tag}_node{n}.json", "assemble")
        receipt["legs"][f"curl:{tag}"] = R.curl(tag)
        if args.check:
            d2 = os.path.join(R.work, "ck_dps200")
            os.makedirs(d2, exist_ok=True)
            for n in R.nodes:
                shutil.copyfile(os.path.join(R.ck, f"C_{tag}_node{n}.json"), os.path.join(d2, f"C_{tag}_node{n}.json"))
            receipt["legs"][f"curl_dps200:{tag}"] = R.curl(tag, dps=200, outdir=d2)
    elif args.leg == "verdict":
        tags = sorted({os.path.basename(f)[2:-11] for f in glob.glob(os.path.join(R.ck, "C_*_node0.json")) if os.path.exists(f.replace("C_", "CURL_", 1))})
        if not tags:
            for n in R.nodes:
                R.ensure(f"C_{tag}_node{n}.json", "assemble"); R.ensure(f"CURL_{tag}_node{n}.json", "curl")
            tags = [tag]
        receipt["legs"]["verdict"] = R.verdict(tags)
    elif args.leg == "budget":
        R.gate0(tag)
        receipt["legs"][f"budget:{tag}"] = R.budget(tag)
    elif args.leg == "fd":
        receipt["legs"]["fd"] = R.fd()
    elif args.leg == "fit":
        rays = [R.tag_of(x) for x in args.rays.split(",")] if args.rays else FIT_RAYS
        receipt["legs"]["fit"] = R.fit(rays)[1]
    elif args.leg == "predict":
        if tag not in WITHHELD:
            die(RC_USAGE, f"row21-offcurve-evaluate: --leg predict needs a withheld point ({[R.pts['points'][t]['label'] for t in WITHHELD]}), not {args.point}")
        receipt["legs"][f"predict:{tag}"] = R.predict(tag)[1]
    elif args.leg == "verify":
        if tag not in WITHHELD:
            die(RC_USAGE, f"row21-offcurve-evaluate: --leg verify needs a withheld point ({[R.pts['points'][t]['label'] for t in WITHHELD]}), not {args.point}")
        receipt["legs"][f"verify:{tag}"] = R.verify(tag)[1]
    elif args.leg == "residual":
        receipt["legs"][f"residual:{tag}"] = R.residual(tag)[1]
    wall = round(time.time() - t_all, 1)
    verdict = "PASS" if R.n_fail == 0 else "FAIL"
    rc = 0 if R.n_fail == 0 else RC_FAIL
    print(f"\nVERDICT {verdict}: {R.n_cmp - R.n_fail} of {R.n_cmp} figures equal to the record's" + (f" ({R.n_fail} differ: FAIL by name above)" if R.n_fail else "")
          + f"; {len(R.legs)} legs run" + (f"; inputs taken from the shipped record: {sorted(set(R.inputs_from_record))}" if R.inputs_from_record else "") + f"; total wall {wall} s")
    write_out(args, receipt, stamp0, wall, npins, R, verdict, rc)
    sys.exit(rc)


def write_out(args, receipt, stamp0, wall, npins, R, verdict, rc):
    if not args.out:
        return
    rec = {"PRODUCER": {"script": os.path.basename(__file__), "sha256": sha256_file(__file__), "start": stamp0, "stamp": utc(), "wall_s": wall, "pins_verified": npins, "stamp_source": "date -u"},
           "args": {"point": args.point, "leg": args.leg, "nodes": args.nodes, "rays": args.rays, "check": args.check, "mutate": args.mutate, "bank": args.bank},
           "labels": {"L3": "rows 17-40 and the 40 kernel entries out of scope; no off-curve evaluator", "L4": "seven rays on two leaves through Q plus the real-chamber point"},
           "legs_run": R.legs, "inputs_from_record": sorted(set(R.inputs_from_record)), "figures_compared": R.n_cmp, "figures_differing": R.n_fail, "results": receipt, "verdict": verdict, "rc": rc}
    fd = os.open(args.out, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o644)
    with os.fdopen(fd, "w") as f:
        json.dump(rec, f, indent=1)
    print(f"[written] {os.path.basename(args.out)}")


if __name__ == "__main__":
    main()
