Repository navigation
the skips' width is taken off the measure ONCE: #780 counted it twice - #781
Conversation
⛔⛔ A REGRESSION I MERGED THIS EVENING, FOUND BY #583's OWN WITNESS. #780 gave the breaker a background carrying \leftskip and \rightskip — width, stretch by order, shrink — which is tex.web §16307-16315. But this engine does not keep line_width at \hsize: paragraph.go:81 hands breakSegment lineWidth := spToPt(e.hsize - e.leftskip.width - e.rightskip.width) so the widths were already off the measure, and the background took them off again. tex.web's arrangement and this engine's are the same arithmetic; doing BOTH is not. Measured on #583's witness (`\rightskip=100pt`, a 343.7pt measure, right margin at 477.50), against tectonic 0.17.0: reference 3 lines, `A fairly long subsection title that has to wrap onto a`, x1 377.85 before #780 3 lines, the same split, x1 377.87 #780 5 lines, `A fairly long subsection title that`, stretched to x1 377.87 now 3 lines, the reference's split again, x1 377.87 So #583's first defect was already fixed before #780, and #780 reopened it. ⛔ AND THE MARGIN COULD NOT SEE IT, WHICH IS WHY THE TEST PASSED. Every assertion in TestLineSkipsNarrowTheMeasureBeforeBreaking measures how far right the ink reaches, and that stayed correct through the double count: the lines are justified to the narrowed measure either way. What moved was how much text the breaker thought would fit — it packed less and stretched what it packed. Five lines where the reference sets three, each stretched to the same right margin. The test now asks the question of the TEXT: a paragraph at \rightskip=100pt must not gain more than one line over the unconstrained one. Mutating the width back in gives 6 lines against 3 and the assertion names the cause. ⚠ #768's witness is unchanged (five lines, the reference's five, lines 1-3 to 0.02pt), and the whole suite is green: the stretch half of the background — the \raggedright fix that #780 was for — is untouched. Only the width is dropped. ⚠⚠ AND THE CORPUS A/B ON #780 MUST BE RE-RUN. Its table showed Σ|page error| 123 → 125 and mean divergence 3.884 → 3.935 against line agreement +0.11pt and one more exact page count; part of that is likely this double count rather than the change #780 was making. The machine's 1-minute load is above the threshold at the time of writing, so it is owed, not done. Refs #583, #768, #780. Co-Authored-By: Claude Opus 5 <[email protected]>
|
And the witness the whole background change existed for now matches the reference exactly, with this fix in place.
Seven lines, every one the reference's, within 0.02pt. The ragged paragraph takes no hyphens and the justified one takes two — which is the divergence that started this: before the glue orders, our two paragraphs were identical, the ragged one carrying the justified one's hyphens because the breaker never saw the ⚠ Which is also why dropping the width and keeping the stretch is the right cut. For the record, the full set of witnesses this pair now matches the reference on:
🤖 Generated with Claude Code |
|
The corpus A/B has been re-run clean, and it refutes what I said about it. The double count was not the cause of the page cost. I wrote on #780 and #781 that part of Σ|page error| 123 → 125 was "likely this double count rather than the change #780 was making". That was a hypothesis stated as likely, and it is now measured false. The clean run
41 papers scored on both sides, identical populations, no status flips — no reference-extraction flake this time, so nothing is excluded. What changed, and what did notLine agreement roughly doubled against the contaminated run: +0.22pt here against +0.11pt with the double count in place. So removing it did help, and the earlier figure understated the change's effect on lines. Σ|page error| is still +2, and it is the same two papers as before: Both were already under the reference and each loses one more page. The third mover from the contaminated run ( So the honest readingThe change makes lines more like the reference and leaves page capacity slightly worse on the two tightest papers. Those two are #381's direction — our lines hold more than the reference's — and with hyphens no longer padding lines out to fill a measure, the papers that were already fitting too much fit a little more. Better line agreement does not fix a capacity bias, and on this sample it exposes it. ⚠ Not claimed: that #381 explains it. Two papers, one page each, named so anyone can check; the mechanism is a hypothesis and the measurement above is not a test of it. ⚠ And the retraction stands on its own: I attributed a cost to a defect because the defect was in front of me, and the defect was real but not the cause. The figures to cite for the #780+#781 pair are the ones in this comment, not the ones on #780. 🤖 Generated with Claude Code |
⛔⛔ A regression I merged this evening in #780, found by #583's own witness.
#780 gave the breaker a background carrying
\leftskipand\rightskip— width, stretch by order, shrink — which is tex.web §16307-16315. But this engine does not keepline_widthat\hsize;paragraph.go:81handsbreakSegmentso the widths were already off the measure and the background took them off again. tex.web's arrangement and this engine's are the same arithmetic. Doing both is not.
Measured
#583's witness:
\rightskip=100pt, a 343.7pt measure, right margin at 477.50, against tectonic 0.17.0.A fairly long subsection title that has to wrap onto aA fairly long subsection title that, stretchedSo #583's first defect was already fixed before #780, and #780 reopened it.
⛔ The margin could not see it, which is why the test passed
Every assertion in
TestLineSkipsNarrowTheMeasureBeforeBreakingmeasures how far right the ink reaches, and that stayed correct through the double count — the lines are justified to the narrowed measure either way. What moved was how much text the breaker thought would fit: it packed less and stretched what it packed. Five lines where the reference sets three, each stretched to the same correct right margin.The test now asks the question of the text: a paragraph at
\rightskip=100ptmust not gain more than one line over the unconstrained one. Mutating the width back in gives 6 lines against 3, and the assertion names the cause.What is untouched
#768's witness is unchanged — five lines, the reference's five, lines 1–3 to 0.02pt — and the whole suite is green. The stretch half of the background, which is the
\raggedrightfix #780 existed for, is untouched; only the width is dropped.⚠ What this means for #780's corpus table
It has to be re-run. #780 reported Σ|page error| 123 → 125 and mean divergence 3.884 → 3.935, against line agreement +0.11pt and one more exact page count. Part of that is likely this double count rather than the change #780 was making — a paragraph under
\quote,\quotation, a contents entry or any\listwas being broken against a measure 20–40pt too narrow. The machine's 1-minute load is above the measuring threshold as I write, so the re-run is owed, not done.Refs #583, #768, #780.
🤖 Generated with Claude Code