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

terminal

sootsim assert <verb> <verb-args...> <assertion-flags...>

Options

flagdescription
--count <n>result array has exactly n items
--count-at-least <n>length >= n
--count-at-most <n>length <= n
--existsnon-null, non-empty (default when no flag given)
--emptynull 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-timeouttreat verb auto-wait timeout as fail, not skip
--negate, !flip pass/fail (does not flip skip)
--quietsuppress the one-line pass/fail summary

Examples

terminal

sootsim assert find --testid set-max-input --count 4
sootsim assert describe --contains swap-form-header
sootsim assert get errors --count 0
sootsim assert find --testid submit --exists --within 3000
sootsim assert describe --jq '.shell.state == "app"'
git bisect run sootsim assert find --testid set-max-input --count 4