mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
80b4769230
* 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
22 lines
676 B
TypeScript
22 lines
676 B
TypeScript
// Payload value vocabulary shared by the validation generators (#1781 B2).
|
|
//
|
|
// Benign, occasionally hostile values used for CLI positionals/flag values and Maestro scalars.
|
|
// No leading '-': a dash token would be read as a flag and the case would die in the token scan,
|
|
// which is the classic targets' job — these generators exist to reach past it.
|
|
|
|
export const SAFE_VALUES = [
|
|
'com.example.app',
|
|
'text=Login',
|
|
'@e1',
|
|
'hello world',
|
|
'123',
|
|
'Ünïcøde',
|
|
'😀 emoji',
|
|
'say "hi"',
|
|
'a\\b',
|
|
'',
|
|
] as const;
|
|
|
|
/** The accept expectation, shared so a valid case reads the same in both generators. */
|
|
export const ACCEPT = { outcome: 'accept' } as const;
|