# Requirements Archive: v7.1 Aion Hardening -- Footgun Elimination + Startup Fix

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

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

---

# Requirements: v7.1 Aion Hardening

**Defined:** 2026-03-27
**Source:** 9-agent integrity audit (#309), sub-issues #310, #311, #312
**Core Value:** Every write path, startup path, and monitoring check correctly handles per-symbol Aion mode without silent Day-mode fallbacks.

## Requirements

### Startup — Aion-Aware Sidecar (#310)

- [x] **START-01**: For Aion symbols, `fill_from_rest` seeds at `max(last_committed_bar_tid, crossover_tid - 1)` instead of always `crossover_tid - 1`
- [x] **START-02**: Clean-slate DELETE preserves pre-midnight Aion bars (only deletes today's bars after midnight, not pre-midnight bars)
- [x] **START-03**: Sidecar startup for Aion symbols produces zero midnight-boundary Stathera gaps on restart

### Write Paths — Universal ouroboros_mode (#311)

- [x] **WRITE-01**: `backfill.py` `backfill_gap()` accepts and passes `ouroboros_mode` parameter (3 call sites)
- [x] **WRITE-02**: `kintsugi/dead_letter.py` `replay_dead_letters()` resolves per-symbol mode from registry
- [x] **WRITE-03**: `orchestration/count_bounded.py` passes `ouroboros_mode` to both `store_bars_batch` calls
- [x] **WRITE-04**: Zero `store_bars_batch`/`store_bars_bulk` call sites rely on global `get_operational_ouroboros_mode()` fallback for crypto

### Monitoring + Schema (#312)

- [x] **MON-04**: `_check_aion_freshness()` query includes `AND ouroboros_mode = 'aion'` filter
- [x] **MON-05**: Sidecar restart frequency root cause identified and addressed (5 PIDs/hour observed)
- [x] **SCHEMA-01**: CH `ouroboros_mode` column behavior reviewed — either make required or add INSERT-time validation

### Out of Scope

| Feature                                                  | Reason                                    |
| -------------------------------------------------------- | ----------------------------------------- |
| Cross-day processor continuity for repair_direct_parquet | Architectural change — separate milestone |
| Week-mode (forex)                                        | Exness data sources not production-ready  |

## Traceability

| Requirement | Phase    | Status  |
| ----------- | -------- | ------- |
| START-01    | Phase 20 | Complete |
| START-02    | Phase 20 | Complete |
| START-03    | Phase 20 | Complete |
| WRITE-01    | Phase 21 | Complete |
| WRITE-02    | Phase 21 | Complete |
| WRITE-03    | Phase 21 | Complete |
| WRITE-04    | Phase 21 | Complete |
| MON-04      | Phase 22 | Complete |
| MON-05      | Phase 22 | Complete |
| SCHEMA-01   | Phase 22 | Complete |

**Coverage:** 10 requirements, 10 mapped, 0 unmapped
