Skip to main content

FAILURE_MODES

@forge/monorepo


@forge/monorepo / backend/src / FAILURE_MODES

Variable: FAILURE_MODES

const FAILURE_MODES: readonly ["provider-timeout", "provider-rate-limit", "redis-unavailable", "database-unavailable", "database-failover", "worker-kill", "slow-consumer", "overload"]

Defined in: backend/src/loadtest/injection.ts:14

The failure-injection matrix — AC-3, AC-5.

Declared as data rather than as a list of test functions, for three reasons that all reduce to the same one: a failure mode that is not in a machine-readable list is a failure mode whose runbook can go missing without anything noticing.

  • A test asserts that every mode here has a runbook, so a new injector cannot ship undocumented (AC-5).
  • Each mode carries what recovery means for it, so "recovered" is not a judgement call made per run.
  • requiresInfrastructure marks the ones that need something this package cannot start, which is how the honest gap stays visible instead of becoming a quietly skipped case.