WorldBehavior class final

One executable behavior in the scenario program. Drivers:

  • retry-sync — the temporal retry-with-backoff driver (the shipped RetrySyncEngine semantics): attempts the touchpoint method with the declared retry policy; backoff waits advance VIRTUAL time.
  • invoke — a single contract invocation (failures surface honestly).

WorldBehavior.expect makes failure-storm scenarios first-class red→green behaviors: green (default) requires the behavior to succeed; red requires the honest failure surface (e.g. auth expiry mid-flow must surface red — a blindly-retrying engine would turn green there and the run goes red: the world refuses free greens in BOTH directions).

Constructors

WorldBehavior({required String id, required String driver, required String touchpoint, required String method, required Map<String, dynamic> args, required int maxAttempts, int backoffBaseMs = 50, double backoffFactor = 2.0, String expect = 'green'})
const
WorldBehavior.fromJson(Map<String, dynamic> json)
factory

Properties

args Map<String, dynamic>
final
backoffBaseMs int
First backoff wait (virtual ms) for the retry-sync driver.
final
backoffFactor double
Exponential factor: wait_n = base * factor^(n-1).
final
driver String
final
expect String
The expected verdict: green (default) or red (the honest failure surface — the failure-storm behaviors).
final
expectRed bool
Whether this behavior is expected to land RED (the honest failure surface class).
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
final
maxAttempts int
Retry budget for the retry-sync driver.
final
method String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
touchpoint String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited