---
phase: 35-dead-letter-resilience
plan: "01"
status: complete
started: "2026-03-29"
completed: "2026-03-29"
---

# Plan 35-01 Summary

## What Shipped

Parquet dead-letter writer module (`dead_letter.rs`) with Charon-compatible schema, wired into both flush failure and backpressure paths.

## Tasks Completed

| #   | Task                                                                                       | Status   |
| --- | ------------------------------------------------------------------------------------------ | -------- |
| 1   | Create dead_letter.rs with write_dead_letter, write_dead_letter_single, dead_letter_schema | Complete |
| 2   | Wire dead-letter into flush failure and backpressure paths                                 | Complete |

## Key Files

### Created

- `crates/opendeviationbar-streaming/src/clickhouse_writer/dead_letter.rs` — Parquet dead-letter writer with 77-column Arrow schema matching CORE_COLUMNS

### Modified

- `crates/opendeviationbar-streaming/src/clickhouse_writer/flush_thread.rs` — Buffer ownership fix + dead-letter on flush failure
- `crates/opendeviationbar-streaming/src/clickhouse_writer/sink.rs` — Dead-letter on backpressure (TrySendError::Full)
- `crates/opendeviationbar-streaming/src/clickhouse_writer/mod.rs` — Added dead_letter module
- `crates/opendeviationbar-streaming/Cargo.toml` — Added parquet dep behind clickhouse-sink feature

## Deviations

None.
