Repository navigation
render-pipeline tests: partial-font controls stop reading the environment (8 failures -> 3) - #202
Merged
Merged
Conversation
…ment Five tests are *controls*: they assert that a face or a metric file is ABSENT and that the pipeline then degrades the documented way. They built their font set with `FontSet::with_default_dirs` / `FontSet::new`, both of which read `FLASHTEX_FONT_DIRS` / `FLASHTEX_TFM_DIRS`. So the moment CI exported a real font environment (93fb321 widened it to lm:ec:amsfonts, correctly -- it is what fixed `enumitem_keys_oracle`), the control stopped being a control: the very thing it asserts is missing resolved, and the test failed for a reason that has nothing to do with the engine. tests/metrics_provenance.rs:61 assert!(fonts.required_metrics().is_err()) tests/math_symbols.rs mathbb / mathcal / varnothing / cm_less_symbols ("... without NewCM": expected LatinModernMath-Regular, got NewCMMath-Regular) `NewCMMath-Regular.otf` ships in `apps/mac/Fonts` beside the Latin Modern faces, so the contaminating face cannot be excluded by dropping a whole directory. `common::stage_faces_without` stages links to the real faces in a per-test temp directory, omitting the named ones, and `ControlDir::font_set` pairs them with explicit metric directories via `FontSet::with_dirs`. The bundled half of each NewCM test adds the face back through `extra`, so both halves still measure what they always did. Two further non-hermetic spots fixed while here, both previously passing for a reason they did not intend: `missing_required_metrics_...` now names an empty metric list instead of inheriting `FLASHTEX_TFM_DIRS`, and `a_flat_bundle_directory_...` names the flat directory as its own metric directory instead of being satisfiable from the ambient texmf trees. No product code is touched -- the diff is `tests/` only. Evidence (TeX Live 2025 as oracle only; bundled apps/mac/Fonts; explicit FLASHTEX_TFM_DIRS = public/lm:jknappen/ec:public/amsfonts/symbols): - The five tests, which flipped with the environment before, are now identical under CI's widened metric env AND under the pre-93fb3219 narrow env (public/lm alone): 15/15 pass in both. That invariance is the point. - `crates/render-pipeline` full suite with `--no-fail-fast`: 186 passing, failing set 8 -> 3. The remaining three (`font_family_fixtures_match_pdflatex`, `footnotes_against_pdflatex`, `page_frame_against_pdflatex`) are the pre-existing missing sans/slanted/caps tier, unchanged by this PR. - amsmath corpus 59/59 within 0.5 bp; real-world corpus HW1 3 pages / HW2 3 pages, 0 overfull, 0 errors; ZERO font diagnostics across all 10 fixtures. Implementation-Agent: kabir-claude (linux-primary / NixOS) Commit-Executor: kabir-claude (direct git, observed Cursor usage limit) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
This was referenced Sep 13, 2026
GoKubar
marked this pull request as ready for review
September 13, 2026 20:07
This was referenced Sep 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft while
mainis frozen for the v0.1.2 release run. Merge order: this PR first, then #CI (--no-fail-fast). Merging--no-fail-fastalone shows 8 render-pipeline failures; with this in, it shows 3.The bug: a control test that stopped being a control
Five render-pipeline tests are controls. They assert a face or a metric file is absent and that the pipeline degrades the documented way. They built their font set with
FontSet::with_default_dirs/FontSet::new— both of which readFLASHTEX_FONT_DIRS/FLASHTEX_TFM_DIRS.So when
93fb3219widened CI's metric env tolm:ec:amsfonts— correctly; that is what fixedenumitem_keys_oracle— the controls saw the very thing they assert is missing:missing_required_metrics_are_a_blocking_diagnostic_not_a_silent_fallbackassert!(fonts.required_metrics().is_err())(metrics_provenance.rs:61)mathbb_paints_from_new_computer_modern_when_bundled"… without NewCM"→LatinModernMath-RegularNewCMMath-Regularmathcal_sets_at_cmsy_metrics_…varnothing_sets_at_msbm_width_…cm_less_symbols_are_painted_from_latin_modern_mathℤℵis one LM Math runℤ, so the run splitThese tests were wrong, not the engine. This is the durable fix #187 named, not a narrowing of CI's env.
NewCMMath-Regular.otfships inapps/mac/Fontsbeside the Latin Modern faces, so the contaminating face cannot be excluded by dropping a directory.common::stage_faces_withoutstages links to the real faces in a per-test temp dir, omitting the named ones;ControlDir::font_setpairs them with explicit metric dirs throughFontSet::with_dirs. The bundled half of each NewCM test adds the face back throughextra, so both halves still measure exactly what they always did.Two further non-hermetic spots fixed while here, both previously passing for a reason they did not intend:
missing_required_metrics_…now names an empty metric list rather than inheritingFLASHTEX_TFM_DIRS, anda_flat_bundle_directory_…names the flat directory as its own metric directory rather than being satisfiable from the ambient texmf trees.tests/only — no product code is touched.Verification
TeX Live 2025 as oracle only, never in the product path. Bundled
apps/mac/Fonts, explicitFLASHTEX_TFM_DIRS = public/lm:jknappen/ec:public/amsfonts/symbols. No committed oracle data regenerated.The point of the change is invariance, so it is measured under two environments:
93fb3219narrow env (public/lmalone)Before this PR those same tests flipped with the environment. They no longer read it.
render-pipelinefull suite,--no-fail-fastfont_family_fixtures_match_pdflatex,footnotes_against_pdflatex,page_frame_against_pdflatex— the pre-existing missing sans/slanted/caps tier, untouched by this PRImplementation-Agent: kabir-claude (linux-primary / NixOS)