Files
jeremy 72bcfbca15 test(niri): differential-fuzz the insert point against real niri (refs #719)
Hand-written cases are how the block-comment bug survived the first fix: they
only cover constructs I had already thought of. This uses niri itself as the
oracle instead.

The generator emits random KDL built from constructs that stress a brace
scanner (block comments with unbalanced braces, nested and multiline block
comments, /- slashdash nodes, line comments ending in a brace, quoted and raw
strings, nested compositor binds), keeps only configs real niri accepts, and
the test asserts each still validates after jcode splices its block in.

550-case corpus committed for a hermetic ~3s test. Beyond it, ~2400 configs
across five independent seeds were run out-of-band with no failures.

Verified the corpus earns its keep: removing block-comment handling fails with
'niri rejected a spliced config that it accepted before'.
2026-08-02 09:05:03 -07:00
..