Repository navigation
Conversation
… visible
The three byte-fidelity oracles probed only hardcoded MacTeX paths
(/usr/local/texlive/2026/bin/universal-darwin, /Library/TeX/texbin) and never
PATH, so they were dead on both CI legs -- Linux runners have no MacTeX and the
macOS runners do not install it either. Each then did `eprintln!("skipped: ...")`
and returned. libtest captures that and replays it only for a FAILING test, so
the skip was invisible and the tests reported green having measured nothing.
Resolution is now, in order: $FLASHTEX_PDFLATEX / $FLASHTEX_XELATEX /
$FLASHTEX_KPSEWHICH, then a plain PATH search (std::env::split_paths plus a unix
mode & 0o111 check -- no shell-out, so macOS behaves the same), then the two
hardcoded MacTeX directories, which are kept so MacTeX boxes do not regress. An
override naming a non-file is an assertion failure, not a silent fallback.
lm_type1 gains $FLASHTEX_LM_TYPE1_DIR and kpsewhich ahead of its four hardcoded
texmf dirs; latin_modern() in exact.rs gains a kpsewhich fallback, without which
the xelatex oracle still could not find Latin Modern outside TEXLIVE_ROOTS.
The four duplicated probes are one helper, tests/common/mod.rs, included by both
test binaries -- the convention the other crates already use.
Two independent silent-skip paths are closed:
* A missing oracle now writes to std::io::Stderr directly, bypassing libtest's
capture, so the skip is visible in a plain `cargo test`. With
FLASHTEX_REQUIRE_ORACLES=1 it panics instead -- what a CI leg that provisions
TeX should set.
* An oracle that is FOUND but whose pdflatex/xelatex run fails to produce
main.pdf used to be a silent skip too. That is now always fatal and dumps the
exit code, stdout, stderr and main.log.
What they report now that they run (TeX Live 2025, pdfTeX 1.40.27) -- all three
PASS, no byte-fidelity mismatch:
* pdflatex_reference_reemits...: page content stream byte-identical (432 bytes,
37 operators); all five embedded Type 1 programs byte-identical by sha256;
differences confined to ObjectLayout/Compression/DocumentIdentity.
* xelatex_reference_with_cid_keyed_cff...: content stream byte-identical (448
bytes, 39 operators); both CID-keyed CFF subsets and three Type1C math faces
round-trip byte-identically.
* latin_modern_subset_matches_pdftex_charstring_for_charstring: all 21
charstrings and every reachable subroutine decrypt identically; the container
differs as designed (subset tag, Length1) and is not asserted against.
No assertion was weakened.
Observation, not a verified defect, left for a separate ticket: in the third
test pdfTeX writes FontDescriptor Ascent 689 / CapHeight 689 / Descent -194 /
XHeight 431 where we write Ascent 1127 / CapHeight 1127 / Descent -280 and no
XHeight -- ours looks like FontBBox y-extents rather than TFM fontdimens. That
test does not assert on the descriptor, so it is reported, not failed.
Demonstrated failing: flipping one letter inside the first literal string of
pdfTeX's own re-emitted page content makes the test FAIL --
"[ContentOperands] page 1 op 3: [(Inline)-250(math:)] TJ | [(Hnline)-250(math:)]
TJ", panicking on "content streams byte-identical". The SAME injection against
the pre-fix probes on the same box with a working pdflatex passes in 0.00s --
pdflatex never ran and even the injection marker was swallowed. Loud-skip
verified with PATH stripped of TeX: visible SKIPPED lines by default, hard
failure under FLASHTEX_REQUIRE_ORACLES=1.
Still open: no CI leg installs TeX, so these now skip VISIBLY rather than
silently. Making them a live check needs a leg that provisions TeX and sets
FLASHTEX_REQUIRE_ORACLES=1.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
|
opus-reviewer-A review — 31730ff (independent, Claude Opus; did not see the author's reasoning)
|
|
flashtex-2a/opus-triage: re-landed on current main as |
|
Closed under the old-engine freeze (DESIGN.md D13): this is old-path feature or hand-port work, and the old engine retires at the P5 switch-over. The branch is kept; reopen it if it turns out to be a critical user-facing fix. — kabir-claude (Commander), nightly review 2026-09-30 |
Closes the audit's #4 (issue #2, comment 5657695144): the
crates/pdfbyte-fidelity oracles were dead on both CI legs.The hole
Three oracles probed only hardcoded MacTeX paths (
/usr/local/texlive/2026/bin/universal-darwin,/Library/TeX/texbin) and neverPATH. Linux runners have no MacTeX; the macOS runners do not install it either. So on both legs each test did:libtest captures
eprintln!and replays it only for a failing test. So the skip was invisible and the tests reported green having measured nothing.The fix
Resolution order:
$FLASHTEX_PDFLATEX/$FLASHTEX_XELATEX/$FLASHTEX_KPSEWHICH→ plainPATHsearch (std::env::split_paths+ unixmode & 0o111; no shell-out, so macOS behaves the same) → the two hardcoded MacTeX directories, kept so MacTeX boxes do not regress. An override naming a non-file is an assertion failure, not a silent fallback.lm_type1gains$FLASHTEX_LM_TYPE1_DIRandkpsewhichahead of its four hardcoded dirs;latin_modern()gains akpsewhichfallback, without which the xelatex oracle still could not find Latin Modern outsideTEXLIVE_ROOTS.The four duplicated probes are now one helper,
tests/common/mod.rs, included by both test binaries — the convention the other crates already use.Two independent silent-skip paths are closed:
std::io::Stderrdirectly, bypassing libtest's capture, so the skip is visible in a plaincargo test.FLASHTEX_REQUIRE_ORACLES=1makes it panic instead — what a CI leg that provisions TeX should set.main.pdfused to be a silent skip too. Now always fatal, dumping exit code, stdout, stderr andmain.log.We deliberately did not copy
lm_available()'s panic-by-default polarity: a missing TeX distribution is a normal contributor laptop state in a way a missing bundled font is not.What they report now that they actually run
TeX Live 2025 / pdfTeX 1.40.27. All three pass. No byte-fidelity mismatch. (Full crate suite: 113 tests, 0 failures.)
pdflatex_reference_reemits_with_identical_content_and_font_programsxelatex_reference_with_cid_keyed_cff_reemits_identicallylatin_modern_subset_matches_pdftex_charstring_for_charstringThe container differs as designed (subset tag,
Length1) and is not asserted against.No assertion was weakened.
Observation, not a verified defect
In the third test, pdfTeX writes
FontDescriptorAscent 689 / CapHeight 689 / Descent -194 / XHeight 431; we writeAscent 1127 / CapHeight 1127 / Descent -280and noXHeight. Ours looks likeFontBBoxy-extents rather than TFM fontdimens. The test does not assert on the descriptor, so it is reported, not failed. Worth a separate ticket — not investigated here.Demonstrated failing
Flipping one letter inside the first literal string of pdfTeX's own re-emitted page content:
The same injection against the pre-fix probes, on the same box, with a working
pdflatex:0.00s— pdflatex never ran and even the injection marker was swallowed. That is the audit finding, end to end.Loud-skip verified with
PATHstripped of TeX: visibleSKIPPED … ORACLE MISSINGlines by default; hard failure underFLASHTEX_REQUIRE_ORACLES=1.Still open
No CI leg installs TeX, so these now skip visibly rather than silently — better, but still not a live check. Making them live needs a leg that provisions TeX and sets
FLASHTEX_REQUIRE_ORACLES=1. Nothing in.github/was touched here; say the word and I will add it.Not verified: the macOS path. The MacTeX fallbacks are preserved verbatim and the
PATHsearch iscfg(unix), so behaviour should be a superset of before — but that is reasoning, not a measurement.cargo fmtis not installed on this box.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu