Skip to content

config

sqllocks_spindle.chaos.config

Chaos Engine configuration for Spindle.

Defines the knobs that control chaos injection: intensity presets, per-category weights, escalation curves, and warmup windows.

Classes

ChaosCategory

Bases: Enum

Categories of chaos that can be injected into generated data.

ChaosOverride dataclass

Per-issue override that forces a specific chaos event on a given day.

Attributes:

Name Type Description
day int

The simulation day on which to inject.

category str

Which :class:ChaosCategory to inject.

params dict[str, Any]

Extra parameters forwarded to the mutator.

ChaosConfig dataclass

Top-level configuration for the Chaos Engine.

Attributes:

Name Type Description
enabled bool

Master switch. When False the engine is a no-op.

intensity str

One of calm, moderate, stormy, hurricane.

seed int

Seed for the chaos RNG (independent of the main generation seed).

warmup_days int

Number of days at the start with no chaos.

chaos_start_day int

First day chaos may fire (must be > warmup_days).

escalation str

How injection probability grows over time. gradual — linear ramp from 0 to full over the first 30 chaos days. random — uniform random draw each day. front-loaded — full probability from day 1, decaying over time.

categories dict[str, dict[str, Any]]

Per-category configuration. Keys are :class:ChaosCategory value strings; values are dicts with enabled (bool) and weight (float 0-1).

overrides list[ChaosOverride]

Explicit per-day overrides that bypass probability checks.

breaking_change_day int

Day on which schema-breaking mutations are allowed (column drops / renames). Before this day only additive schema changes are injected.

Attributes
intensity_multiplier property

Return the numeric multiplier for the current intensity preset.

Methods:
is_category_enabled(category)

Return True if the given category string is enabled.

category_weight(category)

Return the base weight for a category (0.0 if missing/disabled).

overrides_for_day(day)

Return any explicit overrides scheduled for day.

validate()

Return a list of validation error messages (empty = valid).