Repository navigation
fix(engine): a gated mark is robust in every expansion and kept out of LaTeX's writes (PIPELINE 129) - #701
Conversation
…e change, and none in a file TeX writes The two expected failures of no-point.test.ts are plain tests now, their model of TeX's expansion reading a gate that writes itself through and a typesetting branch that lowers its argument. marks-robust.test.ts asks TeX itself in the pinned image: a \protected@edef then \uppercase over a section's title and a \protected@edef over a proof's optional title (each in a form of no class and through REVTeX 4.0 and thmtools themselves) set both heading points once; minitoc's part contents and a contents line, an index entry, a label's text, a caption's list entry and a stored text written through LaTeX's writes hold no gated mark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f LaTeX's writes LAYOUT_TEX's gates (and CARRY_TEX's \axtpmd) took the mark where \protect is \@typeset@protect and \@gobble'd it otherwise. LaTeX sets the same \protect for a \protected@edef made to set a text later as for a \protected@write made to write a file, so a class that stores a heading by \protected@edef took its marks off: REVTeX 4.0's \section (textcase v0.06: \protected@edef, then \uppercase) and thmtools' proof note stayed unlocated, drawn through ink units. Each gate now writes itself through, unexpanded, where LaTeX does not typeset, as a robust command does, and hands its argument to its command through TeX's \lowercase where it does: \uppercase turns a name's letters and no control sequence's, and our names come back exactly. LaTeX's \protected@write (wrapped before the class, again at the document's start if redefined, and a package's \protected@iwrite) lets every gated mark be \@gobble in its own group before its \edef, raw or stored first: no gated mark in any file a pass writes, as before. Not \protect\mark: a stored mark would stand unexpanded in the write's \edef and be written (minitoc's part contents, the root form's regression). One table, GATED_MARKS, makes the gates and the writes' list. Held digests of the marked TeX and the marked requests taken again (every result as it was). PDF-READER §18.111. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of a heading's Under the headings style and fancyhdr's \leftmark and \rightmark, two-sided, a section of several pages: every head's words where the paper's own compile sets them, each heading's two points set once, on its own page, and the ownership owning it there. Under hyperref with bookmarks and pdfusetitle: the outline's strings of a numbered, a starred and a \texorpdfstring heading, and the title and the author in the document's information, the paper's own, with no more warnings of a token not allowed in a PDF string. Both green on the base's marking and on this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
… nothing, the space after it skipped TeX resumes the paragraph after $$ by reading one token with expansion and dropping a space: a placeholder's closing mark there must expand to nothing on the empty list. Red on 634aa41: the gate's \lowercase stopped that expansion and the line after the display began with a space (3.32 pt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an upper-cased name alone goes through \lowercase The gate's typesetting branch sent every mark's command and argument through a \protected macro around \lowercase. TeX resumes a paragraph after $$ by reading one token with expansion and dropping a space; a placeholder's closing mark there must expand to nothing, and \lowercase, a step that does not expand, stopped that read: the line after such a display began with a space. Now \axt@lc is a macro: a name whose first character is a letter that is not its own \lccode (one a case change turned to capitals) goes through \lowercase, every other name expands exactly as at the base. Held digests of the marked TeX and the marked requests taken again (every result as it was). PDF-READER §18.111 corrected: written files byte for byte the base's, gated marks a package writes unexpanded into a list entry's text included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rst character not its own \lccode Every name the marking writes begins with a lower-case letter, so one \ifnum tells an upper-cased name from every other; the second test (a character with no \lccode) reached none. Held digests of the marked TeX and requests taken again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd LaTeX's writes, with its reason Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on and kept out of LaTeX's writes The sample's bundle made again in the image: its versions alone move. LAYOUT stays 48: the gate pack's layouts made again at this head and at the line are the line's, byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd the 599; PIPELINE 129's row and history Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| const IMAGE = compileImageRef() | ||
| const docker = spawnSync('docker', ['image', 'inspect', IMAGE], { stdio: 'ignore' }).status === 0 |
There was a problem hiding this comment.
🔍 Pull request CI skips native TeX tests
docker skips the native tests unless the pinned image is already local. The CI check job does not provision it, so a green run does not verify TeX expansion or auxiliary writes.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Declined, as stated: every TeX-in-the-image test of this repository (marks-invariant.test.ts, probe-preamble.test.ts and these) skips where the pinned image is not on the machine, and hosted CI does not pull it (several GB). They run where the image is: the lab's gate (pnpm test with Docker) ran all nine here, 9/9, on the base three red and six green. Provisioning the image in hosted CI is a repository-wide choice, not this PR's.
| for (let pass = 0; pass < passes; pass++) { | ||
| try { | ||
| execFileSync('docker', ['run', '--rm', '--network', 'none', '-v', `${dir}:/work`, '-w', '/work', IMAGE, 'pdflatex', '-interaction=nonstopmode', main], { stdio: 'pipe', timeout: 300_000 }) | ||
| } catch { | ||
| /* errors are the log's */ | ||
| } | ||
| } | ||
| const stem = main.replace(/\.tex$/, '') | ||
| const read = (f: string) => { | ||
| try { | ||
| return readFileSync(join(dir, f)) | ||
| } catch { | ||
| return null | ||
| } | ||
| } | ||
| const pdf = read(`${stem}.pdf`) | ||
| const written = new Map<string, string>() | ||
| for (const f of readdirSync(dir)) if (!files.has(f) && !/\.(?:pdf|log)$/.test(f)) written.set(f, read(f)?.toString('latin1') ?? '') | ||
| return { ok: !!pdf, pdf: pdf ? new Uint8Array(pdf) : null, log: read(`${stem}.log`)?.toString('latin1') ?? '', aux: written.get(`${stem}.aux`) ?? null, bbl: null, ms: 1, written } |
There was a problem hiding this comment.
There was a problem hiding this comment.
Adopted in 437fe19, red first: a document of our own that counts its passes in a file and stops TeX at the third left the second pass's PDF standing, and compileIn reported it as the run's (ok true). Each pass now starts with no PDF, so a pass that dies leaves none to compare; the new test and the eight others pass in the pinned image.
… an earlier pass left compileIn took a PDF an earlier pass wrote for the run's where the last pass died (Devin's review of #701); each pass now starts with no PDF. Red first: a document of our own that stops TeX at its third pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rules gate: passedModel tier of the layer gate on 32 outputs of 7 targets, The rule set changes no target. No output for zh-TW, pt, it, nl, pl, tr, id, ms, cs, sv, uk, bg: their rules are not measured here. de: 5 outputs, no measure moved
es: 4 outputs, no measure moved
fr: 4 outputs, no measure moved
ja: 4 outputs, no measure moved
ko: 4 outputs, no measure moved
ru: 4 outputs, no measure moved
zh: 7 outputs, no measure moved
The links open the lab on a machine that has the fixtures. No page and no text of a paper is shown here: the papers are under arXiv's licence. |
# Conflicts: # lab/release-check/census-ledger.json
…nd LaTeX's writes over the line's ledger, with its reason Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What a reader saw
A numbered section heading that a class sets in capitals after storing its title (REVTeX 4.0's
\section, through thetextcase it carries), and a proof's optional title under thmtools (
\begin{proof}[Proof of Theorem 2]), had no point oftheir own on the compiled page: the engine drew them through an ink unit, the section's number was sent to the translator as
a word ("I." came back as a word), and a heading of two lines became two pieces.
Why
LAYOUT_TEX's gated marks (
\axthmark,\axtpma,\axtpmm,\axtpm,\axthpk,\axttg,\axtcolour, and CARRY_TEX's\axtpmd) took the mark where\protectis\@typeset@protectand\@gobble'd it otherwise. LaTeX sets the same\protectfor a
\protected@edefmade to set a text later as for a\protected@writemade to write a file, so a class that stores aheading by
\protected@edeftook its marks off (textcase v0.06:\protected@edef, then\uppercase; thm-patch.sty: theoptional title through a
\protected@edef).The change (PDF-READER §18.111)
\noexpand\<mark>), where LaTeX does not typeset, as a robust command does,and sets its point where the stored text is set. Not
\protect\<mark>: a stored mark would stand unexpanded in a laterwrite's
\edefand be written (minitoc's part contents, the regression of the earlier root form).\protected@write(wrapped before the class, again where the document begins if a class or a package defined itanew) and a package's
\protected@iwritelet every gated mark be\@gobblein their own group, before their\edef.\uppercaseturns a name's letters and no control sequence's; our names begin with a lower-case letter, so where aname's first character is not its own
\lccode(an upper-cased name) the gate hands its command and argument through\lowercase; every other name expands exactly as before (a closing mark right after$$must expand to nothing: a firstform that sent every name through
\lowercaseleft the space after such a display to be set, caught by the 245 and now ared test).
Tests
packages/engine/tests/no-point.test.ts: its two expected failures are plain tests (red on the base, green here).tests/pdf-reader/marks-robust.test.ts(TeX in the pinned image): a\protected@edefthen\uppercaseover a section'stitle and a
\protected@edefover a proof's optional title, each in a form of no class and through REVTeX 4.0 and thmtoolsthemselves (red on the base); the protection, green on the base and here: minitoc's part contents, a contents line, an index
entry, a label's text, a caption's list entry and a stored text written through LaTeX's writes hold no gated mark; running
heads (the headings style and fancyhdr, two-sided) set no point of a heading's and the heading is owned once; hyperref's
outline and document-information strings are the paper's own compile's; a paragraph resumed after
\[ \],$$ $$,equation and align sets every word where the paper's own compile does (red on the first form).
Proof
The lab's 245 (every paper compiled again in the pinned image; the chain against the line's chain of record at #698):
with a
\writeof its own and which now also holds the note's placeholders' marks (that paper ships its.bbl); the layoutguard's file check (
marksOutOfPlace) finds nothing new;proof title), their ink twins gone; 18 papers' case-changed titles and headings now state their alignment and skips (amsart's
among them), parts alone;
added-on 4 -> 4, newly worse 0;
Known loss, not fixed here (one title of the 245): a class that re-reads its title up to the author's
\thanksand moveseverything after it into the note (siamart's
\@ucnothanks) moves our closing mark of the note's call there too. It wasdropped there before; now it is set where the note is, the call's range spans the note, and the title is held as the original.
The 599 of the census (every paper prepared again, the census's own fill and measure): every outcome as at the line;
unlocated: marks128 units of 39 papers -> 61 of 28: the 67 units of 11 papers the census traced to this cause drawn (U25: 34units of 9 papers -> 16 of 5); no other cause rising.
Versions
PIPELINE 129 (128 is #698's): the marked TeX moves, so every paper compiles again and the units newly located are other
units; LAYOUT stays 48 (the gate pack's layouts made again at this head and at the line: every file byte for byte the
line's); TRANSLATE stays 11, FORMAT 1.
Not in this PR: REVTeX 4.2's notes set as bibliography entries (M2), the units TeX never sets (M3), pages read as nothing
(M4).
🤖 Generated with Claude Code