Repository navigation
Conversation
GoKubar
force-pushed
the
rebase/154-footnotes-2
branch
from
September 14, 2026 02:43
2b030fb to
4f7bc4c
Compare
…ColhT Extends draft #154 (`agent/kabir-claude/footnotes-2` @ 8217e98), which this branch is based on and does not replace. #154 already carries the insertion state through the float paginator; these are the two places its model and pdflatex disagree, both found by ten new fixtures and both measured against local pdflatex (TeX Live 2025). 1. **§1005's shrink allowance.** The box-overflow shortcut fired at `total > \pagegoal`, but TeX only calls a page hopeless once the excess passes what the glue can shrink. A body of `\parskip 0pt plus 1pt` has no shrink, so this never showed without insertions; `\skip\footins`'s `minus 2pt` (and an `h` float's `\intextsep`) supplies some, and the column lost the line TeX keeps. `06-float-page-note` was a body line short on page 1 with the `\footnoterule` 11.36 bp high. 2. **One `\vbox to\@colht`, not a body packed to `\@colroom`.** `\@makecol` attaches the notes to `\box\@cclv` first (the default `build/column/outputbox` plug is `footnotes-floats-legacy`) and only then `\@combinefloats` wraps the floats around that, so the column is top floats, \floatsep between them, \textfloatsep, the body, the \vfil \@outputbox@removebskip lifted off its end, \skip\footins, \footnoterule, the notes, \textfloatsep, the bottom floats, \vskip-\dp, \@textbottom `\@cflt` and `\@cflb` build plain `\vbox`es and only `\@make@normalcolbox` packs `\vbox to\@colht`, so a single glue set ratio covers the body's glue, `\skip\footins` (`plus 4pt minus 2pt`) and both `\textfloatsep`s (`plus 2pt minus 4pt`) together. Setting the body and notes to `\@colroom` on their own and then placing the bottom floats by a rule (flush at `\@colht` with a `\vfil` or `\flushbottom`, natural otherwise) gives `\skip\footins` no share of the slack: on `02-bottom-float-note` the rule, the notes and the bottom float sat 1.276 bp high, and on `08-twocolumn-float-note` the second column's body sat 1.137 bp high from its fourth line down. `pagebuild::make_column` now takes the column's float material (`ColumnFloats`) and returns where it put each float box (`FloatPlacement`), which replaces the `keep_depth` flag and the `text_off` shifting in `floatpage`. `break_pages_inserts` passes an empty `ColumnFloats` and is unchanged. `\@cflt`/`\@cflb`/`\@makecol`/`\@specialoutput` were read from latex.ltx as shipped by TeX Live 2025, and the column order was confirmed against a `\tracingoutput=1` dump of a page carrying a top float, a note and a bottom float. ## Fixtures Ten under `fixtures/float-notes/`, with `tools/float-notes-oracle/generate.py` and the `float_notes_oracle` test: top float + note, bottom float + note (notes above the float), a note that defers a float through `\@pageht`, three competing `[t]` floats with notes, a note split under a top float, a `[p]` float page with a note pending, an `h` float with notes, two-column, `\clearpage` with a note and deferred floats, and a page with a top float, a bottom float and three notes. **reference_engine: pdfTeX 3.141592653-2.6-1.40.27 (TeX Live 2025/nixos.org)** — generated on this Linux host, recorded in each expected file's header. Unlike the MacTeX 2026 data under `fixtures/footnotes/` and `fixtures/floats/`, none of which is regenerated here. Implementation-Agent: engine-engineer (kabir-claude float-notes lane) Commit-Executor: engine-engineer (direct git, Cursor usage limit fallback) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar
force-pushed
the
rebase/192-float-notes-column
branch
from
September 14, 2026 02:49
1057da1 to
76f5ff6
Compare
This was referenced Sep 15, 2026
Merged
GoKubar
added a commit
that referenced
this pull request
Sep 15, 2026
…n_launch (#632) The CI job `rust bridge (ubuntu-latest)` intermittently failed compiler_process_success_and_timeout_leave_editor_unchanged with "validation_launch: Could not launch the configured FlashTeX compiler" on unrelated PRs (#264, #284, #491). Root cause, reproduced locally: the classic fork/exec ETXTBSY race. The bridge integration tests run in parallel threads, and each writes a fresh fake-compiler script (fs::write + chmod) before validate() spawns it. If another thread forks a child while the writer's fd is still open, that child inherits the write fd until its own exec; exec'ing the script in the meantime fails with os error 26 (Text file busy) even though the writer already closed the file. A standalone stress harness reproduced 605 ETXTBSY failures in 24000 write+spawn cycles across 8 threads, and the same fake()+validate() pattern against the unfixed crate reproduced the exact CI error 8 times in 3200 cycles. Fix in CompilerValidator::validate: - retry the spawn (up to 20 x 10ms) when the error kind is ExecutableFileBusy - the condition is transient by definition and clears as soon as the interfering child execs; - on real launch failure, include the executable path and the underlying io::Error in the validation_launch message instead of discarding it, so a future failure is diagnosable from the CI log. The test itself is unchanged, so nothing it asserts is weakened. Verified: full bridge suite green (170 passed, 0 failed, 2 ignored); proposal_validation run 20x in a loop, 20/20 green; stress harness 0 failures in 3200 concurrent validate() cycles with the fix vs 8 without it. Implementation-Agent: fable-bridge-flake Commit-Executor: fable-bridge-flake (direct; Cursor usage limit)
Contributor
Author
|
Closing: this landed on main as commit 84d104c ("render-pipeline: @makecol packs the whole float+footnote column to @ColhT" — same title and body as this PR's tip). Verified by content: all ten float-notes fixtures, the oracle test (crates/render-pipeline/tests/float_notes_oracle.rs) and the generator are byte-identical between this branch's tip (76f5ff6) and main; pagebuild.rs/floatpage.rs differ only by later work main added on top. |
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.
Rebase of #192 onto current
main, on top of #282. Supersedes #192 — its branch is untouched.\@makecolpacks the whole float + footnote column to\@colht, with a new pdflatex oracle for pages that carry both. Chain: #259 → #281 (compiler) → #282 (pipeline) → this.All of #192 cherry-picked cleanly onto the rebased #282; the integration work was in #281 and #282.
Gates, measured on this tree
Control is
main@5e6c65bewith its committed vendor pin; this branch was measured withvendor/compilerlocally re-pinned to #281 (not committed — vendor is the integration lane's).oracle.py check)crates/render-pipelinecargo test --releaseThe +1 test is this PR's
float_notes_oracle. Every one of its ten fixtures matches pdflatex on page count, word origins (worst 0.005 bp) and painted rects, with zero diagnostics — including the two-column and\clearpagecases:This is the PR that found the two bugs in #154 (the missing shrink allowance and the column packed to the wrong height), so it is also the check that they stayed fixed across the rebase.
No committed oracle data was regenerated.
Rebased and re-measured against
main5e6c65be.mainmoved 53 commits during this work, including changes toparser.rs,typeset.rsandmathtex.rs; every number in this PR is from the final tree, not the earlier base.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu