# Regression snapshots

One snapshot per flow in `regression_flows` (see `flow_regression_test.go`).
Each snapshot is the stable JSON fingerprint of a deterministic replay over
the flow's pure-logic elements — trace, final context data, assertions,
and the termination reason.

## Regenerate

Run on the baseline (main) branch **only**. The whole point of these
snapshots is that the merged (post-Phase-2) branch must produce identical
output; regenerating on the merged branch would hide the very regressions
this test exists to catch.

```bash
# baseline branch
REGRESSION_UPDATE=1 go test -tags=regression \
  -run TestFlowRegression ./internal/features/automation/...
```

## overrides.json

Optional. Maps `flowName → "reason"` for flows that legitimately diverge
after the Phase-2 engine changes (e.g. a condition that previously
resolved to nil against an empty `__r` field now resolves to a real value
because the merged branch lazy-loads the relationship). A flow listed in
`overrides.json` still runs and its trace is captured; divergence emits a
`t.Log` warning and the subtest PASSES. Flows that diverge without an
override FAIL.

Example:
```json
{
  "Collection_Set_PLG_BD_Pool": "__r lazy-load resolves Account__r.PLG_BD_Pool__c pre-decision (was nil on main)"
}
```
