Repository navigation
re-pin readiness: the compiler vendor re-pin is now one step (runbook + gated pipeline arms; fixes 13 red tests on main) - #711
Conversation
What changed: - `crates/render-pipeline/Cargo.toml` declares a new off-by-default feature `compiler-node-surface`. It carries no behaviour of its own: every arm it adds is the inert answer the pipeline already gave for a compiler node the current pin (`c95977d6`) cannot produce. - The pipeline's exhaustive matches and node constructors now cover main's compiler surface behind that feature: `parser::Block::Penalty`/`Tabbing`, `parser::Inline::ThePage`/`PageNumbering`/`TabStop`/`TabJump`/`Marginpar`/ `Penalty`/`PagePenalty`/`Discretionary`, `VSpace`/`HSpace` glue components, `math::Nucleus::TextRun`/`SideSet`/`Lap` and `math::Accent::Mathring` (compiler #549, #551, #555, #568, #581, #583, #587, #606, #616). `adapter::vspace_block` is a new cfg'd constructor beside the existing `line_break_inline`; the one open-coded `Inline::LineBreak { .. }` left in the `\opening` lowering now goes through `line_break_inline` too. - `tabbing` is lowered to flush-left paragraphs with one `unsupported_block` limitation, the way `LetterBlock` is, so no row is dropped by the re-pin. - `docs/integration/repin-runbook.md`: the exact re-pin commands, the three vendor directories that must move (`compiler`, `tex-expansion`, and a new `bibliography`), the lockfile and `#[ignore]` edits `--locked` CI needs, the measured test deltas and the PRs the pin unblocks. No file under `vendor/` is touched: the vendor swap used to measure all of this was scratch-only and reverted. `git diff --stat origin/main...HEAD` contains zero `vendor/` paths. What was run: Whole `crates/render-pipeline` suite, CARGO_BUILD_JOBS=4, --no-fail-fast: origin/main, pinned vendor, feature off: 469 passed, 13 failed this branch, pinned vendor, feature off: 469 passed, 13 failed (same 13) this branch, vendor re-pinned, feature on: 485 passed, 0 failed The 13 red-on-main tests (letter_class_geometry x5, frame_env, underline_sout x4, uline x2, xcolor_oracle) all pass after the re-pin. Two re-pin-gated #[ignore]s also pass against the re-pinned vendor: test frame_draws_a_rule_border_around_its_content ... ok test coloneqq_decomposes_like_mathtools ... ok crates/flashtex-cli against the same re-pinned vendor: test result: ok. 58 passed; 0 failed cargo check --all-targets on this branch at the current pin: 0 errors. Next step: The integration lane applies docs/integration/repin-runbook.md section 3 -- swap the three vendor trees, move `compiler-node-surface` (and `linebreak-skip`) into `default`, refresh both Cargo.locks, drop the two `#[ignore]`s, update vendor/VENDORING.md. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
|
Runbook correction found while using this procedure, worth folding into §3. A verification lane used this runbook's scratch-swap procedure to run six pin-blocked issues, and hit a failure the runbook does not warn about: the swap must be performed on this PR's branch, not on That is easy to trip over, because the natural reading of "swap the vendor trees" is "do it on main". Suggest stating the base branch explicitly in §3. The procedure otherwise worked exactly as written, including the revert ( One expectation to set for whoever merges this: the re-pin will not close #441 or #323. #441 needs its pipeline half (open PR #585), and #323's producer is explicitly unwritten ( |
…ideset-pipeline What changed: - #581's compiler `Nucleus::SideSet` and math-layout `Atom::left_scripts` have landed on main by another route, so every conflicted hunk in crates/compiler and crates/math-layout was this branch's copy of material main already carries. All of them resolved to main's side. - crates/compiler/src/math.rs (6), parser.rs (1), vocabulary.rs (1), crates/math-layout/src/layout.rs (2). - crates/math-layout/src/cm.rs auto-merged a second copy of `fn text_space(&self, size: SizeClass)` (E0201, duplicate definition); the duplicate was removed so the file matches main. - Generated artefacts (docs/user/compiler.md, crates/compiler/supported/{supported-latex.json,coverage.md}, the bundled apps/mac copy) were taken from main and regenerated with `sh crates/compiler/scripts/render_supported_latex.sh`. - What survives from this branch is only its own payload: the pipeline-side consumption of math-layout's left scripts, feature `amsmath-sideset`. `git diff origin/main` is now exactly crates/render-pipeline/Cargo.toml, src/incremental.rs, src/typeset.rs and tests/amsmath_sideset.rs (4 files, +220). What was run: crates/math-layout: cargo build --lib -> Finished crates/render-pipeline: cargo build --lib --tests -> Finished crates/render-pipeline: cargo test --lib test result: ok. 164 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out amsmath_inline: test result: ok. 11 passed; 0 failed; 0 ignored displaystyle_switch: test result: ok. 3 passed; 0 failed; 0 ignored math_ellipsis: test result: ok. 5 passed; 0 failed; 0 ignored math_operator_limits: test result: ok. 6 passed; 0 failed; 0 ignored math_operator_thin_space: test result: ok. 3 passed; 0 failed; 0 ignored math_symbols: test result: ok. 18 passed; 0 failed; 1 ignored math_text: test result: ok. 7 passed; 0 failed; 0 ignored amsmath_sideset: test result: ok. 0 passed; 0 failed; 0 ignored (the whole file is behind `amsmath-sideset`, which is off until the re-pin) Next step: - Still blocked on the vendor/compiler + vendor/math-layout re-pin (#711); until it moves, the feature cannot be switched on by default and the end-to-end behaviour cannot be shown. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…ag-placement-pipeline What changed: - #470's compiler `Nucleus::TextRun`/`TextPiece` and math-layout `TextRun` have landed on main, so most conflicted hunks were this branch's copy of main's material and took main's side: - crates/compiler/src/math.rs: 2 of 3 (the `\mathbf` `split_hyphen_runs` rewrite and its `-` mathcode comment). The third, `INTERIM_TAG_GAP_EM`'s doc comment, is this PR's own commit 1b6f03f and was kept. - crates/compiler/src/parser.rs: the `comment_environment` hunk took main. - crates/math-layout/src/lib.rs and src/layout.rs: main (`LeftScripts` in the import lists; main's removal of `make_text_styled`). - crates/compiler/tests/text_runs.rs (add/add): kept this PR's two tag tests, which main's side does not have. - Two hunks needed a real merge rather than a side: - crates/compiler/src/parser.rs `multirow_environment`. Main gained #552's `\shoveleft`/`\shoveright`, which lifts shove tokens out of each row's cells before they are parsed, inside the row loop; this PR pre-parses every row up front so it can find each row's `\tag` before numbering. The shove lifting now runs as its own `rows.iter_mut()` pass ahead of the pre-parse and is zipped into the row loop, so both behaviours survive. - crates/render-pipeline/Cargo.toml: union of the feature blocks — `compiler-text-run` (this PR) alongside main's `math-font-kerns` and `tikz-patterns`. - crates/render-pipeline/tests/display_placement.rs module comment: main's current statement of what passes (17, 18, nested list 20) plus this PR's `compiler-text-run` paragraph; only 15 is still listed as not passing. - Two silent auto-merge duplications had to be removed by hand; both made the tree fail to compile and neither is a behaviour change: - crates/math-layout/src/cm.rs: a second copy of `fn text_space(&self, size: SizeClass)` (E0201). - crates/compiler/src/math.rs: a second copy of the whole 376-line text-run reference-text block (16 items, E0428). main's copy is a strict superset (it carries the `Nucleus::Lap` and `Nucleus::SideSet` arms), so the branch's copy was deleted. - #736 (`adapter::strip_tag`'s silent-drop fix) is NOT on origin/main yet, so this merge did not touch it and nothing of it was undone. This branch's `strip_tag` is unchanged: the `Text`/`Symbol` arm, the `#[cfg(feature = "compiler-text-run")]` `TextRun` arm and the `_ => {}` fallback. The one-directional resolution #736 describes is still owed whichever of the two lands second. - `sh crates/compiler/scripts/render_supported_latex.sh` was re-run; the generated artefacts come back identical to main. - `git diff origin/main` is now exactly this PR's own payload: the compiler tag-numbering commit (math.rs, parser.rs, tests/text_runs.rs) and the render-pipeline half (Cargo.toml, adapter.rs, incremental.rs, mathtext.rs, typeset.rs, tests/display_placement.rs, fixtures 37-48 and their refs). What was run: crates/compiler: cargo test --lib test result: ok. 412 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test --test text_runs test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test 77 "test result: ok." lines, 0 failed crates/render-pipeline (pinned vendor, default features): cargo build --lib --tests -> Finished cargo test --lib test result: ok. 164 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out cargo test --test display_placement test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test --no-fail-fast binaries=105 passed=469 failed=13 ignored=4 All 13 failures panic at crates/render-pipeline/src/adapter.rs:1311 (main's 1308, shifted by this branch), the known stale vendor/compiler pin. Same 13 as on main today. Next step: - Still blocked on the vendor/compiler + vendor/math-layout re-pin (#711); until it moves, `compiler-text-run` cannot go default and fixtures 37-48 cannot show their end-to-end behaviour. - Whichever of #585 and #736 lands second still owes the one-directional strip_tag resolution #736's body sets out. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…o-default-features What changed: resolved two merge conflicts (incremental.rs hash_math/ shift_math, typeset.rs convert_math_classed/math_grids/math_glue_em/ math_approximations) between this branch's --no-default-features catch-all arms (#697) and main's independently-landed compiler-node-surface arms (#711, TextRun/SideSet/Lap). Both sets of arms are kept; the catch-all wildcard is placed last so it only fires for variants neither feature's arms cover. adapter.rs's kern_amount_matches auto-merged cleanly (no conflict) and was verified unchanged/correct. What was run: cargo test --no-run --release (both default and --no-default-features) compiles clean; cargo test --release --no-fail-fast in both configurations: every `test result:` line reports 0 failed (no non-"0 failed" line in either run). Next step: push and comment on PR #733 with these results. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
flash-tex#756) `\,`/`\:`/`\;`/`\!` inside a macro body typeset a literal punctuation glyph instead of math spacing, unless the macro name happened to be 2 bytes long (`\e` worked by coincidence, `\dd`/`\ee` did not). math.rs detected these spacing commands by testing `token.span.end - token.span.start == 2` -- a proxy for "this token is a literal 2-byte `\,` written directly in the source". Macro expansion rebinds a token's span to the invocation, so `\dd` (3 bytes) failed the check and fell through to being typeset as an ordinary comma. Root cause traced one level deeper than the byte-length symptom: the lexer's control-symbol arm (`\` + one non-letter character, covering `\,` `\%` `\&` `\$` etc.) produces the exact same `TokenKind::Word` variant as an ordinary literal character typed in math mode, so span length was the ONLY signal distinguishing "backslash-escaped" from "literal" -- and that signal is not stable across macro expansion. Fix: a `control_symbol: bool` mark on `Token`, set only at the two places a backslash control symbol is actually lexed (the compiler lexer's control-symbol arm, and the expansion converter's matching single-character control-sequence arm -- the parser consumes the converter's output, not the lexer's, so both needed the mark). Every derived-token site (word splitting, tabular cell splits, `&`-alignment splits, parameter substitution, incremental span shifting) preserves the mark from its source token; math.rs now keys spacing off the mark instead of span length. A bool flag rather than a new TokenKind variant, deliberately: a new variant would silently change behavior at ~100 existing TokenKind::Word match sites (most use matches!/if-let with catch-alls, so no compile error would flag them -- e.g. every text-accumulation arm would silently drop `\%`). The flag keeps every existing kind-match working identically; only math.rs's spacing arm reads it, so the behavior change is confined to exactly the bug. Tests: new thinspace_macro_span.rs (5 tests) -- all three falsification cases from the issue (`\dd`, `\e`, `\ee`) lay out byte-identically to a direct `\,`; a literal comma stays literal directly and via both 2- and 3-byte macro names (the mirror-image case that would have masked a regression); `\%`/`\&`/`\$` still render correctly in both text and math, directly and via macros. crates/compiler full suite green, 0 failures. Independently re-verified by the reviewer with a fresh cargo test run, plus a line-by-line review of every derived-token construction site given the wider blast radius (5 files touched). Does not touch vendor/: the same bug exists in the frozen render-pipeline compiler mirror, but that copy is re-pinned only by the compiler-lead role. The render-pipeline route will not reflect this fix until a future re-pin (flash-tex#711). Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane thinspace-macro-span, slice 1) Commit-Executor: daniel-muse-lead-2 (Claude Sonnet) Reviewed-by: daniel-muse-lead-2 (Claude Sonnet) Muse-Lane-Head: 310139300864888c32fb2e8227985c5ba243470a Co-authored-by: d-q222 <[email protected]>
… a macro (flash-tex#760) What changed: Two more instances of the flash-tex#756 pattern — deciding what a token *means* by comparing its source-span width to a literal constant. A token copied out of a macro's replacement text carries the *invocation's* span, so the width test was really measuring how long a name the user happened to give the macro. - `parser::is_tabbing_control` (`\=` `\>` `\<` `\+` `\-` in `tabbing`) now takes `maps_to_invocation`/`definition` and measures the token's own source bytes, exactly as `control_symbol_kern` already does for `\,`. Both callers pass the provenance through. - `parser::tabular::is_escaped_ampersand`, a new helper replacing the inline `!input.maps_to_invocation && span.end - span.start == 2` guard, does the same for the escaped `\&` that must not open the next entry. Expanded text with no definition bytes cannot prove it spells a control symbol, so it falls back to the visible reading: `\=`-family tokens are typeset and `&` separates. The failure ran in both directions at both sites, and the second direction is silent — a wrong glyph is visible, a missing one is not: tabbing \= via 3-byte macro \ts before [xx][=][yy] after [xx][yy] tabbing literal = via 2-byte \q before [xx][yy] after [xx][=][yy] tabular a\am b, \newcommand{\am}{\&} before two cells after one cell "a & b" The `\&` case is the worst of the three: it corrupts a table's structure, not just its spacing, shifting every later cell in the row. No corpus change is expected — the render route builds against the frozen vendor/compiler, so this is invisible until the re-pin (flash-tex#711). What was run: cargo test -p flashtex-compiler (crates/compiler, full) 77 suites, "test result: ok" in every one, 918 passed, 0 failed cargo test (crates/bridge, full) 170 passed, 0 failed Reverting only the two source hunks (tests kept) fails exactly the four new regression tests and no others: tabbing::tab_stop_reached_through_a_long_macro_still_sets_a_stop FAILED tabbing::tab_jump_reached_through_a_long_macro_still_jumps FAILED tabbing::a_plain_character_from_a_two_byte_macro_is_not_a_tabbing_control FAILED tabular::tests::escaped_ampersand_from_a_macro_is_text_not_a_column_break FAILED -> "extra alignment tab: this row has more entries than the 2 columns" The four guard tests (running text, literal `\=`, literal `a&b` and `a\&b`, and a genuine `&` reached through a two-byte macro) pass both with and without the fix, which is what makes them guards. Next step: sites 1 and 2 of flash-tex#760 (math.rs:1586, math.rs:2998) are held by daniel-muse-lead-2 and additionally need provenance threaded into the math token stream; math.rs is untouched here. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
What
Makes the
crates/render-pipeline/vendor/compilerre-pin a single mechanical step for the integration lane, and produces the evidence that it is safe.crates/render-pipeline/Cargo.tomlgains one off-by-default feature,compiler-node-surface, following the crate's existingamsmath-inline/linebreak-skipidiom.parser::Block::Penalty/Tabbing,parser::Inline::ThePage/PageNumbering/TabStop/TabJump/Marginpar/Penalty/PagePenalty/Discretionary,VSpace/HSpace's glue components,math::Nucleus::TextRun/SideSet/Lap,math::Accent::Mathring.adapter::vspace_blockis a new cfg'd constructor beside the existingline_break_inline; the one open-codedInline::LineBreak { .. }left in the\openinglowering now goes throughline_break_inline.tabbingis lowered to flush-left paragraphs with oneunsupported_blocklimitation, the wayLetterBlockis, so the re-pin drops no row.docs/integration/repin-runbook.md: the exact commands, the three vendor directories that must move, the lockfile/#[ignore]/VENDORING.mdedits, the measured test deltas and the PR list.The feature carries no behaviour of its own. Every arm it adds is the inert answer the pipeline already gave for a node the old pin could not produce. With it off (which is how this PR lands), results are byte-identical to
origin/main.Why
vendor/compileris pinned atc95977d6, 41crates/compilercommits behindmain, and seven pipeline PRs (#569, #582, #584, #585, #599, #607, #617) cannot merge until it moves. The re-pin has not been possible as a vendor-only commit because the newer compiler does not compile against the pipeline: 21 errors insidevendor/compileritself, then 18 more incrates/render-pipeline. This PR removes the second half so the swap is just a swap.Two findings the integration lane needs and could not have got from the pin alone:
compilercannot move alone.vendor/tex-expansion(7 commits behind) must move with it — the compiler-only swap fails with 21 errors, all of them insidevendor/compiler, against the staletex-expansion(tex::FontSwitch,tex::is_output_limit,scale_internal_dimen,Engine::declare_host_assignment,declare_font_switch,IncrementalExpander::{input_position,limits,edit_with_limits},FontMetrics::{quad_sp_in,x_height_sp_in}).crates/compiler/Cargo.tomlonmainnow declaresflashtex-bibliography = { path = "../bibliography" }, which is not vendored at all. It has no dependencies, so vendoring it is a plain archive — but CI runs--locked, so bothcrates/render-pipeline/Cargo.lockandcrates/flashtex-cli/Cargo.lockmust gain it (5 lines each) or every job fails before compiling.Overlap check
vendor,re-pin. The blocked pipeline PRs (render-pipeline: page and paragraph control from the compiler's penalty, discretionary and parameter nodes — needs #568 re-pin (#64) #569, render-pipeline: amsmath \sideset via math-layout left scripts (stacked on #581; needs re-pin) #582, render-pipeline: \enlargethispage, \clearpage float flush, \flushbottom after \pagebreak, \nobreakdash (#64; stacked on #569, needs #568+#583 re-pin) #584, render-pipeline: rich \tag placed as amsmath does — margin, leqno, own line, align/gather/multline (#441 PR 2; needs re-pin past #470) #585, render-pipeline: a float after a page break, \pagebreak\section under \flushbottom, \enlargethispage with floats and * squeeze (#64; stacked on #584) #599, render-pipeline: thread VSpace stretch/shrink into vspace_flex (GH-VSKIP-GLUE-STRETCH slice 2, needs re-pin past #606) #607, render-pipeline: pin a mid-paragraph \pagebreak, its priorities and \nopagebreak against pdflatex (GH-PAGEBREAK-MIDPARAGRAPH; stacked on #599, needs #616) #617) all consume this; none of them touches the arms added here (they replace them with real layout). No open PR moves a vendor pin.agent/daniel-parent/repin-readiness-2) is the earlier readiness attempt on a hopelessly stale snapshot. This PR starts fresh fromorigin/maindbe3cac8and supersedes it; re-pin readiness: pipeline compiles against the queued compiler/pdf/math-layout (runbook for the integration lane) #631 should be closed, not revived.python3 scripts/coord.py claims: no claim on any re-pin/vendor task. ClaimedGH-VENDOR-REPIN-EVIDENCEasdaniel-parenton this branch before starting.Vendor gate
git diff --stat origin/main...HEADcontains ZERO paths undervendor/. The scratch vendor swap used to measure everything below was reverted (git checkout -- crates/render-pipeline/vendor && git clean -fd crates/render-pipeline/vendor) before the commit, andgit statuswas checked before staging.Test results
Whole
crates/render-pipelinesuite,CARGO_BUILD_JOBS=4,--no-fail-fast, 104 test binaries each time:origin/maindbe3cac8, pinned vendorSo this PR is inert as it lands, and the re-pin fixes 13 tests that are red on
maintoday:The two
#[ignore]s that were explicitly waiting for this pin also pass against the re-pinned vendor (-- --ignored):crates/flashtex-cliagainst the same re-pinned vendor:This branch at the current pin, feature off:
Failure analysis (all 18 compile failures of the naive re-pin)
Every one is category (b) — a pipeline expectation the newer compiler legitimately changes — not a regression. None is category (c).
src/adapter.rsinlines_of,lower_blocks, block walkBlock::Penalty/Tabbingare new variants (compiler #568, #551)src/adapter.rsinline_span, inline hash,items_from_inlines_styledInlinevariants (#568, #551, #555, #583)src/adapter.rsCBlock::VSpace { pt }×4VSpacegainedstretch_pt/shrink_pt(#606)src/adapter.rsInline::HSpace { pt, span }HSpacegained six glue fields (#587)src/adapter.rsInline::LineBreak { span }×2LineBreakgainedskip_pt— the existinglinebreak-skipfeature already anticipated thissrc/incremental.rshash_math,shift_mathNucleus::TextRun/SideSet/Lap(#470, #581, #549)src/typeset.rsconvert_math_classed,math_grids,math_glue_em,math_approximationssrc/typeset.rsaccent_charAccent::Mathringtests/layout_cache_keys.rsnucleus_nameThe 21 errors inside
vendor/compilerare all category (b) against the stalevendor/tex-expansion, and are fixed by re-pinning that directory as well — no pipeline change is involved.Not done
math-layout(4 commits behind),pdf(8),project-files(11),vector-graphics(5): their re-pins, and themath-glyph-spans/math-font-kernsfeatures waiting on them, were not measured.\sidesetleft scripts and\mathllap/\mathrlap/\mathclapare deliberate approximations under the feature, each reported throughmath_approximationsso it reaches the document's limitations; render-pipeline: amsmath \sideset via math-layout left scripts (stacked on #581; needs re-pin) #582 and a lap follow-up set them exactly.\marginpar's note is still not placed (render-pipeline: \marginpar is unsupported #505 / closed render-pipeline: place \marginpar in the right margin (#505, needs vendor re-pin) #557); the inert arm keeps today's behaviour rather than inventing a margin column.🤖 Generated with Claude Code
https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz