Files
coder/coderd
Stephen Kirby 03c5ae3f70 test(coderd/database): enhance FinalizeStaleChatDebugRows integration test (#24693)
Closes #24090

Enhances the existing `TestFinalizeStaleChatDebugRows` test with three
missing coverage areas:

1. **Error JSON preservation**: verifies pre-existing error payloads are
not overwritten by finalization
2. **Timestamp correctness**: verifies `updated_at` and `finished_at`
match the `@now` parameter across all finalized row paths
3. **Null error preservation**: verifies finalized steps that had no
error keep a null error column

No production code changed. Test passes against Postgres.

> 🤖 Generated by Coder Agents

<details><summary>Review notes</summary>

- Enhances existing test rather than adding a new one, the existing test
was the right place
- Covers stale, orphaned, and cascade finalization timestamp assertions
- Preserves both pre-existing error JSON and null error values during
finalization

</details>
2026-05-07 18:05:41 +02:00
..