Generated reference

fault, field by field

The exact wire format for run files, live progress, completed results, and journal records. This page is generated from the Rust model beside the JSON Schemas; do not edit it by hand.

The smallest useful run

A run declares one or more proxies and an ordered list of phases. A phase without duration remains active until stopped and must be last.

schema_version: 1
name: slow database
proxies:
  - name: database
    protocol: tcp
    listen: 127.0.0.1:15432
    upstream: database.internal:5432
phases:
  - name: degraded
    proxies:
      - proxy: database
        faults:
          - type: latency
            flow: both
            distribution: { type: normal, mean_ms: 200, stddev_ms: 20 }

Fault and transport compatibility

FaultTCPUDPMeaning
latencyyesyesDelay selected traffic using a sampled distribution.
jitteryesyesProbabilistically delay selected traffic.
bandwidthyesnoLimit bytes per second for each connection stream.
blackholeyesyesLeave TCP traffic pending or drop UDP datagrams.
connection-resetyesnoReset a TCP connection when selected traffic is first used.
dnsnoyesAlter DNS queries carried by a UDP proxy.

Run

Open the JSON Schema

FieldRequiredType and constraintsDescription
nameyesstring (min length 1)Human-readable name used in progress, results, and journals.
phasesyesarray of Phase (min items 1)Ordered phases. Each begins when the previous phase ends.
proxiesyesarray of Proxy (min items 1)Network entry points available throughout the run.
schema_versionyesconstant 1Version of the serialized run format. The current value is `1`.
DelayDistribution
VariantFieldsDescription
normalmean_ms: number (min 0.0), stddev_ms: number (> 0.0)
paretoscale_ms: number (> 0.0), shape: number (> 0.0)
pareto-normalnormal_mean_ms: number (min 0.0), normal_stddev_ms: number (> 0.0), pareto_scale_ms: number (> 0.0), pareto_shape: number (> 0.0)
uniformmax_ms: number (min 0.0), min_ms: number (min 0.0)
DnsCase

DnsCase: delay | timeout | truncated | refused | serv-fail | nx-domain | empty-answer | random-a

FaultSpec
VariantFieldsDescription
latencydistribution: DelayDistribution, flow: TrafficFlowAdds one sampled delay to the selected direction. TCP applies it to the first non-empty traffic after activation; UDP applies it once to each selected datagram in an exchange.
jitterflow: TrafficFlow, max_delay_ms: number (min 0.0), min_delay_ms: number (min 0.0), probability: number (min 0.0, max 1.0)Adds a probabilistic sampled delay. TCP evaluates it per data operation; UDP evaluates it once for each selected datagram in an exchange.
bandwidthbytes_per_second: integer (min 1), flow: TrafficFlowLimits transferred bytes per second independently for each connection stream in the selected flow.
blackholeflow: TrafficFlowLeaves TCP operations pending until cancellation, or drops UDP datagrams in the selected direction.
connection-resetflow: TrafficFlow, probability: number (min 0.0, max 1.0)Resets a selected connection when traffic first uses the chosen flow.
dnscase: DnsCase, delay_ms: integer or null (min 0)Alters DNS queries carried by a UDP proxy.
HumanDuration

HumanDuration: string (min length 1)

Phase
FieldRequiredType and constraintsDescription
durationnoHumanDuration or nullOmit to keep this phase active until explicitly stopped.
nameyesstring (min length 1)Human-readable phase name exposed in progress events.
proxiesyesarray of ProxyFaultsFault chains applied to named proxies during this phase.
Proxy
FieldRequiredType and constraintsDescription
listenyesstringLocal socket address clients connect or send datagrams to.
nameyesstring (min length 1)Stable name used by phases to select this proxy.
protocolyesTransportProtocolTransport accepted and forwarded by this proxy.
upstreamyesstringRemote socket address to which traffic is forwarded.
ProxyFaults
FieldRequiredType and constraintsDescription
faultsyesarray of FaultSpecOrdered chain of faults applied to traffic on this proxy.
proxyyesstring (min length 1)Name of a proxy declared by the containing run.
TrafficFlow
VariantFieldsDescription
to-upstreamTraffic sent by the client toward the upstream service.
to-clientTraffic returned by the upstream service toward the client.
bothTraffic in both directions.
TransportProtocol
VariantFieldsDescription
tcpA connection-oriented byte stream.
udpConnectionless datagrams, including DNS traffic.

RunProgress

A lightweight phase transition published while a run executes.

Open the JSON Schema

