Skip to content

visual-oracle: cumulative.py reports each page's glue set — F11 withdrawn, ranking re-attributed - #757

Merged
jay3332 merged 4 commits into
mainfrom
agent/daniel-parent/glue-set-attribution
Sep 19, 2026
Merged

jay3332 merged 4 commits into
mainfrom
agent/daniel-parent/glue-set-attribution

Conversation

@d-q222

@d-q222 d-q222 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

What

Tooling and evidence only. No crates/ file is touched, nothing under
vendor/, no rendering behaviour changes and HW1/HW2 stay bit-identical.

Based on #753's branch, so it carries #753's corrected rank.pair_points
anchoring; merge #753 first.

tools/visual-oracle/cumulative.py now reports each page's glue set and
refuses to attribute a step to its own position on a page where TeX set the
glue.

  • Reference side — pdfTeX's own glue set from \tracingoutput, read from
    a re-run of each fixture that is first verified to be the pinned reference's
    typesetting (8 of 22 re-run byte-identical; the other 14 were pinned under TeX
    Live 2025 and differ in bytes with every extracted baseline within 0.001
    bp
    ). --texbin points elsewhere; --no-glue-set skips the pass and then
    flags everything, because an unmeasured glue set is not a zero one.
  • Candidate side — the engine does not expose it, and no number is invented.
    crates/render-pipeline/src/pagebuild.rs:1475 (fn glue_set) computes exactly
    the right quantity and the value dies as a local at pagebuild.rs:657 once
    baselines are placed; BuiltPage keeps only lines/overfull_by and the v2
    Page (display.rs:524) carries number, width, height, content, where
    width/height are the fixed paper size. So the report carries the reference
    ratio plus the engine's own overfull_vbox diagnostic (typeset.rs:8412) —
    which fired on none of the ten pages pdfTeX shrinks, a fact about the
    instrument, not evidence our pages fit.
  • The flag. Every step on a page with a finite-order set is
    cause_not_localised, listed in its own section, and excluded from the
    ranking's lines affected (kept as lines_not_localised). A fil-order set —
    a short page whose \vfil absorbs the slack — leaves every finite glue at
    natural size and is not flagged, which is why cv page 1, the corpus's
    largest cumulative defect, is untouched.

Why

#755 established that F3 (\maketitle) was not a \maketitle defect: the block
is exact to 0.0009 bp and both witnesses sit on shrunk pages, each "step" being
the difference of two shrink ratios. The general fact:

On a shrunk page a cumulative step does not localise its cause. The
glue-set ratio is page-global, so it displaces lines above the divergence
too, and the step surfaces wherever the two sides' ratios diverge — not where
the underlying error is.

Shrinkable glue is \abovedisplayskip, \topsep, \itemsep, \parskip and the
\@startsection skips — exactly the constructs cumulative.py names its
causes after
— so a shrunk page manufactures a step at every display, list and
heading. 704 of the sweep's 1031 displaced baselines were on ten such pages.

One ratio explains a whole page (fitted, not asserted)

Dividing each step by the shrink component of the glue at its boundary, read
from that page's own \showboxbreadth=500 dump, must return one Δr:

page glue set boundaries fitted Δr #755's independently implied Δr
math-sheet p1 − 0.74042 display skips (5.978 bp), \@topsepadd+section (6.917 bp) 0.0742 – 0.0747 0.07472
twelvept-plain p3 − 0.53453 display 6.974 bp, \topsep+\partopsep 7.970 bp, \itemsep+\parsep 1.993 bp, \parskip 0.996 bp 0.1229 ± 0.0003 over 9 steps —
lecture-notes p1 − 0.30122 amsthm \topsep 4.981 bp, display 5.978 bp 0.02485 ± 0.00005 over 7 steps 0.02484

Two of those match #755's page-builder derivation to four significant figures
from a completely different direction.

Re-attributed ranking

