---
phase: 19-fleet-recompute-telemetry
verified: 2026-03-27T17:00:00Z
status: human_needed
score: 4/6 must-haves verified
re_verification: false
human_verification:
  - test: "Confirm all Day-mode crypto bar partitions are dropped from ClickHouse on bigblack"
    expected: "SELECT count() FROM opendeviationbar_cache.open_deviation_bars WHERE symbol IN (crypto list) AND ouroboros_mode = 'day' returns 0"
    why_human: "Requires SSH to bigblack and live ClickHouse query; cannot verify from local machine (RECOMP-01)"
  - test: "Confirm kintsugi has recomputed all 18 crypto symbols as Aion with zero Stathera gaps"
    expected: "uv run python scripts/fleet_recompute_aion.py --verify shows 0 gaps, 0 overlaps for all (symbol, threshold) pairs"
    why_human: "Requires fleet recompute execution on bigblack (~1-3h kintsugi run); script exists but has not been run (RECOMP-02)"
  - test: "Confirm stale Day-mode telemetry artifacts wiped for crypto symbols"
    expected: "kintsugi_log, population_checkpoints, backfill_requests have no Day-mode crypto entries; local stathera_counts.json and crypto checkpoint files deleted"
    why_human: "Requires live ClickHouse and filesystem inspection on bigblack after --execute run (RECOMP-03)"
  - test: "Confirm heartbeat Stathera audit shows 0-gap 0-overlap for all Aion crypto symbols"
    expected: "Next heartbeat cycle (5-min timer) reports green status for all 18 crypto symbols"
    why_human: "Requires post-recompute heartbeat cycle on bigblack; depends on RECOMP-02 completion (VAL-04)"
---

# Phase 19: Fleet Recompute + Telemetry Verification Report

**Phase Goal:** All crypto symbols are recomputed as Aion on bigblack with zero Stathera gaps, and all operational artifacts reflect the new mode
**Verified:** 2026-03-27T17:00:00Z
**Status:** human_needed — code artifacts fully verified; bigblack execution checkpoint pending
**Re-verification:** No — initial verification

---

## Goal Achievement

### Observable Truths

| #   | Truth                                                                                           | Status       | Evidence                                                                                                        |
| --- | ----------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------- |
| 1   | detect_gaps.py accepts --ouroboros aion and resolves mode per-symbol from registry              | VERIFIED     | `--ouroboros-mode {day,aion}` in CLI; `get_symbol_entries()` called at line 112                                 |
| 2   | populate_full_cache.py and populate_range.py accept --ouroboros aion, auto-detect from registry | VERIFIED     | `choices=["day","aion"]` at lines 240 and 227; registry resolution in both scripts                              |
| 3   | deploy/opendeviationbar.env documents OPENDEVIATIONBAR_OUROBOROS_MODE as forex-only fallback    | VERIFIED     | `forex-only` at line 11 of env file; `per-symbol registry (symbols.toml) takes precedence`                      |
| 4   | schema.sql comments reflect Aion as a supported mode alongside Day                              | VERIFIED     | Lines 258 and 443: "Day (UTC midnight reset) or Aion (continuous, crypto-only). Per-symbol SSoT: symbols.toml." |
| 5   | KNOWN_GAP_FINGERPRINTS dict is cleared                                                          | VERIFIED     | Line 120: empty dict `{}`; line 119: "# Cleared for v7.0 Aion recompute." comment                               |
| 6   | All Day-mode crypto bar partitions dropped, Aion bars recomputed, Stathera 0-gap 0-overlap      | HUMAN NEEDED | fleet_recompute_aion.py --execute not yet run on bigblack                                                       |

**Score:** 5/6 truths verified (RECOMP-01, RECOMP-02, RECOMP-03, VAL-04 require human execution on bigblack)

---

### Required Artifacts

| Artifact                                        | Expected                                    | Status   | Details                                                                                   |
| ----------------------------------------------- | ------------------------------------------- | -------- | ----------------------------------------------------------------------------------------- |
| `scripts/detect_gaps.py`                        | Per-symbol ouroboros mode from registry     | VERIFIED | `get_symbol_entries()` import at line 112; `_resolve_ouroboros_mode(symbol=)` at line 102 |
| `scripts/populate_full_cache.py`                | Aion choice in --ouroboros CLI              | VERIFIED | `choices=["day","aion"]` at line 240; registry resolution at lines 280-284                |
| `scripts/populate_range.py`                     | Aion choice in --ouroboros CLI              | VERIFIED | `choices=["day","aion"]` at line 227; registry resolution at lines 313-317                |
| `deploy/opendeviationbar.env`                   | Updated comment for OUROBOROS_MODE          | VERIFIED | "forex-only fallback" at line 11                                                          |
| `python/opendeviationbar/clickhouse/schema.sql` | Updated comment for ouroboros_mode column   | VERIFIED | Aion references at lines 258 and 443; stale "Day mode is the only supported mode" removed |
| `scripts/heartbeat/config.py`                   | KNOWN_GAP_FINGERPRINTS cleared              | VERIFIED | Empty `{}` at line 120; clearing comment at line 119                                      |
| `deploy/CLAUDE.md`                              | Updated OUROBOROS_MODE documentation        | VERIFIED | "forex-only fallback; per-symbol registry takes precedence for crypto=aion" at line 30    |
| `scripts/fleet_recompute_aion.py`               | Coordinated stop-drop-wipe-recompute script | VERIFIED | 24,419 bytes; all 9 required patterns confirmed; syntax-valid                             |

---

### Key Link Verification

| From                              | To                                           | Via                                            | Status | Details                                                                  |
| --------------------------------- | -------------------------------------------- | ---------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| `scripts/detect_gaps.py`          | `python/opendeviationbar/symbol_registry.py` | `get_symbol_entries()` per-symbol lookup       | WIRED  | Import at line 112; `entry.ouroboros_mode.value` returned at line 117    |
| `scripts/fleet_recompute_aion.py` | `python/opendeviationbar/symbol_registry.py` | `get_registered_symbols(asset_class="crypto")` | WIRED  | Import at line 227; called at line 229                                   |
| `scripts/fleet_recompute_aion.py` | `ClickHouse system.parts`                    | Query actual partitions before DROP            | WIRED  | `FROM system.parts WHERE table = 'open_deviation_bars'` at lines 236-244 |

---

### Data-Flow Trace (Level 4)

Not applicable — phase produces operational scripts and config updates, not components that render dynamic data.

---

### Behavioral Spot-Checks

| Behavior                                                | Command                                                                 | Result                                  | Status |
| ------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------- | ------ |
| detect_gaps.py shows `aion` in --ouroboros-mode choices | `python scripts/detect_gaps.py --help`                                  | `{day,aion}` with auto-detect help text | PASS   |
| populate_full_cache.py shows `aion` in --ouroboros      | `python scripts/populate_full_cache.py --help`                          | `{day,aion}` with auto-detect help text | PASS   |
| populate_range.py shows `aion` in --ouroboros           | `python scripts/populate_range.py --help`                               | `{day,aion}` with auto-detect help text | PASS   |
| fleet_recompute_aion.py parses without syntax errors    | `python -c "import ast; ast.parse(open(...).read())"`                   | Parses OK                               | PASS   |
| fleet recompute --execute on bigblack                   | `ssh bigblack; uv run python scripts/fleet_recompute_aion.py --execute` | NOT RUN — checkpoint pending            | SKIP   |
| fleet recompute --verify 0-gap 0-overlap                | `uv run python scripts/fleet_recompute_aion.py --verify`                | NOT RUN — depends on --execute          | SKIP   |

---

### Requirements Coverage

| Requirement | Source Plan | Description                                                                       | Status       | Evidence                                                                                  |
| ----------- | ----------- | --------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------- |
| RECOMP-01   | 19-02       | DELETE all Day-mode crypto bars via DROP PARTITION per (symbol, threshold)        | HUMAN NEEDED | Script code verified; execution on bigblack pending                                       |
| RECOMP-02   | 19-02       | Full fleet recompute on bigblack with Aion mode for all 18 crypto symbols         | HUMAN NEEDED | Script code verified; kintsugi catch-up run pending                                       |
| RECOMP-03   | 19-02       | Wipe Day-mode telemetry (kintsugi_log, population_checkpoints, backfill_requests) | HUMAN NEEDED | Script wipes these tables with `mutations_sync=1`; execution pending                      |
| RECOMP-04   | 19-01       | Update diagnostic scripts, deploy env, schema comments for Aion                   | SATISFIED    | All 7 artifacts updated; forex-only comment, Aion in schema, fingerprints cleared         |
| RECOMP-05   | 19-01       | All internal Day-mode references for crypto symbols removed/updated               | SATISFIED    | Per-symbol registry resolution in all 3 diagnostic scripts; stale choices=["day"] removed |
| VAL-04      | 19-02       | Heartbeat confirms Stathera 0-gap 0-overlap for all Aion crypto symbols           | HUMAN NEEDED | Verification query in --verify phase is correct; execution on bigblack pending            |

No orphaned requirements — all 6 IDs mapped to Phase 19 are covered by the two plans.

---

### Anti-Patterns Found

No blocker anti-patterns found.

| File                              | Pattern                                                                                  | Severity | Impact                                                                                                                                                                                       |
| --------------------------------- | ---------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `scripts/detect_gaps.py` line 582 | `_resolve_ouroboros_mode()` called without `symbol=` arg in `stathera_batch_audit_all()` | INFO     | The per-symbol resolve path is wired in `stathera_audit_single()` (line 477). The batch entry point uses the global env var, which is the correct fallback for fleet-wide calls. Not a stub. |

---

### Human Verification Required

#### 1. Drop Day-Mode Crypto Partitions (RECOMP-01)

**Test:** Deploy code to bigblack, then run:

```
ssh bigblack
cd ~/opendeviationbar-py
systemctl --user stop opendeviationbar-sidecar opendeviationbar-kintsugi opendeviationbar-kintsugi-catchup
uv run --python 3.13 python scripts/fleet_recompute_aion.py --preflight
uv run --python 3.13 python scripts/fleet_recompute_aion.py --execute
```

**Expected:** All (symbol, threshold) partitions for crypto symbols are dropped. kintsugi_log, population_checkpoints, backfill_requests have no remaining Day-mode crypto entries.
**Why human:** Requires remote SSH execution on bigblack; destructive mutation cannot be safely verified locally.

#### 2. Kintsugi Aion Recompute (RECOMP-02)

**Test:** After --execute, start kintsugi catch-up and wait for completion:

```
systemctl --user start opendeviationbar-kintsugi-catchup
# Monitor: journalctl --user -u opendeviationbar-kintsugi-catchup -f
# Wait ~1-3 hours
```

**Expected:** All 18 crypto symbols have complete Aion-mode bar history with no gaps.
**Why human:** Requires ~1-3h kintsugi run on remote bigblack; progress cannot be monitored locally.

#### 3. Stathera Audit Post-Recompute (VAL-04)

**Test:** After kintsugi completes, run the verify phase:

```
uv run --python 3.13 python scripts/fleet_recompute_aion.py --verify
```

**Expected:** 0 gaps, 0 overlaps for all (symbol, threshold) pairs in Aion mode. Script exits with code 0.
**Why human:** Requires live ClickHouse on bigblack with freshly recomputed Aion bars.

#### 4. Wipe Telemetry Artifacts (RECOMP-03)

**Test:** After --execute, verify telemetry is clean:

```
# On bigblack:
clickhouse-client --query "SELECT count() FROM opendeviationbar_cache.kintsugi_log WHERE symbol IN ('BTCUSDT', 'ETHUSDT', ...)"
# Also confirm: ~/.cache/opendeviationbar/heartbeat/stathera_counts.json deleted
# Also confirm: ~/.cache/opendeviationbar/checkpoints/ has no crypto checkpoint files
```

**Expected:** 0 rows in kintsugi_log/population_checkpoints/backfill_requests for crypto symbols; local state files deleted.
**Why human:** Requires filesystem and DB inspection on remote bigblack.

---

### Gaps Summary

No code gaps. All locally-verifiable artifacts pass all four levels (exists, substantive, wired, data-flow n/a). The four items flagged as `human_needed` are not code deficiencies — they are the expected execution checkpoint defined in Plan 02, Task 2 (`type="checkpoint:human-verify" gate="blocking"`). The script `fleet_recompute_aion.py` correctly implements the stop-drop-wipe-recompute sequence with all required safety guards, dynamic partition discovery, and a full Stathera audit query.

The phase is blocked only on human execution of `--execute` followed by kintsugi catch-up and `--verify` on bigblack.

---

_Verified: 2026-03-27T17:00:00Z_
_Verifier: Claude (gsd-verifier)_
