-- 051 — probability contract SHADOW column. -- -- ADDITIVE AND NULLABLE. Records what the certified serving contract WOULD -- serve, beside what was actually served. Nothing reads it for serving. -- -- ORDERING IS LOAD-BEARING: this is applied BEFORE `retentionService` names the -- column. PostgREST builds a bulk insert from the FIRST row's shape, so a key -- present on a row whose column does not exist 400s the WHOLE batch — and -- retention is best-effort, so it fails silently. That is exactly how migration -- 038 took retention down for three days. alter table if exists public.model_snapshots add column if not exists probability_contract jsonb; comment on column public.model_snapshots.probability_contract is 'SHADOW ONLY. {raw_model_probability, served_probability, probability_state, estimator_type, estimator_version, certification_version, model_version, derived:{ev_pct,kelly_pct,value,available}}. Never served; records what the certified contract would have produced.';