peach assert
Thin wrapper that spawns a read verb (describe, find, get errors, …) with --json forced on, parses stdout, and evaluates assertion flags over the payload. Exit codes are bisect-friendly: 0 pass, 1 fail, 125 skip (app not loaded / verb crashed), 2 misuse. Flag-level composition (--count / --contains / --jq / --has-path / --within) means the same predicate surface works across every read verb.
peach assert <verb> <verb-args...> <assertion-flags...>Options
| Flag | Description |
|---|---|
--count <n> | result array has exactly n items |
--count-at-least <n> | length >= n |
--count-at-most <n> | length <= n |
--exists | non-null, non-empty (default when no flag given) |
--empty | null or zero length |
--contains <str> | stringified result contains str (repeatable) |
--not-contains <str> | stringified result does not contain str |
--matches <regex> | stringified result matches regex |
--not-matches <regex> | stringified result does not match regex |
--equals <literal> | scalar equality |
--has-path <dotted.path> | nested path exists |
--path-equals <path> <value> | nested path equals value |
--jq <expr> | jq expression is truthy (requires jq on PATH) |
--within <ms> | retry verb + predicates until pass or deadline |
--allow-timeout | treat verb auto-wait timeout as fail, not skip |
--negate, ! | flip pass/fail (does not flip skip) |
--quiet | suppress the one-line pass/fail summary |
Examples
peach assert find --testid set-max-input --count 4
peach assert describe --contains swap-form-header
peach assert get errors --count 0
peach assert find --testid submit --exists --within 3000
peach assert describe --jq '.shell.state == "app"'
git bisect run peach assert find --testid set-max-input --count 4