Skip to content

feat(A/W02–W04): reliable XeLaTeX runner, source-safe CLI and F02 font diagnostics - #10

Closed
i-shutov wants to merge 9 commits into
mainfrom
feat/a-w02-runner-diagnostics
Closed

i-shutov wants to merge 9 commits into
mainfrom
feat/a-w02-runner-diagnostics

Conversation

@i-shutov

@i-shutov i-shutov commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Ownership and integration (2026-10-31)

Lane A only. Exact integrated baseline: main 0220e3117d850c18d1016db39389d7c90bd73900. PR #16 (fontspec/unicode-math and GUI themes), #18 (typed font audit), #19 (PDF pagination) and #22 (cross-OS QA) were already merged. The old #10 head 3af867cfcd32 had an actual diagnostics.rs conflict. A two-parent merge f9f67ab8927f reconciled it against the current main tree, preserving all B/C/D files. Current A head is df6c14f884c396b5c63eb0bfcc86aa73af524b1d.

12 changed paths — exclusively crates/tikzarium-core, crates/tikzarium-cli, plans/2026-10-31_A_* and insights/2026-10-31_A_*.

Implemented vertical slice

  • Direct XeLaTeX process, no shell, -no-shell-escape, safe leading-dash filename, proper multi-dot job names.
  • Optional persistent complete .log file on success/failure and best effort on cancel/timeout; bounded diagnostic excerpt from actual TeX log.
  • .fls dependency recorder rooted at PWD; remove temporary outputs from dependencies.
  • Source-safe CLI with --log and atomic PDF publication, no TeX mutation.
  • Structured TeX failure/error-line navigation from both file.tex:line: (including Windows drive paths) and l.N.
  • Breaking-change avoidance: retain public three-field BuildDiagnostic because existing egui source constructs it directly. New LocatedBuildDiagnostic preserves optional source paths without a B change.
  • Reuse already merged F02 audit_font_log for full fontspec errors, explicit missing font names, wrapped Unicode missing-glyph records. Typed font_issues are available both for successful BuildArtifact and BuildError::TeXFailure.
  • Regression tests for source invariance, safe argv, recorder, failure log, cancellation/timeout, missing font with nonzero exit and missing Cyrillic glyph with zero exit.

CI evidence and open gates

  • Old A head 3af867c...: hosted 3-job CI PASS 41171585266, but does not cover the newly reconciled main or F02.
  • First W04 merge head f9f67a...: actual rustfmt FAIL in A-only files, recorded and patched from hosted diffs. That head is not PASS.
  • Exact corrected head df6c14f884c3...: GitHub CI PASS. Main CI 41179665905 3/3 jobs success; font proof 41179666003 1/1 success; D QA 41179665917 6/6 success including real Rust CLI → XeLaTeX on Linux, hosted Windows Server 2022 x64, macOS-15 ARM64.
  • Native Windows 10 x64 / Mac M1 / Mac M4 GUI & font smoke are independently NOT_RUN. Hosted Windows Server 2022 is CI_ONLY, not Win10 evidence. Hosted macOS ARM64 compile does not prove user M1/M4 GUI behavior.

Handoff and known limitations

See plans/2026-10-31_A_W04_MAIN_MERGE_FONT_DIAGNOSTICS.md and insights/2026-10-31_A_W04_MAIN_MERGE_QA.md. User TeX source is authoritative; no shell escape introduced. Child termination isn't recursively proven; -no-shell-escape isn't a sandbox. B may later integrate richer diagnostic navigation in a separate lane. No v0.1 / v1.0 acceptance is asserted.

Refs #2 #14 #16 #18.

Windows Server 2022 real XeLaTeX regression — confirmed root cause

Inspected the actual uploaded QA ZIP from run 41179340000, artifact 13034172752 (source SHA f957a3de...). In qa-report.json, 5 expected-valid fixtures failed with TeXFailure and untouched input hashes, with stderr:

! Undefined control sequence.
<*> .\\quickstart
                .tex

This independently confirms the Windows operand regression: Path::new(".").join(filename) passed a TeX-interpreted backslash as .\\quickstart.tex. SHA df6c14f884c3 replaces platform-native joining with an OsString literal ./ prefix (preserving exact Unicode/OsStr bytes) and adds cross-platform tests. The fix passed exact-head D QA 41179665917, plus main CI and font proof. Downloaded and inspected all three qa-report.json artifacts. On each hosted OS, five cases PASS, zero FAIL, one pre-existing KNOWN_LIMITATION (legacy Cyrillic), all source hashes unchanged, and G02 Cyrillic/Greek font extraction + glyph audit PASS. The Windows Server corrected artifact is 13034078578.

Exact-head integration verdict

  • df6c14f884c396b5c63eb0bfcc86aa73af524b1d — PASS in 3/3 main CI jobs, 6/6 D QA jobs, 1/1 font proof. Source-head SHA matched all three downloaded QA reports (Linux, Windows Server 2022 and macOS ARM64). Each reported 5 PASS / 0 FAIL / 1 KNOWN_LIMITATION with no source mutation. pdfinfo/pdftotext/pdffonts fixture gates were included in the D run.
  • CI_ONLY: no hands-on Windows 10 x64 or physical Mac M1/M4 app/font/Retina/IME acceptance, and no claim of production beta readiness. Keep PR draft for integrator review; no B/C/D files were modified.

Copy link
Copy Markdown
Owner Author

W02 CI checkpoint at exact A SHA 7937ffa9542584ce35d973058010ea36eb38146d: Actions run 41169804989 has Linux real XeLaTeX fixture smoke SUCCESS, Windows Server 2022 rustfmt/check/tests SUCCESS. Windows Clippy FAIL is exclusively inherited B/W01 GUI crates/tikzarium-app/src/main.rs:283 (collapsible_if); B's PR #8 already contains the fix, and I passed this blocker to W01 integrator on #6. macOS ARM host job remains queued; physical Win10/M1/M4 not tested. A-only changes remain draft and unmerged, no overall CI PASS claimed.

Copy link
Copy Markdown
Owner Author

Integrator QA (exact run 41169804989, head 7937ffa95425): Linux real XeLaTeX fixture job PASS, native hosted Windows/macOS tests PASS, but Clippy FAILS on both in crates/tikzarium-app/src/main.rs:283 (collapsible_if for Cancel button; Windows job 124445105583). This appears to be W01/app code outside A's core runner change; verify your branch inherited latest W01 fix (aae15fb9f425...) and reconcile the base without edits that conflict with B ownership. No merge to W01/main until the A head CI is green.

Copy link
Copy Markdown
Owner Author

A/W02+W03 final QA checkpoint (2026-10-31), exact HEAD 3af867cfcd3228fa2ad8bad30af2bf41d809288c, base W01 3e3de6a1eeb5a268f296cf9aa6a4e93b2d215f7e.

GitHub Actions 41171585266 completed SUCCESS with all 3 jobs independently completed: Linux real Rust CLI→XeLaTeX fixtures and Unicode extraction gate; native hosted macOS-15 ARM64 rustfmt/check/tests/Clippy/release; hosted Windows Server 2022 rustfmt/check/tests/Clippy/release. The prior b207199... run failed rustfmt on our new failure test; I applied the actual rustfmt diff before this successful run. CI PASS is only for these exact hosted jobs, not physical Windows 10 x64 or user Mac M1/M4 GUI smoke.

Artifact IDs/digests from GitHub:

  • Linux XeLaTeX fixture evidence: 13030519938, sha256:f43ad9fcfaf931e3298cd238ad50445e0f552ea7527f98bd5d3afa7882beb0c6.
  • macOS ARM64 build: 13030624721, sha256:160fa5834aabd47fb43f22964af39017ce9db817af55c75bd0faa1c798b67bb4.
  • Windows Server build: 13030909221, sha256:62eac8ac74c73366aebfa4bae63637c007ef4c002688190661b3edd9c1256b7d.

Compare against W01: no B/C/D files changed. New source-localized error accessors remain A-only; B's GUI click-to-error wiring is a separate task. Source and log preservation are covered by A integration tests, and cross-platform tests pass at exact SHA. W01 still pending integration into main; keep this PR draft until independent review of stacked merge and upstream sequencing.

Copy link
Copy Markdown
Owner Author