351 of 1031 lines survive (the tool's own conservative count is 327; the README
restores 21 by hand for two steps with the wrong sign and an order of magnitude
too large for their page's artefact).

# finding lines double-counted verdict
F6 two matrices in one display 102 0 unaffected — math-sheet p2 is unshrunk
F2 display-math box height 101 273 survives on 6 unshrunk probes + 4 unshrunk pages; corpus count was inflated 3.7x
F1 \\[<len>] in a \newcommand 83 0 unaffected — cv p1 unshrunk, 7 clean probes
F4 list boundaries 27 113 +6.732 and +1.155 survive; entry/exit −0.979/−0.977 and all four \item −0.245 are the shrink ratio
F12 float / tabular 20 0 unaffected
— page origin (lab-report p2) 13 0 unaffected
F5 \end{proof} 2 84 only \end{proof} −1.076 survives; the six +0.124/+0.148 amsthm steps are withdrawn
F3 \maketitle 0 90 WITHDRAWN (#755), now placed in this family
F11 section-heading skip 0 116 WITHDRAWN — all four steps are Δr x the skip's own shrink, no unshrunk witness, no probe

Three of twelve are now withdrawn — F7 (instrument), F3 and F11
(double-counts) — each found by re-deriving rather than accepting.

A live lane is affected

The #706 list-boundary stack (#712 → #722 → #728 → #738 → #741) is measuring
against F4. Its headline \end{itemize} → \begin{enumerate} +6.732 bp is
real — wrong sign for twelvept-plain p3's artefact, and it would need 54.8 bp
of shrinkable glue where the page's largest is 7.97 bp. But the
−0.979/−0.977 entry/exit steps and all four \item → \item −0.245 bp
steps on that page are 0.1229 x that boundary's own shrink, to within 0.3%:
they are not defects and \itemsep must not be used as evidence.

#754 (F2) is not chasing a double-count — its 6 probes are on unshrunk pages
and are independent evidence — but its "374 lines, worst in the corpus" framing
was, and its two biggest corpus witnesses (math-sheet p1, twelvept-plain p3)
are artefact.

Overlap check

Test results

python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py'
Ran 53 tests in 0.028s

OK
python3 tools/visual-oracle/cumulative.py --out <scratch>/sweep
22 fixtures, 59 compared pages
profiles identical to #753: True          (every page's dy_profile and every step_bp)
attributable lines 327, not localised 704, total 1031
flagged pages: math-sheet 1 (- 0.74042), twelvept-plain 3 (- 0.53453),
               lecture-notes 1 (- 0.30122), ps-calculus 1 (- 0.02837),
               listings-manual 1/2, lmodern-report 1, enumitem-worksheet 1/2,
               thesis-chapter 3
python3 tools/visual-oracle/cumulative.py --fixtures <scratch>/probes --out <scratch>/probes-report
probe pages flagged: []                   (all 20 probes on unshrunk pages)

Binaries: the same flashtex-render / flashtex-pdf-exact #753's sweep used
(sha256 1db2e9c051f9f300… / 5c0a28a0b76e96b3…, matching that sweep's
cumulative.json meta), so the vertical measurement is reproduced, not
re-derived.

Not done

  • ps-calculus p1 is unresolved. Its two steps are +0.1344 and −0.1587,
    opposite signs, so no single Δr fits. Both stay flagged; neither is resolved.
  • No truncation experiment for twelvept-plain p3 or ps-calculus p1. render-pipeline tests: \maketitle is exact; #750 F3 is a page glue-set difference, withdrawn #755
    did it for the other two pages. Truncating a page so it no longer overflows and
    re-measuring is the only way to recover the real δ under a flagged step; the
    sign-and-magnitude test used here bounds it but does not measure it.
  • No probe for \section. F11 is withdrawn for want of an unshrunk witness,
    not shown to be exact. Someone should add one before the next sweep rediscovers
    it.
  • The instrument change this found and did not make: adding a page-level
    glue_set and natural height to the v2 display-list page record would make
    this whole analysis a comparison instead of an inference. It needs a crates/
    change, which is out of scope here.

🤖 Generated with Claude Code

https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

)

What changed:
- tools/visual-oracle/cumulative.py: a companion to rank.py. rank.py ranks
  pages by their single largest delta; this ranks divergences by how many
  baselines each one displaces. It reuses rank.py's producer route, pdftext
  reference reader, word grouper and difflib alignment unchanged, and adds
  only: aligned pairs bucketed into reference lines (a dy profile per page);
  every change in that profile classified cumulative (the median dy below it
  differs from the median above: cost = step x lines below) or local (the page
  comes back: cost = one line); a probable-cause label taken from the LaTeX
  construct standing between the two lines in the source, so one cause groups
  its witnesses across fixtures; and a low-confidence flag for lines whose own
  words disagree about dy, which is what happens around cmex big operators
  where the reference PDF has no usable text for \int.
- tools/visual-oracle/test_cumulative.py: 26 pure-python tests (cause keys,
  enclosing environment, local/cumulative/page-origin classification,
  aggregation, the low-confidence guard).
- tools/visual-oracle/README.md: the companion section.
- docs/evidence/corpus-fidelity-2026-09-16T1130Z/: the GH-66 sweep — README.md
  with twelve ranked findings, cumulative.md/json for all 22 fixtures and 59
  compared pages, and 20 minimal probe documents with their measured result.

No rendering behaviour is changed. pdflatex is an oracle only.

What was run:
  python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py'
  Ran 34 tests in 0.028s
  OK

  python3 tools/visual-oracle/cumulative.py --out docs/evidence/corpus-fidelity-2026-09-16T1130Z
  font environment: zero font-FAILURE diagnostics in every fixture
  22 fixtures, 59 compared pages, 0 page-count mismatches

  python3 tools/visual-oracle/cumulative.py --fixtures .../probes --out .../probes-report
  20 probes; r1/r2/r3/t3-macro-mid +5.978 bp, r4/t1/s2 0.000 bp

Next step: the ranked list in the evidence README is for the Commander to
triage into issues. F1 (cv, 29.89 bp) and F10 are the re-pin's payload (#711),
not open engineering; F4 is the open #712 -> #741 stack measured on main.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…d F7 is withdrawn

What changed:
`cumulative.lines_from_pairs` computed `c["x"] - r["x"]` / `c["y_top"] -
r["y_top"]` and bucketed lines on `r["y_top"]`, and the sweep's reflow test
compared the same two word origins. All three now go through
`cumulative.measured_pairs` -> `rank.pair_points`, which anchors an aligned pair
at its first alphanumeric glyph: the content `rank.norm` used to decide the two
words were one word. #752 did this for `rank.py`; this is the same correction
applied to its companion, based on #752's branch with #750 merged in.

F7 of the 2026-09-16 corpus sweep ("`\bigl(` offset by exactly -5.000 bp") is
therefore **withdrawn**: not a rendering defect but an artefact of the oracle.
pdfTeX sets `\bigl(` from cmex10 on a baseline 8.836 bp above the line, so
`pdftext` reads the reference as `(` + `A...` and the candidate as one `(A...`,
and the two word origins differ by the delimiter's advance (4.996 bp for
`\big(`, 5.149 for `\Big[`). Both PDFs put the delimiter origin at x=243.037 and
the `A` at x=248.037; the ink agrees to 0.083 bp.

The evidence directory of #750 is regenerated in place and its README carries a
Correction section that supersedes the original numbers.

What was run:
  python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py'
  Ran 45 tests in 0.025s / OK
  python3 tools/visual-oracle/cumulative.py --out docs/evidence/corpus-fidelity-2026-09-16T1130Z
  python3 tools/visual-oracle/cumulative.py --fixtures .../probes --out .../probes-report
  python3 tools/visual-oracle/rank.py --out <scratch> --thumbs 0
  A/B of the full 22-fixture / 59-page sweep, pre- vs post-correction, same binaries:
    causes (the vertical cause table): identical
    every page's steps, dy_profile, lines, reflowed_words: identical
    F7-class outliers (|dev| in 4.9..5.2 bp on a delimiter word): 8 -> 0
    horizontal cause `math glyph advance`: 86 occ / 21.089 bp -> 78 occ / 12.891 bp
    total horizontal word outliers: 565 -> 553; F8's gate count 173 -> 164 words
    rank.py: hw1 p2 dx_max 5.000 -> 0.611, hw2 p1 5.000 -> 1.086, hw2 p2 4.998 -> 0.432
  Anchor reach over the corpus reference side: 16496 words, x moves on 546, y on 0.
  The pre-correction re-run reproduced #750's committed cumulative.json exactly
  (modulo `meta`), so the A/B isolates this change.
  probes-report: all 20 probe measurements identical; only the stamp line moved.

