Skip to content

feat(fuzz): add bounded CSS grammar - #1201

Open
gaborbernat wants to merge 4 commits into
tox-dev:mainfrom
gaborbernat:feat/css-grammar-1018
Open

gaborbernat wants to merge 4 commits into
tox-dev:mainfrom
gaborbernat:feat/css-grammar-1018

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

CSS fuzzing for #1018 needs complete property and at-rule inputs from the pinned Domato grammar and Blink dictionary. Generate each of the 4,861 Domato alternatives and 1,488 Blink tokens through a named emitting production, retaining source lines and original spellings.

Charge full css-tree 3.2.1 syntax trees against node and expansion budgets, reserving sibling costs across recursive sheets. Bind generated custom properties and keyframes to distinct in-input definitions. The 332 Raw recovery contexts and three leading-order at-rules use standalone roots; the general CSS lane retains mutation alongside generation. Markdown/encoding adapters and CI/corpus delivery remain requirements of the epic.

CSS fuzzing needs complete property and at-rule inputs from the pinned
Domato grammar and Blink dictionary. Preserve each source alternative and
its origin while charging complete syntax trees against node and expansion
budgets. Distinct in-input variable and keyframe bindings require a bounded
five-name identifier pool.

Keep Raw recovery contexts and leading-order at-rules as standalone roots.
Retain general CSS mutation alongside generation. References 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 05:45
@codspeed

codspeed Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 20.16%

⚠️ 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 regressed benchmark
✅ 580 untouched benchmarks
⏩ 32 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_feature[shadow-slot-comments] 110.3 µs 138.1 µs -20.16%

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/css-grammar-1018 (3aa2622) with main (9ff1626)

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. ↩

The portable CI matrix omits Node, so its coverage gate cannot execute
CSS AST reference checks. Keep those checks mandatory in the existing
conformance suite and measure them separately from portable tests.
Pin whitespace-only and comment-only preludes to their normalized
at-rule output. These absent cases cover the empty-prelude condition
without changing the parser or generator.

This branch has not been deployed

No deployments
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