Skip to content

feat(C/N2): unified PGF/TikZ library catalogue and safe import evidence - #58

Merged
i-shutov merged 18 commits into
mainfrom
feat/c-n2-declarative-library-panel-20261031
Oct 31, 2026
Merged

i-shutov merged 18 commits into
mainfrom
feat/c-n2-declarative-library-panel-20261031

Conversation

@i-shutov

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

Copy link
Copy Markdown
Owner

C/N2 — consolidated, source-first library catalogue + honest project-import evidence

Exact base main: ab5705d4dd7e3dcefd3ef6ddfd695f6d0ee4dfd1 (N1 #44, C #49/#51/#55 already merged). Exact PR HEAD: 7114d2d9bb3ce622dd7f1523e53f72082557d446. C branch absorbs the independently green late-import change from C #61 as a second-parent merge, not by replaying old #39. The source diff to main contains 15 C-owned paths only: tikzarium-extensions, extensions/, docs/EXTENSIONS.md, C plans/ and insights/. No B UI/A build/D/E/F files changed.

Functional code, not a CAD scene or TeX parser

  • Versioned extensions/primitives/catalog-v1.toml: the six N1 native TikZ primitives and their original Russian parameter help are preserved. Four PGF/TikZ libraries (arrows.meta, positioning, calc, fit) gain stable IDs, native syntax, package/library/engine requirements, complete original XeLaTeX example, Russian effect/warnings/interactions, primary manual section/URL; unverified minimum PGF version is UNKNOWN, not invented.
  • Additive Rust Catalog::libraries / Catalog::library(name) and project_imports::capabilities_for_library(...). Keep INSTALLED, PROJECT_LOADED, ENGINE_COMPATIBLE, TOOL_IMPLEMENTED, HELP_AVAILABLE separate. Package presence never implies project import, actual TeX compilation, visual editing or tool coverage. For arrows.meta the narrow arrow generator exists; no positioning/calc/fit visual editor is implied. Lua-only graphdrawing remains outside XeLaTeX.
  • Existing targeted literal \\usepackage / \\usetikzlibrary recognition, declaration_sites, source revision/range checks, connect/disconnect plans and inverse Undo patches retained. Newly combined source evidence: a possible late document-body \\usetikzlibrary{calc} or external \\input/\\include gives missing requirements UNKNOWN, keeps previously confirmed preamble declaration sites, refuses unsafe edits with reason. Comments/escaped control sequences are not fabricated as imports. No silent install or engine switch.
  • New independent n2-library-fixture Rust generator for four actual XeLaTeX examples; source-level negative/refusal/CRLF/undo tests, plus one cross-feature test proving the library panel reports late body-side calc UNKNOWN even when INSTALLED=CONFIRMED. Six original tools and help regression tests remain included.
  • B API handoff on feat(B10–B15): TikZ-native egui tools, Esc/Undo and C/N2 source evidence links #50, D fixture/rejection test contract available in this PR; independent help E and source F retain ownership. The interface for visible diff/confirmation/Undo is B-owned and is not implemented by this change.

Actual QA and evidence boundary

Merge/review sequencing

Review and gate this consolidated #58 as the single C/N2 code+tests+docs+plans/insights unit. Independent C #61 is contained in the verified PR #58 ancestry and was closed without merge as superseded, avoiding a duplicate integration. No merge to main by C claimed.

Copy link
Copy Markdown
Owner Author

Integration gate at 0ad8978a0b094c35a81d3cbc756e128b7e29585b: D QA 41211862002, Ubuntu job 124568348394 FAIL in Rust full workspace tests (35/36 tikzarium-app tests PASS). Exact failure: pdf_navigation::tests::poppler_worker_kills_hung_process_and_reports_not_checked, assertion at crates/tikzarium-app/src/pdf_navigation.rs:246: error.contains("timed out") false. This is an unmodified B/Poppler test, not the new C catalogue, but it remains a mandatory gate; do not merge #58 on this SHA or reduce the acceptance assertion. First capture the actual error with the existing variable (e.g. assert diagnostic "unexpected Poppler error: {error:?}") and determine why subprocess spawn/monitoring returned before 150ms. Windows/macOS Rust passed at this HEAD, N1 and fonts passed, but Linux D QA is red. Keep C-only ownership; coordinate a separate B/integrator fix if the underlying issue is in Poppler test/runtime. No false cross-host PASS.

Copy link
Copy Markdown
Owner Author

C/N2 coordination from independent PR #61 (base main ab5705d): external XeLaTeX accepts \usetikzlibrary{calc} after \begin{document}. Main's preamble-only inspect currently reports a false Absent. #61 adds a bounded post-begin ambiguity guard: direct preamble sites stay Confirmed; absent libs become Unknown, auto connect/disconnect refuse. Your #58 change to project_imports.rs is additive at imports/capabilities_for_library/supported-list, while #61 inserts lexical helpers and post-begin check; no type change, but both PRs touch that C file. Please reconcile after first merge and rerun exact-head Rust CI. New C-owned XeLaTeX fixture in #61; physical Win10/M1/M4 still NOT_RUN.

Copy link
Copy Markdown
Owner Author

C/N2 consolidation checkpoint (2026-10-31): this PR now contains both the original four-library declarative catalogue and source-authority fix from C PR #61, preserved in a two-parent branch merge on current main ab5705d4dd7e3dcefd3ef6ddfd695f6d0ee4dfd1. Exact combined HEAD 7114d2d9bb3ce622dd7f1523e53f72082557d446. GitHub compare against that main: 15 C-owned paths only; no A/B/D/E/F files. Added a combined Rust integration regression: late body-side \\usetikzlibrary{calc} must yield library-panel PROJECT_LOADED=UNKNOWN even with INSTALLED=CONFIRMED, retain confirmed preamble tikz evidence, and refuse an invisible source edit. Original six tool/help records remain unchanged. Prior D QA failure on old #58 HEAD was a B-owned Poppler timeout assertion, not C catalogue; a failed-job rerun was requested but cannot be inherited as this HEAD's PASS. New CI is queued: https://github.com/i-shutov/tikzarium/actions/runs/41215112434 ; separate D and XeLaTeX jobs also required. Retain draft until exact-head green. No physical Win10/M1/M4 acceptance.

@i-shutov i-shutov changed the title feat(C/N2): shared library catalogue, independent evidence and XeLaTeX examples feat(C/N2): unified PGF/TikZ library catalogue and safe import evidence Oct 31, 2026

Copy link
Copy Markdown
Owner Author

Exact combined HEAD QA verified — 7114d2d9bb3ce622dd7f1523e53f72082557d446, main ab5705d4dd7e3dcefd3ef6ddfd695f6d0ee4dfd1. All five hosted workflows finished SUCCESS on this exact SHA: native Rust CI 3/3, D QA 7/7 including Windows Server/macOS/Ubuntu Rust fmt+tests+Clippy and actual XeLaTeX CLI, N1 actual application→TikZ→external XeLaTeX, font/glyph PDF gate, and distinct MiKTeX 25.12 hosted Windows Server 2022. Independently inspected Ubuntu, Windows Server and macOS Rust job logs: new late_body_import_remains_unknown_in_shared_library_panel test PASS on all three hosts, 7/7 shared library tests. PR diff vs main: 15 C-only paths, no B/A/D/E/F modifications, mergeable. Old #58 D QA Poppler timeout was an unmodified B test; targeted old-head rerun also finished SUCCESS, but current exact-head D QA independently passed and is the acceptance evidence. Review-ready code, not a released/physically accepted GUI: physical Win10+user MiKTeX, M1/M4, B library-panel UX/manual confirmation remain NOT_RUN. No main merge performed by C.

@i-shutov
i-shutov marked this pull request as ready for review October 31, 2026 15:36
@i-shutov
i-shutov merged commit 8a33b2f into main Oct 31, 2026
16 checks passed
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