# Requirements Archive: v7.3 Exchange Gap Classification -- Permanent Stathera Resolution

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

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

---

# Requirements: v7.3 Exchange Gap Classification -- Permanent Stathera Resolution

**Defined:** 2026-03-27
**Source:** Production observation -- 96K Stathera gaps on bigblack are exchange-level TID gaps that kintsugi cannot heal
**Core Value:** Kintsugi distinguishes exchange-level gaps (permanent, unhealable) from pipeline gaps (actionable), eliminating 146h of wasted repair cycles.

## Milestone Requirements

### Exchange Gap Detection

- [ ] **EXGAP-01**: Kintsugi `_repair_aion()` marks the inter-bar gap as `is_exchange_gap` when checksum-validated Parquet repair produces 0 bars for a TID range
- [ ] **EXGAP-02**: Exchange gap classification requires both: (a) Parquet source is checksum-verified in `ChecksumRegistry`, (b) TID range filter returns 0 trades from the Parquet file

### Kintsugi Dismiss

- [ ] **DISMISS-01**: Kintsugi's shard dismiss filter permanently skips shards classified as exchange gaps (no 30-day expiry)
- [ ] **DISMISS-02**: `kintsugi_log` records exchange gap classifications with `result='exchange_gap'` for auditability

### Stathera Reporting

- [ ] **STATHERA-01**: Heartbeat Stathera check separates exchange gaps from pipeline gaps in the count and report
- [ ] **STATHERA-02**: Heartbeat shows `pipeline_gaps=N, exchange_gaps=M` instead of a single gap count; only pipeline_gaps triggers LOUD alerts

### Retroactive Classification

- [ ] **RETRO-01**: One-time sweep script classifies existing Stathera gaps as exchange-level when checksum-validated Parquet contains the bounding trades but not the gap trades
- [ ] **RETRO-02**: Sweep marks classified gaps in `kintsugi_log` with `result='exchange_gap'` for permanent dismiss

## Future Requirements

None -- milestone is tightly scoped.

## Out of Scope

- Intra-bar `is_exchange_gap` on bars produced by Rust processor -- Python-side classification is sufficient
- Exchange gap detection for Day-mode (forex) symbols -- all observed gaps are on Aion crypto
- Automatic threshold adjustment based on exchange gap density -- separate research milestone

## Traceability

| REQ-ID      | Phase | Plan | Status  |
| ----------- | ----- | ---- | ------- |
| EXGAP-01    | 26    | TBD  | Pending |
| EXGAP-02    | 26    | TBD  | Pending |
| DISMISS-01  | 26    | TBD  | Pending |
| DISMISS-02  | 26    | TBD  | Pending |
| STATHERA-01 | 27    | TBD  | Pending |
| STATHERA-02 | 27    | TBD  | Pending |
| RETRO-01    | 28    | TBD  | Pending |
| RETRO-02    | 28    | TBD  | Pending |