FieldRequiredType and constraintsDescription
phase_countyesinteger (min 1)
phase_duration_msnointeger or null (min 0)Planned duration, or absent for an indefinite final phase.
phase_indexyesinteger (min 1)One-based position of the active phase.
phase_nameyesstringName of the phase that has just started.
phase_started_atyesstringUTC instant at which the phase became active.
proxiesyesarray of ProxyFaultsFault chains active for this phase.
run_nameyesstringName of the executing run.

RunResult

Open the JSON Schema

FieldRequiredType and constraintsDescription
completed_atyesstringUTC instant at which execution ended.
outcomeyesRunOutcomeWhether the run completed successfully or failed.
run_nameyesstringName of the completed run.
schema_versionyesconstant 1Version of the serialized result format. The current value is `1`.
started_atyesstringUTC instant at which execution began.
transportyesTransportSummaryAggregate TCP and UDP observations collected during the run.
DelayRecord
FieldRequiredType and constraintsDescription
applicationsyesinteger (min 0)
total_delay_msyesnumber
FaultRecord
FieldRequiredType and constraintsDescription
bandwidth_bytes_limitedyesinteger (min 0)
blackhole_activationsyesinteger (min 0)
connection_resetsyesinteger (min 0)
dns_interventionsyesinteger (min 0)
jitteryesDelayRecord
latencyyesDelayRecord
FaultStatus
FieldRequiredType and constraintsDescription
average_jitter_msyesnumber
average_latency_msyesnumber
jitter_applicationsyesinteger (min 0)
latency_applicationsyesinteger (min 0)
RunOutcome
VariantFieldsDescription
success
failedmessage: string
TcpStreamOutcome

TcpStreamOutcome: active | completed | upstream-connect-failed | transfer-failed | cancelled | fault-reset

TcpStreamRecord
FieldRequiredType and constraintsDescription
bytes_to_clientyesinteger (min 0)
bytes_to_upstreamyesinteger (min 0)
closed_atnostring or null
failurenoTransportFailure or null
faultsyesFaultRecord
opened_atyesstring
outcomeyesTcpStreamOutcome
peeryesstring
proxyyesstring
stream_idyesstring
upstreamyesstring
TcpStreamStatus
FieldRequiredType and constraintsDescription
activeyesinteger (min 0)
active_impactedyesinteger (min 0)
average_bytes_to_clientyesinteger (min 0)
average_bytes_to_upstreamyesinteger (min 0)
completedyesinteger (min 0)
failedyesinteger (min 0)
impactedyesinteger (min 0)
openedyesinteger (min 0)
TransportFailure
FieldRequiredType and constraintsDescription
categoryyesTransportFailureCategory
messageyesstring
stageyesTransportFailureStage
TransportFailureCategory

TransportFailureCategory: dns-failed | connection-refused | timed-out | network-unreachable | connection-reset | broken-pipe | other

TransportFailureStage

TransportFailureStage: connect | transfer | exchange

TransportStatus
FieldRequiredType and constraintsDescription
dropped_recordsyesinteger (min 0)Completed records omitted from the best-effort event stream.
effectsyesFaultStatus
last_failurenoTransportFailure or null
tcpyesTcpStreamStatus
udpyesUdpExchangeStatus
TransportSummary
FieldRequiredType and constraintsDescription
statusyesTransportStatus
tcp_streamsyesarray of TcpStreamRecord
udp_exchangesyesarray of UdpExchangeRecord
UdpExchangeOutcome

UdpExchangeOutcome: active | completed | transfer-failed | cancelled | fault-dropped

UdpExchangeRecord
FieldRequiredType and constraintsDescription
completed_atnostring or null
exchange_idyesstring
failurenoTransportFailure or null
faultsyesFaultRecord
outcomeyesUdpExchangeOutcome
peeryesstring
proxyyesstring
request_bytesyesinteger (min 0)
response_bytesyesinteger (min 0)
started_atyesstring
upstreamyesstring
UdpExchangeStatus
FieldRequiredType and constraintsDescription
activeyesinteger (min 0)
active_impactedyesinteger (min 0)
average_request_bytesyesinteger (min 0)
average_response_bytesyesinteger (min 0)
completedyesinteger (min 0)
failedyesinteger (min 0)
impactedyesinteger (min 0)
startedyesinteger (min 0)

JournalEvent

Open the JSON Schema

VariantFieldsDescription
run-startedfaults: array of ProxyFaults, name: string or null, proxies: array of Proxy, schema_version: constant 1, started_at: string
tcp-stream-completedstream: TcpStreamRecord
udp-exchange-completedexchange: UdpExchangeRecord
run-completedcompleted_at: string, status: TransportStatus

Regenerate with cargo run -p fault-model --example generate_schemas.