Advance native LaTeX execution and preview

This commit is contained in:
gloamxun committed 2026-11-18 22:17:21 +08:00
1 parent 91f9d76b16
commit 2741546ca8
414 files changed
+99872 -933

No files matched your search

+106 -3
View File
@@ -1,6 +1,109 @@
# Route-D status (handoff after the round-150 recovery)
# Route-D status
Status: active on `main` in `texrra-engine` (the tree is clean after each push).
Latest acceptance, 2026-11-03: [W3-S5b actual paragraph traces, canonical-zero
glue and owned ordinary side-script lists](NATIVE_PARAGRAPH_TRACE.md) passes
**1384 workspace tests /0**, CLI48, optimized 138 core +20 CLI and all retained/new
gates. Break traces observe the actual candidate/passive/selected path; real
glue specification identity and script h/v lists drive print and paint. The
8-job/32-page oracle has 24 exact reports /5436 pass-and-decision lines, zero
word/raster differences and identical native PDF bytes across trace controls.
All statistics/PK/PDF/device and 105-page object-stream gates remain accepted.
Original full entry and direct kernel now stop at latex.ltx:657:3 tracinggroups;
format_boot_passed=false. Full P2-M1 stays active/incomplete. Remaining real
tracing consumers/insertions, compound math fields, format/NFSS/native image/
article and sessions keep every original exit. No v1/source/template/font fallback.
Dated planning/pause notes below are historical; see [progress](P2_M1_PROGRESS.md).
Next complete stage planned, 2026-11-02: [P2-M1](NATIVE_FORMAT_ARTICLE_STAGE.md)
targets original pdfLaTeX format initialization/native image reload and
unmodified article corpus execution, with full-job session/dependency and
performance baselines. W0–W7 have explicit dependencies and exit gates.
New original-entry probes expose resource lookup at pdflatex.ini:4 and
pdfoutput at pdftexconfig.tex:6; latex.ltx:526 is the direct-kernel boundary.
Real reference TeX builds the format and one-page article; native does not.
This planning round changes no engine implementation or 1204-test baseline.
G1 stays paused; native format boot and safe incremental execution remain open.
Current P1-T1 acceptance, 2026-11-02: [native sfcode and sentence spacing](NATIVE_SFCODE.md)
passes **1204 workspace tests / 0 failed**, release, fmt/diff and all old native/
Math D gates. Three core tests cover **256 INITEX defaults/eight state reads**,
**132 exact factor/glue/hbox/paragraph lists** and **nine raw-slot/missing/timing
cases**. The new PDF has one page / 86 words, max word-box error 0.005581bp
under the unchanged 0.02bp gate. Eighteen CLI tests pass (12+6), including the
retained first-showbox/actual job-entry fix. Compound math diagnostic structure,
errorcontextlines/show/showthe and full interaction remain open; G1 is paused.
Untouched LaTeX remains at 526:1, errorcontextlines, full format startup false.
The governing product remains a complete portable realtime native LaTeX kernel;
Web is the frontend test interface. See [product roadmap](NATIVE_PRODUCT_GOAL.md).
Full font/page/format closure and safe incremental checkpoints are not implied
by this bounded state/paragraph slice. Evidence: /tmp/texrra-native-sfcode/.
Historical audit/plan before P1-T1, 2026-11-02: [short-term gaps and G1](NATIVE_SHORT_TERM_GOAL.md)
records 40 paired native/INITEX probes and six context-limit reference probes.
The first-showbox/no-prior-message case exposes a real extra blank line in TeX
that native output lacked at that point; the accepted five-show fixture did not
cover that initial channel state. Nested errors lack real input context.
G1 planned actual input frames, errorcontextlines, show/showthe and the channel
fix; that planning round made no engine change. The later P1-T1 acceptance above records the channel fix and latest full baseline;
remaining G1 work stays paused. Untouched LaTeX
was last verified to stop at 526:1,
errorcontextlines, full startup false. Diagnostics, general text/quantities,
font resources and native pagination have separate remaining exit criteria.
Prior accepted diagnostic slice, 2026-11-01: native recursive box/list diagnostics pass
**1200 workspace tests / 0 failed**, release, fmt/diff and all prior native/Math D
gates. Four new core tests contain **152 exact INITEX recursive-list cases**,
**24 paragraph lists** and **24 byte-printer cases**. Seventeen CLI tests pass
(native_execution 12, native_job_io 5). See [scope](NATIVE_BOX_DIAGNOSTICS.md).
Showboxbreadth/showboxdepth now consume actual scoped state and original native
nodes (62 typed parameters total). Nested boxes retain semantic views without
duplicating painted trees; selected paragraph lines retain real nodes/settings,
and vertical lists retain named glue. Dimensions, glue-set ratios, ligatures,
kerns, penalties, discretionaries, depth markers and per-level breadth follow
real TeX. No coordinate-derived fake list, inert flag, v1/string fallback,
template rule or font replacement was added.
Showbox is non-destructive and stops current character joining. Font display
names track the latest actual definition without changing physical font IDs;
restricted hbox hyphen construction and actual INITEX newlinechar=0 are fixed.
The real log/terminal pair uses shared newline transitions. Noninteractive show
commands continue PDF output and return status 1; fatal errors still protect an
existing PDF. Full interaction/history/recovery is not certified.
The new release diagnostic gate requires **five exact show bodies**, actual
channels, only intentional OK diagnostics and exits [1,1]. Native/reference
PDFs both have **one page / 19 words in identical order**, maximum word-box
error 0.005262bp (unchanged 0.02bp gate). Final raster inspected. Existing eight
word-box gates and delimiter/accent/128-slot ink gates remain unchanged and pass.
Prior delimiter/accent/slot, display/interline/box/paragraph/math/token/quantity,
filesystem and shipout-I/O oracles remain green. Math D remains three pages,
rule y error +0.1035625bp and identical 144dpi formula ink bounds.
Unchanged SHA-pinned LaTeX2e 2025-11-01 passes showboxbreadth/showboxdepth at
524/525 and stops at **526:1, missing errorcontextlines**. Actual auxiliary
time/date I/O and original directory checks execute; **full format startup
remains false**. Next preserve actual input/macro expansion contexts and consume
errorcontextlines in genuine error/context printing, with independent INITEX
oracles; no unused flag or fabricated backtrace.
Compound math box/glue diagnostics and showlists/showthe/show still require
owned structure/real execution; unsupported inspection fails explicitly.
Broader math/operator/alignment, mutable fontdimen, arbitrary fonts/VF/map/NFSS,
XeTeX shaping, native page/output/shipout/whatsits, full closure/dump/load and
realtime checkpoints remain open. HTTP/project routes remain transitional;
Nimbus/SFTT versus Liberation template font differences persist. Unicode-scalar
input does not certify pdfTeX UTF-8 byte conformance.
Final evidence/logs: /tmp/texrra-native-diagnostics/ (accepted-workspace.log,
accepted-release.log, accepted-core.log, accepted-cli.log, final PDF/raster/
audit JSON, format-probe-final.json and math-regression.json). Changes remain
local and uncommitted/unpushed. See [active plan](ROUTE_D_PLAN.md) and
[native core](NATIVE_EXECUTION_CORE.md). Recovery records below are historical.
Historical service snapshot below (2026-10-27); current native scope and local
uncommitted status are given above.
This page collects what route-D currently does, how to verify it, and the
limits that remain. It is the short companion to the long implementation log in
`ROUTE_D_PLAN.md` and the model notes in `TEX_CORE.md`.
@@ -16,7 +119,7 @@ cargo test --workspace --offline
or run `./scripts/verify-route-d.sh`, which executes both.
The workspace currently passes **1094 tests**:
The historical service snapshot passed **1094 tests**:
| Suite | Tests |
| --- | --- |