Tier 2 Declarative Builder for configuring and running a Crowbar.corpus_gate
inside crystal spec under a 60-second watchdog budget.
Instance methods
assert(name :
String = "assertion_#{@runner.assertions.size + 1}", &block :
Buffer ->
Nil)
Registers an assertion block (e.g. containing Crystal spec .should expectations)
Sourceassert_each(name :
String = "assertion_#{@runner.assertions.size + 1}", &block :
Buffer ->
Nil)
Sourceassert_invariant(name :
String = "invariant_#{@runner.invariants.size + 1}", &block :
Buffer ->
Bool)
Registers a boolean regression invariant that must hold for every seed/mutant
Sourcecorpus(payload :
Buffer |
Bytes |
String, id :
String |
Nil = nil, seed :
UInt64 |
Nil = nil, mutations :
Int32 = 0, replay_verbatim :
Bool = true) :
Core::CorpusSeed Adds a deterministic seed / crash reproducer payload to the corpus
SourceLoads all matching seed files from a corpus directory (sorted deterministically)
Sourceexecute
Registers the primary target execution block under test
SourceDeclares expected non-fatal exception classes
Sourcefixup
Registers a post-mutation fixup callback
Sourcefrom_report(report :
Campaign::CampaignReport) :
Int32 Imports crash records from a CampaignReport
Sourcefrom_session(session :
Session) :
Int32 Imports corpus candidates and recorded items from a Crowbar::Session
Sourceinvariant(name :
String = "invariant_#{@runner.invariants.size + 1}", &block :
Buffer ->
Bool)
Sourceiterations(count :
Int32)
Number of deterministic mutation iterations across the corpus
Sourcemutations_per_seed(count :
Int32)
Number of deterministic mutations executed per corpus seed entry
SourceConfigures mutation pattern (:once, :many, :burst)
SourceDeclares explicitly forbidden exception classes that always trigger a regression failure
SourceRegisters a deterministic (seed, input) mutation replay pair
Sourcereproducer(payload :
Buffer |
Bytes |
String, id :
String |
Nil = nil, seed :
UInt64 |
Nil = nil) :
Core::CorpusSeed Registers a crash reproducer payload for verbatim regression replay
Sourcereproducer_base64(b64 :
String, id :
String |
Nil = nil, seed :
UInt64 |
Nil = nil) :
Core::CorpusSeed Registers a Base64-encoded crash reproducer for verbatim regression replay
Sourcereproducer_hex(hex :
String, id :
String |
Nil = nil, seed :
UInt64 |
Nil = nil) :
Core::CorpusSeed Registers a hex-encoded crash reproducer for verbatim regression replay
Sourcerule(instance : Rule) : Rule
SourceDefines a scoped mutation region
SourceSets the base deterministic PRNG seed
SourceRegisters explicit PRNG seeds for deterministic mutation replay
SourceSets the per-seed execution timeout
SourceSets the overall watchdog budget (strictly <= 60 seconds)
SourceSets the periodic watchdog heartbeat emission interval
Source