RUN SCHEMA v1
IDLE ↻ 60s 🧪 LAB ▶ FRONT ROOM 🎓 GUIDA
Sistema
DB
DuckDB
Migration
0001 ✓
Run
Pipeline
P1 IngestIMPL
P2 NormalizIMPL
P3 ModelIMPL
P4 SignalIMPL
P5 DecideIMPL
P6 ExecuteIMPL
P7 CLV MarkIMPL
Work Items
WI-0001 Bootstrap
WI-0002 P1 Ingest
WI-0003 DuckDB
WI-0004 Normalizer
WI-0005 P3 Model
WI-0006 P4 Signal
WI-0007 P5 Decide
WI-0008 P6 Execute
WI-0009 Pipeline E2E
WI-0010 P7 CLV Marks
CI / Quality
pytest
195/195
GUARDIAN
PASS
ruff
CLEAN
Palinsesto refresh
minuti
prossimo refresh: -- (--)
P1 Ingest
Schema / DB
Ledger
Replay
Dev
Frames Ingested
0
raw_stream_frames
Sources
0
DISTINCT source
Last Event
MAX(event_ts)
Replay Hash
sha256[:8]
Row Counts per Tabella SELECT COUNT(*)
TablePhaseRowsStato
Ingest Log
nessun frame — avvia un run per popolare
Schema Info
schema_versionv1
DB prod targetPostgreSQL 16.x
DB dev/localDuckDB 1.x  ADR-0003
DDL sorgente.doc/20_canonici/05_SCHEMA/*.sql
Traduzioni DuckDBJSONB→JSON · BIGSERIAL→sequence
Invarianti recordschema_version · source · ingest_ts · event_ts · run_id
Migrations Applied
FilenameDialectSHA256Stato
Tabelle (schema v1)
TablePrimary KeyPhase
raw_stream_frames (run_id, source, seq) P1
canonical_orderbook(run_id, market_id, selection_id, side, level, asof_ts) P2
canonical_events (event_id) P2
model_outputs (run_id, market_id, selection_id, model_name, asof_ts) P3
value_signals (run_id, market_id, selection_id, side, asof_ts) P4
decisions (decision_id) P5
orders (client_order_id) P6
ledger_events (ledger_seq) — append-only P6
clv_marks (run_id, client_order_id, mark_ts) P6
Ledger Events
0
append-only
Orders
0
client_order_id
Decisions
0
P5 output
ledger_events — ultimi record append-only · mai UPDATE/DELETE
ledger_seqevent_idevent_type client_order_idamountevent_ts
P6 Execute non implementato — tabella vuota
RawStreamStore.replay()
replay(run_id, source=None) → frames in ordine deterministico ORDER BY source, seq.
replay_hash(run_id) → sha256 del dataset per verifica integrità.
Frames caricati da GET /api/ingest/frames — filtro per run_id non ancora implementato.
Run ID
Source (opt.)
Frames — run corrente
seqsourcestream_typeevent_tsschema_ver
pytest
168/168
0 failed
GUARDIAN lint
PASS
critical profile
docs-check
PASS
hard mode
ruff
CLEAN
E F I · len 100
Test Files
FileTestsEsito
CI Pipeline
1. guardian lint --profile criticalPASS
2. guardian docs-check --mode hardPASS
3. pytest168 passed
Commit Recenti
Run Corrente
run_id
source
schema_versionv1
ingest_ts
frames 0
P2 orderbook0
P3 model 0
P4 segnali 0
P5 decisioni0
P6 ordini 0
P7 CLV 0
Database
tipo DuckDB 1.x
migration 0001_init ✓
prod targetPostgreSQL 16
ref ADR-0003
integrity
WI Corrente
WI-0011
P8 Settlement / Betfair Live
F11-T1: settlement price feed
F11-T2: real Betfair stream adapter
F11-T3: ops dashboard live data
Completati: WI-0001..WI-0010 ✓
EnvelopeMeta (invarianti)
Ogni record persistito deve includere:
schema_version source
ingest_ts event_ts run_id
⚡ EDGE Guide & AI
1/7 Guida al Back Room
Verifico Ollama…

⚠ KILL SWITCH

Termina il run corrente e blocca nuovi ordini.
Irreversibile per il run attivo.