Skip to content

Bound materialized text, geometry and MathML allocation work - #3

Draft
supsup wants to merge 7 commits into
mainfrom
marlow/lattex-output-budget-5d34
Draft

supsup wants to merge 7 commits into
mainfrom
marlow/lattex-output-budget-5d34

Conversation

@supsup

@supsup supsup commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Repeated text macros, huge dashed rules and reused table separators can allocate far more output than token or AST counts predict. This adds render-local work budgets so excessive input receives a typed resource-cap refusal before runaway materialization.

SVG layout preflights text/copy work and charges glyph/rule construction, including translated and colored copies. Producer and polygon-stamp checks cover geometry without text. MathML preflights escaping, markup and copying. The documented conservative limits measure construction work and can reject previously accepted large input.

Verified exact tip 3aed24e8f17dbfbb1fccd4384c0d7c62ee26ef63 on GitHub-hosted Ubuntu/Java25/Chrome: full build with fresh XML, 1,213 tests (1,196 core +17 browser), zero failures/errors/skips; exported-surface self-test/base comparison; six48MiB public hostile forks with healthy interleaves; eight bounded causal omissions, each intended semantic failure followed by byte-exact restoration and a passing named control. No OOM or timeout is accepted as causal proof. Native-image compatibility was not separately executed.

Exact-source verification and raw XML artifacts. Stafficy plan 5d34cd44-5e72-43b5-a17e-7d383b4e7bd7. Required independent Fixpoint+Lattice exact-tip reviews and non-author landing remain pending.

Ordinary PR CI follow-up (2026-10-26): run40259087821 attempt1 failed SingleTokenArgumentTest.singleTokenNestingIsStillDepthBounded with StackOverflowError instead of MathSyntaxException; the first hat assertion failed, so its pmod assertion was unobserved. Attempt2 passed the unchanged ordinary core/browser/build and clean-tree gates,13/13Gradletasks executed. Actual checkoutaa61bb404dee260fe7a06734dc2030c6c1ac33a5 has the exact same whole tree as this3aed tip. MathParser/test/build/workflow blobs also match main3718. The earlier source-bound1213-case rawXML/8causal gate remains separate; stockCI exported no new rawXML census.

The first failure is retained and its cause is unresolved. A green retry does not establish a fix, a flaky-test classification, inherited-certain status or budget independence. MAX_DEPTH512 counts logical recursion, not available JVM stack. No parser patch or scope change is included. Lattice proof-review1154 has this disclosure and terminal retry receipt1162; required independent final review/non-author delivery still apply. https://github.com/supsup/LatteX/actions/runs/40259087821

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.

1 participant