Freeze historical datasets and qualify backtest instrument identities

This commit is contained in:
Boki 2026-10-20 23:59:15 -04:00
parent 63c3856797
commit d6b09eb635
43 changed files with 2249 additions and 1230 deletions

View file

@ -0,0 +1,7 @@
-- Content-addressed execution inputs. No provider history is rewritten or removed.
CREATE TABLE IF NOT EXISTS backtest_datasets (
hash TEXT PRIMARY KEY CHECK (hash ~ '^[a-f0-9]{64}$'),
payload JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
ALTER TABLE runs ADD COLUMN IF NOT EXISTS dataset_hash TEXT REFERENCES backtest_datasets(hash);