fraudtwin.simulate_delivery#

fraudtwin.simulate_delivery(records, config=None)[source][source]#

Apply seeded logical-message faults at a producer or consumer boundary.

Parameters:
  • records (list[PublicationRecord | ChaosEnvelope] | tuple[PublicationRecord | ChaosEnvelope, ...]) – Encoded publication records, or envelopes from a prior boundary. Payload bytes and stable record IDs are never rewritten.

  • config (KafkaChaosConfig | None) – Chaos policy. Defaults to a clean producer-boundary pass.

Return type:

KafkaChaosResult

Returns:

Envelopes, counts, fingerprints, and an audit trail suitable for a reliability tutorial or test fixture.

Raises:

ValueError – If records contain naive timestamps or incompatible envelopes.