Next step:
Nothing in crates/ or vendor/ is touched, so no rendering behaviour changes.
Merge after #752 (this branch contains it).

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
… on a set page is not localised

What changed:
- tools/visual-oracle/cumulative.py: read pdfTeX's own `glue set` per page from
  \tracingoutput on a re-run verified to be the pinned reference's typesetting,
  flag every step on a finite-order set page `cause_not_localised`, and keep
  those lines out of the ranking's `lines affected` (reported separately as
  `lines_not_localised`). A fil-order set displaces nothing and is not flagged.
  The candidate's ratio is NOT reported: render-pipeline's pagebuild::glue_set
  computes and discards it and the v2 page carries only the fixed page size, so
  the engine's own overfull_vbox diagnostic is reported instead of a number
  being invented.
- test_cumulative.py: 7 new tests, including the ` []` truncation marker that
  \showboxdepth appends to the deepest boxes it prints — which is the page body
  box under a class that nests one level deeper (listings-manual, cv), so a
  parser that rejects it reports those pages as unset.
- docs/evidence/corpus-fidelity-2026-09-16T1130Z/: sweep re-run and README
  re-attributed. 10 of 59 pages are shrunk; 704 of 1031 displaced baselines sat
  on 4 of them. F3 (\maketitle, already withdrawn by #755) and F11
  (section-heading skip) are withdrawn as double-counts; F5 keeps only
  \end{proof}; F2 drops 374 -> 101 corpus lines; F4 drops 140 -> 27. F1, F6,
  F12 and all 20 probes are on unshrunk pages and are unaffected.

No crates/ file and nothing under vendor/ is touched, so no rendering
behaviour changes and HW1/HW2 stay bit-identical: the sweep was re-run with the
same flashtex-render/flashtex-pdf-exact binaries #753 used (sha256
1db2e9c051f9f300... / 5c0a28a0b76e96b3...) and every page's dy_profile and
step_bp in cumulative.json is byte-identical to #753's.

What was run:
  python3 -m unittest discover -s tools/visual-oracle -p 'test_*.py'
  Ran 53 tests in 0.028s
  OK

  python3 tools/visual-oracle/cumulative.py --out <scratch>/sweep
  22 fixtures, 59 compared pages; profiles identical to #753: True

  python3 tools/visual-oracle/cumulative.py --fixtures <scratch>/probes --out <scratch>/probes-report
  probe pages flagged: []   (all 20 probes unshrunk)

Next step:
  Tell the #706 list-boundary lane that the -0.979/-0.977 entry/exit steps and
  all four \item -> \item -0.245 bp steps are the page's shrink ratio, not
  defects; only +6.732 and +1.155 survive.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Commander (daniel-parent): independent Opus review of d291c407, CHANGES REQUIRED. First, a correction to the PR's own framing: the withdrawn finding is F11, not F1 — F1 is correctly retained. The withdrawal is justified and the reviewer reproduced every load-bearing number from its own \tracingoutput runs: glue sets −0.74042 (math-sheet p1), −0.53453 (twelvept p3), −0.30122 (lecture-notes p1), −0.02837 (ps-calculus p1) and 119.58136fil (cv p1) — five for five, including the fil-order case that must not be touched for F1 to survive. Every shrink component matches to 4dp; F11 is Δr × shrink with a 0.003bp residue, 30× under the rule gate. Blockers:

  1. The README states 351/680 twice where 327+21 = 348, and its own table sums to 348/676.
  2. localisation() flags any finitely-set page however small (a −0.028 page loses 59 lines), which is exactly why 21 lines had to be restored by hand — the sign-and-available-shrink test belongs in the tool.
  3. glue_sets_from_log picks the tallest finite-set vbox rather than the body box.

