Examples Search docs

Bridge modes

Boundary modes are not only a test helper. They are the same routing model used by the Bridge for local/remote development.

Mode table

ModeBehavior
liveCall the real implementation / deployed boundary
mockServe contract-conformant fakes (examples / effect mocks)
bridgeFork only the tagged session’s traffic to a local implementation; must pass contract check before activation
replayServe recorded outputs; no original dependency required
shadowCandidate receives traffic; output compared and never returned to callers
faultInject failures for a session only

Session scoping

Fault and bridge modes are session-tagged. Break a dependency for tyler/chaos without taking down production traffic for everyone else.

payments.fault({ message: "simulated outage", session: "tyler/chaos" });

await payments.call(charge, { session: "tyler/chaos" }); // fails for you
await payments.call(charge); // fine for others

Contract gate on bridge activation

A bridge that would carry traffic must satisfy the BoundaryContract first. Failures surface as typed contract errors — not silent skew.

Recording

Recording stays on: interactions become specification-by-example traces and training material (with lane-origin events excluded from baseline promotion by default).

Next