Skip to content

render-pipeline: re-pin vendor/tex-expansion to 7054ee41 (makes #840 reach users) - #853

Merged
d-q222 merged 2 commits into
mainfrom
agent/daniel-parent/repin-tex-expansion
Sep 18, 2026
Merged

d-q222 merged 2 commits into
mainfrom
agent/daniel-parent/repin-tex-expansion

Conversation

@d-q222

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

Copy link
Copy Markdown
Contributor

This is the change that makes #840 real. Until now the TAB catcode fix was inert: flashtex-cli builds against the frozen snapshot, and the live crates/tex-expansion is not in its dependency graph at all, so the merged fix changed nothing a user could see. An independent reviewer proved that by building the CLI from #840's own branch and watching the repro still fail.

Minimal re-pin

The only commits to crates/tex-expansion since pin 4511166e are the fix and its review follow-up, so the vendored diff is exactly:

crates/render-pipeline/vendor/tex-expansion/PIN            |  2 +-
crates/render-pipeline/vendor/tex-expansion/src/catcode.rs | 12 ++++++++++++

Verified through a freshly built CLI, not through crate tests

Owner's 20-document corpus, oracle /Library/TeX/texbin/pdflatex (TeX Live 2026), page counts via pdfinfo:

before after
page counts matching pdflatex 15/19 17/19
U+0009 warnings corpus-wide 597 in set1 alone 0 everywhere
document pdflatex before after
set3 9 10 9 fixed
set8 5 6 5 fixed
setA 9 10 9 fixed
variations/notes 5 6 5 fixed
set6 5 5 4 ⚠️ regressed
set9 7 7 6 ⚠️ regressed

The two regressions are real, and I am not burying them

set6 and set9 were accidentally correct. Both are tab-indented (8 and 3 tab-indented \item lines), so the spurious empty paragraphs were padding them out to the right length — one bug compensating for another. Removing the padding exposes a genuine under-spacing around lists, filed as #852 with set6 as the bisect target.

It also means the "15/19" figure quoted earlier was flattering: some of those matches were two errors cancelling, not correctness. Net is +2 and the fix is unambiguously right, so this should land — but #852 should be picked up promptly.

Tests

crates/render-pipeline: 198 passed / 0 failed plus all integration targets green, exit 0. No digest re-record was needed.

Related

🤖 Generated with Claude Code

Makes #840's TAB catcode fix reach actual users. Until now it was inert:
flashtex-cli builds against the frozen snapshot, and the live crate is not in
its dependency graph at all, so the merged fix changed nothing a user could see.

Minimal re-pin -- the only commits to crates/tex-expansion since pin 4511166
are the fix and its review follow-up, so the vendored diff is PIN plus 12
inserted lines in src/catcode.rs.

Measured through a freshly built CLI on the owner's 20-document corpus:

  page counts matching pdflatex: 15/19 -> 17/19
  U+0009 warnings corpus-wide:   597 in set1 alone -> 0 everywhere

  FIXED (now exact): set3 10->9, set8 6->5, setA 10->9, variations 6->5
  REGRESSED (now one page SHORT): set6 5->4, set9 7->6

The two regressions are honest news and worth keeping: both files have
tab-indented \item lines, so removing the spurious empty paragraph shortened
them past pdflatex. They were accidentally correct before -- the tab bug was
padding out a genuine under-spacing elsewhere. Filed separately; net is +2.

Implementation-Agent: daniel-parent
Commit-Executor: daniel-parent
Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
Blocking item from the independent review: VENDORING.md is the canonical pin
register and would have actively lied after this merge. Line 6 listed
`compiler`/`tex-expansion` together at 4511166, and the tex-expansion row
claimed it was "re-pinned in lockstep with compiler above, which is at the same
SHA" -- no longer true. Precedent is unambiguous: the last four re-pin commits
(a3eaa14, 0660563, 19754f9, b6d76b1) all touched this file.

Also corrects two figures the reviewer reproduced more carefully than I did:
the corpus result is 16/20 -> 18/20, not 15/19 -> 17/19 (I had dropped a
document whose oracle died under -halt-on-error), and the U+0009 count is
45 -> 0 across all 20 build logs, not "597 in set1 alone" -- 597 is the number
of TAB characters in set1.tex's source, not warnings. The engine deduplicates
missing_glyph, so set1 emitted 2. Same direction, right order of magnitude now.

Implementation-Agent: daniel-parent
Commit-Executor: daniel-parent
Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Independent review: CHANGES REQUIRED → addressed in a7bba6e0. Recording it here because the reviewer reproduced more carefully than I did and corrected two of my figures.

Verified byte-perfect. 448 files, diff -r --exclude=PIN identical and a sorted shasum -a 256 manifest match. Repo-wide file count unchanged (9,972 both sides), so nothing was silently included or dropped — which also settles the concern about the aborted first attempt that wiped and restored this tree. The inertness claim checks out structurally: flashtex-cli → render-pipeline → vendor/compiler's ../tex-expansion path dep; the live crate appears nowhere in the graph.

All six per-document rows reproduce exactly, and it confirmed exactly two regressions across all 20 files, not more.

Two figures of mine were wrong:

  1. 16/20 → 18/20, not 15/19 → 17/19. My smaller denominator came from running the oracle with -halt-on-error, which kills pdflatex on ~10 of these documents (set6 line 308's \vdot is undefined without physics). Without it, all 20 produce a PDF. Same +2 delta, same documents — but my version wasn't reproducible, which is the part that matters.

  2. "597 warnings in set1" was wrong by ~300×. 597 is the count of TAB characters in set1.tex's source. The engine deduplicates missing_glyph, so set1 emitted 2 warnings — confirmed identical across build, --verbose, --json, check and --v2. The honest figure is 45 → 0 across all 20 build logs. The "0 corpus-wide" half was exact.

Fixed (blocking item): VENDORING.md is the canonical pin register and would have lied after merge — line 6 listed compiler/tex-expansion together at 4511166e, and the row claimed lockstep with compiler. Both updated, with the corrected figures. The reviewer noted precedent is unambiguous: the last four re-pin commits (a3eaa141, 0660563b, 19754f94, b6d76b15) all touched it.

#852's bisect hint was also wrong and is corrected on that issue: neither set6 nor set9 has a tab anywhere on an \item line — those items are space-indented. The files are tab-heavy elsewhere, so the masking mechanism stands, but the search shouldn't start at list items.

It agreed the trade is right: keeping the old pin would preserve a known-wrong lexer to protect two accidental matches, which is the wrong optimisation target.

Also noted for follow-up, out of scope here: the vendor boundary isn't total — render-pipeline/Cargo.toml:161 depends on live ../class-geometry, unvendored and un-PIN'd, so it is invisible to the drift check in #850.

@d-q222
d-q222 merged commit b5b1d77 into main Sep 18, 2026
22 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.

1 participant