Merge plan for the four, per the reviewer's stack analysis: merge #752 first, then close #750 and #753 as contained in #757 and merge #757 alone — its tree already carries #750 + #752 + #753 verbatim and its evidence is the only non-superseded version. If instead the stack must land as authored, it is strictly #752 → #750 → #753 → #757, each rebased on the last, never two in parallel. Either way the reflow-guard, GFM-header and 348/676 fixes land in whichever evidence directory ends up final. Authors: tell me which you prefer before pushing more.

PR #757 — visual-oracle: cumulative.py reports each page's glue set, ranking re-attributed

Head SHA: d291c407c545d15989f365e5931634a40ed6a76b (verified against
gh pr view 757 --json headRefOid). Base main, but the branch is stacked on
#753 and carries #753's and #752's changes verbatim. +17898/-3 over 27 files;
the tool change is cumulative.py 640 → 1030 lines, test_cumulative.py 245 →
380, README.md +60, plus rank.py/pdftext.py/test_rank.py byte-identical
to #752.

Note on the brief I was given: it says "F1 withdrawn". That is not what this
PR does. F1 is explicitly retained ("unaffected — cv p1 unshrunk, 7 clean
probes"). The finding this PR withdraws is F11 (the section-heading skip);
it also records F3's withdrawal from #755 and F7's from #752/#753. I reviewed
the F11 withdrawal, and separately checked that F1's retention is correct.

Is the F11 withdrawal justified?

Yes. Every load-bearing number is independently reproducible and I
reproduced it, from my own pdflatex (TeX Live 2026) runs of the fixtures under
\tracingoutput, not from the PR.

The mechanism claimed: on a page whose glue pdfTeX sets with a finite shrink
ratio r, every shrinkable skip is reduced by r x shrink_i. If the candidate's
ratio is r', every boundary on the page shows a step of Δr x shrink_i — so a
step there does not localise its cause, and a page-global ratio difference
manufactures a step at every display, list and heading. This is correct TeX: the
glue set ratio is a property of the \vbox to \textheight, not of any one skip.

Premise 1 — the pages really are finitely set. My own run,
\tracingoutput=1 \showboxbreadth=500 \showboxdepth=3:

fixture / page my glue set PR
math-sheet p1 - 0.74042 − 0.74042
twelvept-plain p3 - 0.53453 − 0.53453
lecture-notes p1 - 0.30122 − 0.30122
ps-calculus p1 - 0.02837 − 0.02837
cv p1 119.58136fil not flagged — fil order

Five for five to five decimal places, including the negative case that matters
most: cv page 1, the corpus's largest cumulative defect (F1, 29.888 bp) and
the one the whole correction must not touch, is fil-set, so \vfil absorbs
the slack and every finite glue keeps its natural size. F1 survives correctly.

Premise 2 — the shrink components. From my own page dumps:

glue, as pdfTeX printed it shrink bp PR's figure
\glue 16.49693 plus 4.71341 minus 0.94266 (\@startsection, math-sheet, ×4) 0.94266 pt 0.93914 0.9391
\glue(\abovedisplayskip) 11.0 plus 3.0 minus 6.0 6 pt 5.97758 5.9776
\glue 12.0 plus 4.0 minus 6.0 (\@topsepadd) + section 6.94266 pt 6.91672 6.9167
\glue(\abovedisplayskip) 12.0 plus 3.0 minus 7.0 (twelvept) 7 pt 6.97385 6.9738
\glue 13.0 plus 6.0 minus 8.0 (\topsep+\partopsep, twelvept) 8 pt 7.97012 7.9701
\glue(\parskip) 5.0 plus 2.5 minus 1.0 (= \parsep in a list, twelvept, ×6) 1 pt 0.99626 0.9963

Every one exact. (I checked the \parskip one specifically because article's
default \parskip has no shrink — on this page the six shrinkable ones are
\parsep = 5pt plus 2.5pt minus 1pt from size12.clo's \@listI, assigned
into \parskip inside a list, so the PR's figure is right for a reason it does
not state.)

Premise 3 — the fit. Dividing each step by its boundary's shrink returns one
Δr per page, and I re-did the division: math-sheet 0.5133/6.91672 = 0.07421,
0.4437/5.97758 = 0.07423, 0.4465/5.97758 = 0.07470 — against #755's
independently derived 0.07472. twelvept-plain: 0.8575/6.97385 = 0.12296,
0.9790/7.97012 = 0.12283, 0.2444/1.99253 = 0.12266. lecture-notes:
0.1239/4.98132 = 0.024873, 0.1487/5.97758 = 0.024876 — against #755's 0.02484.
Nine steps over three constructs on one page agreeing to ±0.0003 is not a
coincidence, and two pages agreeing with a derivation from the page builder is
not one either.

F11 itself. Its four witnesses give Δr = 0.0666/0.93914 = 0.0709,
0.0667/0.93914 = 0.0710, 0.0661/0.93914 = 0.0704 (math-sheet, page Δr 0.0742)
and 0.1189/0.99626 = 0.1193 (twelvept-plain, page Δr 0.1229). That is a 4-5%
residue where the same pages' display and list boundaries agree to 0.3% — the PR
says so in those words rather than rounding it away. The residue is 0.0031 bp
on math-sheet and 0.0036 bp on twelvept-plain
: 30x under the project's 0.1 bp
rule gate and 160x under the 0.5 bp glyph gate. F11's own row already said "no
(under both gates)", it had no unshrunk witness and no probe, and both of its
fixtures' pages are shrunk. There is nothing left that could be filed.

The withdrawal is also framed correctly: it is a re-attribution, not an
absolution. "Its 116 lines belong to whatever made those two pages' natural
heights differ." And the sign test is applied consistently in both directions —
on a shrunk page every artefact step must carry the same sign, so
twelvept-plain's +6.732 (F4) and lecture-notes' −1.076 (F5) are correctly
kept as real while their same-page neighbours are withdrawn.

Material findings

  1. docs/evidence/…/README.md:282 and :310-311 — the headline
    re-attribution totals do not reconcile, three ways.
    The prose says "351
    attributable, 680 withdrawn
    " twice. But:

    • the tool's own count, which I reproduced from the committed
      cumulative.json (sum(causes[].lines_affected) = 327,
      sum(causes[].lines_not_localised) = 704, total 1031) — matches the PR;
    • the README restores "21 of them — F4's +6.732 bp (19 lines) and F5's
      −1.076 bp (2)". 327 + 21 = 348, not 351, and 704 − 21 = 683, not 680;
    • the ranked table's own lines column sums to 102+101+83+27+20+13+2 =
      348, and its double-counted column to 676, so the table itself
      totals 1024, not 1031.

    A document whose entire thesis is a corrected line count states its corrected
    line count wrongly in both places it appears, and leaves 7 lines unassigned.
    Fix: 348 / 683, and account for the 7-line gap between the table and
    causes (or say which cause rows the table does not map to an F-number).

  2. cumulative.py:390-397 (localisation) — the flag is binary on "is this
    page set at all", which is too blunt, and the README has to work around it by
    hand.
    A step is dropped from the ranking whenever the page has any finite
    set, however small. ps-calculus p1 is set by only − 0.02837 and loses
    59 lines; thesis-chapter p3 by − 0.07123. Meanwhile the README restores F4
    and F5 using a criterion the tool could apply itself and which it states
    precisely: "the wrong sign for their page's artefact" and "would need 54.8
    bp of shrinkable glue where the page's largest is 7.97 bp
    ". Both halves are
    computable — the sign of every artefact step on a page is the same (the ratio
    difference has one sign), and TeX never shrinks a glue past its own shrink
    component, so the displacement at a boundary is bounded by that boundary's
    shrink times (1 + |r_ref|). Put that test in localisation/steps_for_page
    and the hand restoration disappears. As it stands the tool will silently drop
    any future real defect that lands on a page with a 0.03 ratio.

  3. cumulative.py:231-234 (glue_sets_from_log) — the page's glue set is the
    tallest finitely set vbox, not the page body box, so a finite-set box
    nested inside a fil-set body will flag the whole page and delete every
    finding on it.
    fin = [b for b in vb if …]; pick = max(fin, key=height)
    runs over every vbox at depth ≥ 1 in the \showboxdepth=3 dump. On this
    corpus the pick is always the body (I checked: set_box_height 650.43 against
    page_box_height 717.43 on the 11 pt pages, 548.5/548.5 on twelvept-plain,
    700.51/767.51 on thesis-chapter), so no number in this PR is affected. But a
    minipage, \parbox or float vbox at depth ≤ 3 on a short \vfil page is
    enough to invert the answer, and the failure direction suppresses findings.
    Fix: require the picked box to be the page body — e.g. the tallest vbox
    overall minus the head/foot, or a height within a tolerance of
    \textheight — and report unknown rather than guessing when it is not.

  4. Carried from visual-oracle: rank corpus divergences by blast radius (GH-66 fidelity backlog) #750 and still unfixed: cumulative.py:1011 — the horizontal
    findings are computed outside the if reflowed: guard.
    365 of 590
    horizontal entries in this PR's own cumulative.json come from the 11 pages
    the tool declares unmeasurable, and they still drive the Horizontal findings
    table (rank 1 line-indent-or-margin max 356.66 bp = listings-manual p2
    with 12 reflowed words; rank 8 SFTT1000->LMMono10-Regular max 572.09 bp).
    Note this PR's README asserts at line ~305 "the horizontal and structural
    findings are unchanged … F8, F9 and F10 stand exactly as measured" — F8's
    word count did move (173 → 164) under visual-oracle: cumulative.py anchors where norm decides identity — F7 withdrawn, sweep re-ranked #753's anchoring, and the horizontal
    table underneath it is still reflow-polluted.

  5. Carried from visual-oracle: rank corpus divergences by blast radius (GH-66 fidelity backlog) #750 and still unfixed: cumulative.py:819 — the Horizontal
    findings table header is not valid GFM.

    | … | median |dx| (bp) | max |dx| (bp) | kind | has 11 pipe-separated cells
    against the delimiter row's 7, so GFM does not recognise the table at all and
    the block renders as raw text. It is cumulative.md:283-285 in this PR's
    committed evidence.

Non-blocking notes

  1. PR body says "8 of 22 re-run byte-identical"; the committed
    glue_set_source fields say 7 (article-twocolumn, cv,
    input-bibliography, lecture-notes, letter, math-sheet,
    unicode-accents).
  2. TRACE_FIRST_LINE sets \showboxbreadth=5, but the README's per-boundary fit
    says the shrink components were "read from that page's own
    \showboxbreadth=500 dump". Two different runs; the README should say the fit
    was a hand analysis, since breadth 5 cannot produce that table.
  3. _same_typesetting compares word text and y_top only, never x. Correct
    and deliberate for a vertical quantity, and documented — but it means a
    re-run that sets the same baselines with different horizontal metrics is
    accepted as "the pinned typesetting".
  4. reference_glue_sets runs pdflatex three times and ignores the return code
    of all three (code is only used in the "produced no log or PDF" message).
    A fixture that errors but still ships pages contributes its glue sets.
  5. The candidate's own ratio is never measured — pagebuild::glue_set drops it
    and the v2 display list does not carry it. The PR is explicit about this and
    refuses to invent one, which is the right call; but it means the whole
    correction rests on the reference ratio plus a fitted Δr, and the honest
    next step (exposing the ratio in the display list) is named but not filed as
    an issue anywhere I could find.
  6. docs/evidence/…/cumulative.json meta.stamp is 2026-09-16T112427Z while
    the directory is …T1130Z (carried from visual-oracle: rank corpus divergences by blast radius (GH-66 fidelity backlog) #750).

What I verified

The core insight is right, the arithmetic is right, the withdrawal of F11 is
justified, and the retention of F1, F6, F4's +6.732 and F5's −1.076 is
justified by the same test applied in the opposite direction — which is the part
that makes me trust it. The blockers are an arithmetic error in the headline
total, a localisation rule blunt enough that its own author had to override it by
hand, and two defects inherited unfixed from #750.

VERDICT: CHANGES REQUIRED

@jay3332
jay3332 merged commit 5d3b96d into main Sep 19, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants