Skip to content

feat(fuzz): bound XML grammar expansion - #1196

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:feat/xml-grammar-1018
Oct 7, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:feat/xml-grammar-1018

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

XML lexical productions need an expansion bound without charging fictitious DOM nodes. Add separate node and step budgets to the shared generator, with reserved sibling costs and forced production paths for #1018.

Generate XML document families from XML 1.0 Fifth Edition and the pinned libxml2 dictionary, with literal tree and parent expectations. The corpus command writes exact well-formed XML bytes and a separate bounded raw-input profile. DTD resolution and XML1.1 remain outside this public parser profile.

XML lexical choices emit no DOM nodes but still need a finite expansion
budget. Reserve node and step costs together, and keep literal XML tree
expectations beside materialized corpus inputs.

Refs tox-dev#1018
@gaborbernat gaborbernat added the enhancement New feature or request label Oct 7, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review October 7, 2026 03:53
@gaborbernat gaborbernat changed the title ✨ feat(fuzz): bound XML grammar expansion feat(fuzz): bound XML grammar expansion Oct 7, 2026
@codspeed

codspeed Bot commented Oct 7, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 6.14%

⚠️ 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

❌ 4 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[prune-shared-single] 88.7 µs 96.5 µs -8.09%
❌ test_feature[serialize-inner] 5.1 ms 5.4 ms -5.63%
❌ test_feature[form-data-fieldsets] 31.1 µs 32.9 µs -5.52%
❌ test_feature[serialize-inner-indent] 5.5 ms 5.9 ms -5.32%

Tip

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


Comparing gaborbernat:feat/xml-grammar-1018 (d61ee7e) with main (59b515e)

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 63ce735 into tox-dev:main Oct 7, 2026
55 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant