# Requirements Archive: v4.0 Microsecond Column Rename + Deploy Gap Repair

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

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

---

# Requirements: opendeviationbar-py v4.0

**Defined:** 2026-03-25
**Core Value:** Column names must match their actual units -- no naming lies that cause silent bugs.

## v4.0 Requirements

### Schema Rename (close_time_ms -> close_time_us, open_time_ms -> open_time_us)

- [x] **RENAME-01**: ClickHouse columns `close_time_ms` and `open_time_ms` renamed to `close_time_us` and `open_time_us` with zero data loss
- [x] **RENAME-02**: All Python references (~232) updated from `_ms` to `_us` naming
- [x] **RENAME-03**: All Rust dict export references (helpers.rs) updated from `_ms` to `_us`
- [x] **RENAME-04**: All SQL queries (~60) updated from `_ms` to `_us` naming
- [x] **RENAME-05**: `mise run check-full` passes after all renames (zero regressions)

### Backfill Fix

- [x] **BFILL-01**: `backfill_gap()` trailing edge calculation uses correct microsecond values
- [x] **BFILL-02**: Cross-midnight gap repair via `backfill_gap(force=True)` completes successfully for all streaming pairs

### Test Hygiene

- [x] **TEST-01**: `test_data_contracts.py` schema validation passes (currently failing)
- [x] **TEST-02**: `test_heal_scoping.py` removed (tests deleted `_check_and_heal_overlaps`)

## Traceability

| REQ-ID    | Phase   | Plan | Status  |
| --------- | ------- | ---- | ------- |
| RENAME-01 | Phase 3 | TBD  | Pending |
| RENAME-02 | Phase 4 | TBD  | Pending |
| RENAME-03 | Phase 2 | TBD  | Pending |
| RENAME-04 | Phase 4 | TBD  | Pending |
| RENAME-05 | Phase 4 | TBD  | Pending |
| BFILL-01  | Phase 5 | TBD  | Pending |
| BFILL-02  | Phase 5 | TBD  | Pending |
| TEST-01   | Phase 1 | TBD  | Pending |
| TEST-02   | Phase 1 | TBD  | Pending |