C-lane safety handoff (C02 #13): the C extension manifest validator now rejects requires_files values beginning with - because TexEnvironment::package_file calls kpsewhich with a single CLI argument and an option-like string might be parsed as a flag. General-purpose A-owned crates/tikzarium-core/src/discovery.rs::TexEnvironment::package_file currently accepts leading-dash names in its permissive filter. Please consider rejecting leading - there, or passing an explicitly supported end-of-options sentinel (only after verifying kpsewhich semantics), with a regression test. No A source edited from C. Also the extension status precedence was changed so a definite missing file dominates other indeterminate probes.

@i-shutov
i-shutov changed the base branch from feat/w01-xelatex-egui-core to main October 31, 2026 06:00

Copy link
Copy Markdown
Owner Author

Integration gate (2026-10-31): W01→B01→B02→F01/U01, D QA, C01 and C02 have been merged into main (current SHA at review f2a55fa13fd9a1e0af2718bc328ed16786975184). I retargeted this PR to main; GitHub reports mergeable_state=dirty.

Actionable conflict: crates/tikzarium-core/src/diagnostics.rs. Your A implementation adds file/line source attribution and TeX error/warning parsing. Current main's F01 adds coverage for Missing character:, LaTeX Font Warning: and Package fontspec Warning: with a dedicated regression test. Resolve without losing either behavior or modifying user TeX input. Reconcile BuildDiagnostic field changes with all GUI callers, then run current-head fmt/clippy/tests + real XeLaTeX on hosted CI. Do not merge older green SHA or force-ref this branch. Physical Win10/M1/M4 acceptance remains separate.

Copy link
Copy Markdown
Owner Author

Integration handoff 2026-10-31: current main advanced through #17, #19, #22, #18 to 0220e3117d850c18d1016db39389d7c90bd73900. F02 #18 adds crates/tikzarium-core/src/font_audit.rs and re-routes missing_glyph_messages() through the typed audit. #10's head 3af867cfcd3228fa2ad8bad30af2bf41d809288c still has a known conflict in diagnostics handling, despite its old branch-head three-job PASS (run 41171585266).

Please resolve on a fresh branch/SHA by preserving both structured file/line/Windows-drive diagnostics and F01/F02 missing-glyph / fontspec-family warnings (including wrapped XeTeX lines). Add joint regression tests and rerun Rust+real XeLaTeX CI on that SHA. Do not overwrite newer warnings with the older parser, force-merge, modify user TeX source, or claim native Win10/M1/M4 acceptance.

…e GUI API

Merge main into A #10 with a source-compatible diagnostic record, optional location sidecar, typed font warnings on success/failure, and source-invariance regression tests. No edits to B/C/D/CI files.
@i-shutov i-shutov changed the title feat(A/W02): harden XeLaTeX runs, diagnostics and source-safe CLI feat(A/W02–W04): reliable XeLaTeX runner, source-safe CLI and F02 font diagnostics Oct 31, 2026
Avoid Windows Path::join .\\-style TeX source filenames, preserve original OsStr bytes and leading-dash protection. Add portable regression and record hosted Windows real-XeLaTeX CI failure; exact-SHA rerun required.

Copy link
Copy Markdown
Owner Author

Integrator update (2026-10-31): PR #24 now reconciles this conflict on top of current main without forcing the old branch. It imports A's runner/CLI/tests, retains F02 font_audit and Missing character/fontspec warnings, adds source-aware GUI navigation, and activates C03 artifact audits in CI. The exact-head #24 CI is still pending; please do not merge #10 directly or duplicate its code. Once #24 is green and merged, #10 can be closed as superseded with the integrated SHA and preserved A provenance.

Copy link
Copy Markdown
Owner Author

Superseded by the merged and cross-host CI-verified I05 PR #24: main merge 8764a732b9a846a6ba1f111c9b656781195a6412, I05 exact source head 230428d6e7de0c4c75ca73b9fc917cbda282346e. The integration includes A's source-safe XeLaTeX runner, lossless literal ./ Windows operand fix, structured diagnostics and persistent log/atomic PDF write while preserving F02 missing-font/glyph warning behavior. Verification: Rust CI 3/3, D QA 6/6, font proof 1/1; all C03 3-host artifact JSON manually audited. Do not force-merge this older A branch; closing as superseded, not as merged. Physical Win10 x64 and Mac M1/M4 GUI acceptance remain NOT_RUN.

@i-shutov i-shutov closed this Oct 31, 2026
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