When a run fails, unotest writes a failure bundle — everything needed to understand what happened, for you or the agent.
What’s captured
| Tier | Contents | Default |
|---|---|---|
| 1 | error + stack, console log, semantic DOM snapshot, DSL trace | always on |
| 2 | screenshot (viewport + element-focused) | on |
| 3 | HAR (network) + video | off — not wired yet |
Where it lives
Bundles are written under .unotest/failures/ (configurable), with retention
(default: keep 20 runs / 7 days). The viewer renders each
artifact per run; the agent reads them through the
failure-artifact MCP tools.
How the agent uses it
On failure the agent calls agent_fix, which bundles the trace, console,
semantic snapshot and scenario source plus a classification
(rewrite-selector / add-waitfor / change-assertion). It proposes a diff —
you approve it.