# Regression Format
A regression is a previously-failing input persisted so it can be replayed in every future run.
## File Layout
Regressions are stored under `regressions/` in a directory tree keyed by operation ID:
```text
regressions/
primitive.bitwise.xor/
2025-04-12T06-00-00Z.json
2025-04-12T06-05-00Z.json
engine.dfa/
2025-04-12T07-00-00Z.json
```
## JSON Schema
Each regression file contains:
```json
{
"op_id": "primitive.bitwise.xor",
"op_version": 1,
"generator": "edge_cases",
"input_label": "max_xor_max",
"input_bytes": [255, 255, 255, 255, 255, 255, 255, 255],
"gpu_output": [0, 0, 0, 0],
"cpu_output": [255, 255, 255, 255],
"message": "byte 0 differs: gpu=0x00, cpu=0xFF",
"workgroup_size": 64,
"timestamp": "2025-04-12T06:00:00Z"
}
```
## Replay Policy
Every regression is replayed before or alongside newly generated inputs. The regression suite only grows. A fixed bug that is not replayed could silently return.
## Coverage
Skipped regressions are coverage failures. The regression coverage metric is:
```text
regression_coverage = replayed_regressions / total_regressions
```
## Migration
When an operation version increments, old-version regressions may be:
- Re-checked under the new version (if behavior is compatible)
- Archived (if behavior intentionally changed)
- Re-tagged with the new version (if the fix resolved the issue)