# Requirements Archive: v3.0 Streaming Reliability + Pipeline Cleanup

**Archived:** 2026-03-24
**Status:** SHIPPED

For current requirements, see `.planning/REQUIREMENTS.md`.

---

# Requirements: opendeviationbar-py v3.0

**Defined:** 2026-03-24
**Core Value:** Zero-gap zero-overlap bar pipeline with maximum streaming reliability and minimal technical debt.

## v3.0 Requirements

### Mutation Safety (#296)

- [x] **MUT-01**: Kintsugi DELETE operations use `DELETE IN PARTITION` with partition-level granularity exclusively — no full-table `ALTER TABLE DELETE`
- [x] **MUT-02**: Concurrent kintsugi repairs (24+ workers) complete without mutation timeout (300s) under production workloads

### Streaming Pipeline (#292)

- [x] **STREAM-01**: `fill_from_rest` returns computed bars directly (not raw trades) for immediate `sync_flush` to ClickHouse
- [x] **STREAM-02**: Gap between REST fill completion and WS junction is zero trades (no dropped trades at junction point)

### Combined WebSocket (#279)

- [x] **WS-01**: Sidecar uses Binance combined streams (`/stream?streams=s1@aggTrade/...`) with 2x9 hybrid architecture instead of per-symbol connections
- [x] **WS-02**: Combined stream reconnection uses Antaeus exponential backoff with jitter
- [x] **WS-03**: All 26 symbols maintain Stathera continuity after migration to combined streams

### Sidecar Parquet-First Catchup (SEED-001)

- [x] **PQFIRST-01**: Sidecar startup reads `max(agg_trade_id)` from today's Parquet tick cache per symbol before hitting REST API
- [x] **PQFIRST-02**: REST API called only for gap between Parquet's last trade and WS buffer start (incremental)
- [x] **PQFIRST-03**: Falls back to current `fill_from_rest` if Parquet stale (>10 min) or missing (no regression)

### Dead Code Cleanup (#298)

- [x] **CLEAN-01**: Remove stale scripts from `scripts/` directory (79 removed, exceeding 37 target)
- [x] **CLEAN-02**: Remove 800+ LOC dead Python code across subsystems
- [x] **CLEAN-03**: All removed code verified unreachable before deletion

## Traceability

| REQ-ID     | Phase                               | Plan         | Status   |
| ---------- | ----------------------------------- | ------------ | -------- |
| MUT-01     | Phase 1: Mutation Safety            | 01-01, 01-02 | Complete |
| MUT-02     | Phase 1: Mutation Safety            | 01-01        | Complete |
| STREAM-01  | Phase 2: Sidecar Fill Pipeline      | 02-01        | Complete |
| STREAM-02  | Phase 2: Sidecar Fill Pipeline      | 02-01, 02-02 | Complete |
| WS-01      | Phase 4: Combined WebSocket Streams | 04-01        | Complete |
| WS-02      | Phase 4: Combined WebSocket Streams | 04-01        | Complete |
| WS-03      | Phase 4: Combined WebSocket Streams | 04-02        | Complete |
| PQFIRST-01 | Phase 3: Parquet-First Catchup      | 03-01        | Complete |
| PQFIRST-02 | Phase 3: Parquet-First Catchup      | 03-01        | Complete |
| PQFIRST-03 | Phase 3: Parquet-First Catchup      | 03-01        | Complete |
| CLEAN-01   | Phase 5: Dead Code Cleanup          | 05-01        | Complete |
| CLEAN-02   | Phase 5: Dead Code Cleanup          | 05-02        | Complete |
| CLEAN-03   | Phase 5: Dead Code Cleanup          | 05-01, 05-02 | Complete |
