#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Build `artifacts/rev-RESEARCH-HANDOFF.md`: the served handoff with ONE inserted block. Why this document and not the two obvious ones. The R2 row lives in `research/OUTCOMES.md` and the owning note is `research/structured-dispersion-estimate.md`; BOTH already carry a pending revision from the same group review (#812 and #814) built on the served base, and #812's own bytes are not fetchable from this store (three candidate attachment routes answer 404). Filing a third copy against either base is exactly the collision #1950 warns about. `research/RESEARCH-HANDOFF.md` is the consumer-facing consolidation of section 3 -- "the exact target and remaining object" -- it has no pending revision, and it is where a lane reads the obligation before choosing work. The insertion is after the paragraph that introduces the (D1) region, which is the sentence a consumer reads immediately before deciding whether the operator route is still open. """ import hashlib import os RUN = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SRC = os.path.join(RUN, "work", "served", "research__RESEARCH-HANDOFF.md") DST = os.path.join(RUN, "artifacts", "rev-RESEARCH-HANDOFF.md") BASE_SHA = "b3f33f44c99470cac0002cae9f5ea10471b8fd69f6523b599302b53dd0933fc2" ANCHOR = ("read twice on 2026-09-08; it is a regional upper bound and changes no\n" "signed claim.\n") BLOCK = """ **Obligation status of the small-gcd target (audit of 2026-09-17).** One of the two named attack directions on the 7/200 is now priced and closed, and it is recorded here because this section is what a consumer reads before choosing work: the both-index coefficient of (D1) does **not** have low rank. Its rank is the number of distinct ratios `h/l`, `x^{51/100-o(1)}` -- exactly, because the DFT is invertible so the rank is the dimension of the span of the pair profiles, and `Phi` is a Vandermonde in the ratio `h/l` -- and `||gamma||_nuc` is `0.89-0.90 * sqrt(rank)` times `||gamma||_F`. So the Hilbert-Schmidt interface to the paper's operator-norm results is short by `sqrt(rank)`, between `x^{0.255}` and `x^{0.475}`, i.e. 14.6 to 27.1 times the 7/400 that step was to buy; the proved end alone is 1.07 times the retracted 19/80 margin. No constant, no window and no support information can absorb a power, so **that route cannot reach the 7/400**, and the obligation to attack is exactly the reopening condition of the owning note: a saving over `Q^{3/2}E^3` of more than `x^{7/200}` in the moment `sum_q Lambda(q) M_q`, equivalently more than 7/400 in the block exponent at the top sector `(rho,sigma)=(6/25,1/20)`. Two exact re-checks from the same audit, recorded because both are cited downstream. The second-moment constant of the small-gcd class is `prod_{p|c}(1-1/(p(p-1)))^{1/2} >= sqrt(Artin) = 0.6115`, not 0.7797, which is `sqrt(prod(1-1/p^2)) = sqrt(6/pi^2)` and is `c`-independent. And the R2 row's clause "by Hilbert-Schmidt an arbitrary both-index coefficient IS admissible with the Frobenius norm as its price" is false; it must read "admissible at the nuclear price", with `rank gamma = x^{51/100-o(1)}` for (D1)'s own coefficient. The exact replacement text is filed with the audit, because OUTCOMES.md carries a pending revision on the same base. """ def main(): raw = open(SRC, "rb").read() sha = hashlib.sha256(raw).hexdigest() if sha != BASE_SHA: raise SystemExit("base is not the served copy: %s != %s" % (sha, BASE_SHA)) text = raw.decode("utf-8") if text.count(ANCHOR) != 1: raise SystemExit("anchor occurs %d times, not once" % text.count(ANCHOR)) if "Obligation status of the small-gcd target" in text: raise SystemExit("the block is already present") out = text.replace(ANCHOR, ANCHOR + BLOCK) with open(DST, "w", encoding="utf-8", newline="\n") as fh: fh.write(out) added = len(out.splitlines()) - len(text.splitlines()) print("base %s %d bytes %d lines" % (sha[:12], len(raw), len(text.splitlines()))) print("rev %s %d bytes %d lines (+%d / -0)" % (hashlib.sha256(out.encode()).hexdigest()[:12], len(out.encode()), len(out.splitlines()), added)) print("wrote %s" % DST) return 0 if __name__ == "__main__": raise SystemExit(main())