Simulation Mode
Simulation Mode lets you test rules in production conditions without executing their actions. By running rules in shadow mode, you can verify they trigger correctly, review what actions would have been taken, and build confidence before going live. This eliminates the risk of a misconfigured rule sending unintended notifications or blocking merges.
How It Works
Every rule in TinyOps has a mode setting with three possible values:
| Mode | Behavior |
|---|---|
disabled | Rule does not evaluate |
shadow | Rule evaluates but actions are not executed |
live | Rule evaluates and actions execute normally |
When a rule is in shadow mode, TinyOps runs the full evaluation pipeline (trigger matching, condition checking, data fetching) but stops before executing the action. Instead, it logs what would have happened with wouldExecute metadata in the execution history.
Shadow Mode Tracking
TinyOps tracks two counters for rules in shadow mode:
| Counter | Description |
|---|---|
shadowSuccessCount | Number of shadow runs where the rule triggered successfully |
shadowEvaluationCount | Total number of shadow evaluations (triggered or not) |
When a rule enters shadow mode, both counters reset to 0. This ensures promotion thresholds are measured from the start of the current shadow period.
Promotion Thresholds
Before a rule can be promoted from shadow to live, it must complete a minimum number of successful shadow runs. The threshold varies by plan:
| Plan | Required Runs |
|---|---|
| Free | 10 |
| Pro | 5 |
| Team | 3 |
| Business | 3 |
Once the shadowSuccessCount meets your plan’s threshold, the “Promote to Live” button becomes available on the rule detail page.
Configuration
name: friday-deploy-warning
mode: shadow
trigger:
type: webhook
event: push
branch: main
condition:
field: event.day_of_week
operator: eq
value: 5
action:
type: notify
channel: slack
message: "Deploy on Friday detected. Proceed with caution."Dashboard View
The rule detail page shows shadow mode statistics:
- Current mode badge (disabled / shadow / live)
- Shadow success count vs. required threshold (e.g., “3 / 5 runs”)
- Progress indicator showing how close the rule is to promotion eligibility
- Full execution history with
wouldExecutemetadata for each shadow run
Execution History
Shadow runs appear in the execution history alongside live runs but are clearly marked. Each shadow execution record includes:
| Field | Description |
|---|---|
status | Always shadow |
wouldExecute | Boolean indicating the action would have fired |
action_details | The action payload that would have been sent |
triggered_at | Timestamp of the shadow evaluation |
Related
- Policies - test policies in advisory mode before enforcing
- PR Health Pack - shadow-test health rules before sending alerts
- Approvals - promote rules to live mode through the approval workflow
- Dashboard & Analytics - view shadow execution trends