Skip to content

compiler: the inventory stops advertising box transforms it never applies - #326

Closed
GoKubar wants to merge 3 commits into
mainfrom
agent/nixos-graphics/inventory-truth
Closed

GoKubar wants to merge 3 commits into
mainfrom
agent/nixos-graphics/inventory-truth

Conversation

@GoKubar

@GoKubar GoKubar commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

The bug

\scalebox, \resizebox, \rotatebox and \reflectbox are parsed, and their
content is set — untransformed, in every layout this project has. The Core 14
layout says so (layout.rs: "graphics transforms are not applied by this
layout"
). The inventory did not:

command described as
\scalebox "graphics.sty scaled box of the content"
\resizebox "graphics.sty box scaled to a width and/or height; ! keeps the aspect ratio"
\rotatebox "graphicx rotated box; the box is the rotated bounding box"
\reflectbox "graphics.sty box mirrored left to right"

crates/compiler/supported/supported-latex.json is the Mac editor's completion
vocabulary
(apps/mac/scripts/sync-supported-latex.sh copies it byte for byte),
so an author autocompleting \rotatebox was told it rotates. Same class of defect
as a fabricated command row.

The descriptions now state what actually happens, in capitals where it matters
("the content is set UNROTATED and the limitation is reported").

Why the description and not renders: false

renders's documented meaning is an arm "that parses the command but always
diagnoses that its output is unavailable"
(\check, \breve), and it also drops
the command out of the coverage denominator. These four do produce their
content, so the honest change is the description. The inventory header already
says "supported" means "no unsupported diagnostic … not a claim of typographic
fidelity (see the descriptions for approximations)" — the descriptions are where
the truth has to live. (renders is also not settable per row for text-dispatch
commands without a fourth field on all ~400 TEXT_COMMANDS entries.)

Two rows become more true

Matching the sibling pipeline PR #325:

  • \includegraphics now sets a box in running text as well as inside a float,
    and reads the [llx,lly][urx,ury] bounding-box form — so the row says so, and
    also says that trim/clip/viewport size the box without cropping the
    picture, and that EPS/PS are not read.
  • \graphicspath is now used by the image file search, not merely consumed.

Gates

  • cargo test --release --manifest-path crates/compiler/Cargo.toml — green,
    0 failed, including tests/supported_latex.rs, the drift gate over all three
    generated artefacts.
  • Regenerated with crates/compiler/scripts/render_supported_latex.sh
    (docs/user/compiler.md, supported/supported-latex.json,
    supported/coverage.md — coverage is unchanged, only descriptions moved).
  • Mac bundled copy re-synced with apps/mac/scripts/sync-supported-latex.sh, so
    CompletionTests.testBundledInventoryMatchesTheCompiler stays green. Swift
    cannot be built on this machine; the sync is a byte-for-byte cp and the
    script's own --check mode reports the copy current.

Note for the integrator

crates/render-pipeline/vendor/compiler pins the compiler source and is
byte-identical to crates/compiler/src on main today, so this branch makes it
drift by these six rows. Nothing in the pipeline reads supported.rs, so no
re-pin is needed for correctness — re-pin when convenient. No vendor files are
touched by this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu


CI note: rust bridge is red on main, not from this branch

crates/bridge/src/features.rs:45 calls flashtex_compiler::math::parse_tokens
with two arguments; 543bde5c gave it a third (MathPackages) without updating
the caller, so cargo test -p flashtex-bridge does not compile on plain
origin/main @ 6246a191 (reproduced from a git archive of crates/ at that
SHA). This branch touches four data files and no code. Unowned; flagging.

…lies

`\scalebox`, `\resizebox`, `\rotatebox` and `\reflectbox` are parsed, and
their content is set — untransformed, in every layout this project has. The
Core 14 layout says so (`layout.rs`: "graphics transforms are not applied by
this layout"), and the rendering pipeline now says so too. The inventory did
not: it described each of them as the working command ("graphics.sty scaled
box of the content", "graphicx rotated box; the box is the rotated bounding
box"), and the Mac editor's completion vocabulary is generated from that file.
An author autocompleting `\rotatebox` was told it rotates.

The descriptions now state what actually happens. This is the same class of
defect as a fabricated command row: the inventory's header already warns that
"supported" means "no unsupported diagnostic ... not a claim of typographic
fidelity (see the descriptions for approximations)", so the descriptions are
where the truth has to live, and these four were not telling it.

`renders: false` was considered instead, and rejected: its documented meaning
is an arm "that parses the command but always diagnoses that its output is
unavailable" (`\check`, `\breve`), and it also drops the command out of the
coverage denominator. These four do produce their content, so the honest
change is the description, not the flag. It is also not settable per row for
text-dispatch commands without a fourth field on all ~400 `TEXT_COMMANDS`.

Two rows become *more* true rather than less, matching the pipeline work in
the sibling branch agent/nixos-graphics/inline-images:

* `\includegraphics` now sets a box in running text as well as inside a
  float, and reads the `[llx,lly][urx,ury]` bounding-box form, so the row says
  so — and says that trim/clip/viewport size the box without cropping the
  picture, and that EPS/PS are not read.
* `\graphicspath` is now used by the image file search, not merely consumed.

Generated artefacts regenerated with
`crates/compiler/scripts/render_supported_latex.sh`, and the Mac app's bundled
copy re-synced with `apps/mac/scripts/sync-supported-latex.sh` so
`CompletionTests.testBundledInventoryMatchesTheCompiler` stays green.

Gates: `cargo test --release --manifest-path crates/compiler/Cargo.toml` green
(294 lib + every integration binary, 0 failed), including
`tests/supported_latex.rs`, which is the drift gate on all three generated
files.

Note for the integrator: `crates/render-pipeline/vendor/compiler` pins the
compiler source and is byte-identical to `crates/compiler/src` on main today,
so this branch makes it drift by these six rows. Nothing in the pipeline reads
`supported.rs`, so no re-pin is needed for correctness; re-pin when convenient.

Implementation-Agent: claude-opus-5, lane nixos-graphics, machine linux-primary
Commit-Executor: claude-opus-5 direct git (Cursor usage-limit fallback, AGENTS.md)
Co-authored-by: GoKubar <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar and others added 2 commits September 14, 2026 02:14
The merge brought main's longtable inventory rows in beside this branch's
graphics description corrections; `apps/mac/scripts/sync-supported-latex.sh`
copies the regenerated `supported-latex.json` into the app's resources, which
is what CompletionTests.testBundledInventoryMatchesTheCompiler compares.

Implementation-Agent: claude-opus-5, lane nixos-graphics, machine linux-primary
Commit-Executor: claude-opus-5 direct git (Cursor usage-limit fallback, AGENTS.md)
Co-authored-by: GoKubar <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
@GoKubar

GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded — the work is already on main.

Replacement: 5e425dc — transforms are applied now, so the inventory retraction is moot

Closed by the integration lane while clearing a 219-PR backlog (112 of them drafts). If this is wrong, reopen it and tell me — I would rather be corrected than leave stale work buried.

— orchestrator-astra (Commander)

@GoKubar GoKubar closed this Sep 15, 2026
@GoKubar
GoKubar deleted the agent/nixos-graphics/inventory-truth branch September 16, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants