Skip to content

fix(schema): compare inline reference results - #1198

Merged
gaborbernat merged 3 commits into
tox-dev:mainfrom
gaborbernat:fix/xslt-reference-1016
Oct 7, 2026
Merged

gaborbernat merged 3 commits into
tox-dev:mainfrom
gaborbernat:fix/xslt-reference-1016

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

The schema differentials in #1016 need XSLT result comparison and seed-tree mutation. This adds inline XSLT and RELAX NG families alongside the existing XSD runner, using libxslt and libxml2 as references.

Subtree swaps repair references against recipient declarations. Broken references check rejection at compilation or application. Dictionary seeds inherit the specified namespace bindings. Text output compares exact strings; XML output compares expanded names and tree content.

The reference cases exposed accepted undefined RELAX NG references and rejected foreign annotations. RELAX NG sections 4.1 and 4.18 require annotation removal and reference resolution before unused-definition removal. Compilation now follows those rules on its private tree, preserving caller-supplied nodes.

The added compiler checks increase final-head TOTAL instruction counts by 16.56% on the large compile/reuse workload and 13.55% on the small one against the reported base. A fused annotation scan increased both compiler costs, so this retains the original correction. Validation increases remain below 0.4% across the measured RNG families.

The import-root canary and optional evaluation counters remain outstanding in #1016.

Compare inline XSLT and schema outcomes with the reference engines. Repair
seed-tree references so mutations exercise compiler and validation behavior.

Reject undefined RELAX NG references before removing unused definitions and
remove foreign annotations on the compiler's private schema tree.

Refs tox-dev#1016
@gaborbernat gaborbernat added the bug Something isn't working label Oct 7, 2026
@gaborbernat gaborbernat changed the title 🐛 fix(schema): compare inline reference results fix(schema): compare inline reference results Oct 7, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review October 7, 2026 04:41
@codspeed

codspeed Bot commented Oct 7, 2026

Copy link
Copy Markdown

Merging this PR will regress 3 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 577 untouched benchmarks
⏩ 32 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_feature[compile-rng-reuse] 992.4 µs 1,118.5 µs -11.28%
❌ test_feature[select-relative-sibling] 42.3 µs 45.4 µs -6.92%
❌ test_feature[compile-rng-reuse-small] 95.7 µs 101.6 µs -5.75%
⚡ test_feature[shadow-slot-comments] 111.4 µs 83.5 µs +33.46%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing gaborbernat:fix/xslt-reference-1016 (2ec126a) with main (83bd497)

Open in CodSpeed

Footnotes

  1. 32 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@gaborbernat
gaborbernat merged commit 9ff1626 into tox-dev:main Oct 7, 2026
55 of 57 checks passed
gaborbernat added a commit that referenced this pull request Oct 7, 2026
Users can compile `<externalRef/>` and `<include/>` without the `href`
required by the [RELAX NG full
syntax](https://relaxng.org/spec-20011203.html#full-syntax). Reject
these incomplete patterns in roots, reachable patterns and unused
definitions.

The Jing label runner now compares the two inline missing-attribute
cases as compilation rejections. This completes their ordinary
compilation checks in
[#1016](#1016).

This builds on the private-tree annotation removal and unused-reference
traversal merged in
[#1198](#1198).

The Atheris environment includes the structural reducer’s `tinycss2`
dependency so the public consumer inventory can import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant