Files
Michał Pierzchała 80b4769230 test(fuzz): structured CLI/Maestro generators that reach command validation and assert error codes (#1781 B2) (#1866)
* test(fuzz): structured CLI/Maestro generators that reach command validation and assert error codes (#1781 B2)

* test(fuzz): pin the rediscovered #1433 excess-positional case and keep numeric flag samples inside their range

* style: apply oxfmt to the new fuzz modules

* perf(fuzz): derive the CLI validation surface lazily so unrelated harness paths keep their startup

* test(fuzz): resolve validation generators in the run path so corpus replay keeps its small module graph

* test(fuzz): weight the CLI budget toward command validation, pin the finite classes as seeds, guard lazy surface derivation

* docs(testing): describe the validation lane's layer split, seed-pinned classes, and PR-time gates

* refactor(fuzz): split the validation generator into CLI and Maestro modules, mirrored in tests

* refactor(fuzz): collapse the flag-shaped mutation classes and seed literals, derive class coverage from declarations

* fix(fuzz): hash every case-generation module in configHash, guarded by an import-closure test

* test(fuzz): assert CLI command and flag-key coverage against the registry, and close the six gaps it found
2026-08-20 08:00:08 +02:00

48 lines
1.9 KiB
JSON

[
{
"target": "batch-steps",
"input": "[{\"command\":\"snapshot\",\"input\":{\"__proto__\":{\"polluted\":true}}}]",
"note": "seed: prototype-pollution shaped batch step must reject or ignore, never throw untyped"
},
{
"target": "cli-args",
"input": "click --selector",
"note": "seed: flag with a missing value must reject as INVALID_ARGS with a hint"
},
{
"target": "cli-validation",
"input": "{\"payload\":[\"alert\",\"p\",\"p\",\"com.example.app\"],\"mutation\":\"excess-positional\",\"expect\":{\"outcome\":\"reject\",\"code\":\"INVALID_ARGS\"}}",
"note": "silent-accept: #1433 excess positionals — rediscovered against the pre-fix behaviour of assertCommandPositionalArity (fix 4c02b6ad2), 11 cases in"
},
{
"target": "maestro",
"input": "appId: com.example.app\n---\n- tapOn: \"unterminated\n",
"note": "seed: unterminated YAML scalar must surface as a typed parse error"
},
{
"target": "replay-script",
"input": "# target-v1 role=button\n\nclick @e1\n",
"note": "seed: unbound target-v1 annotation must reject with a typed error"
},
{
"target": "replay-script",
"input": "fill @e1 --text \"hello\tworld\"\na",
"note": "untyped-throw: raw tab inside a quoted value leaked a SyntaxError (fixed in readQuotedReplayToken)"
},
{
"target": "replay-script",
"input": "fill @e1 --text \"hello wor\\ld\"\nassert text=Welcome\n",
"note": "untyped-throw: quoted value with an invalid JSON escape leaked a SyntaxError (fixed in readQuotedReplayToken)"
},
{
"target": "replay-script",
"input": "fill @e1 --text \"hel\u0000lo world\"\n",
"note": "untyped-throw: raw control character inside a quoted value leaked a SyntaxError (fixed in readQuotedReplayToken)"
},
{
"target": "selector",
"input": "label=\"unterminated",
"note": "seed: unterminated quoted selector value must reject with a typed error"
}
]