AIN-303 · routing_outcomes.source (0036)#99
Conversation
…l (0036) Adds a `source` discriminator (prod|synthetic|shadow, NOT NULL default 'prod', CHECK + index) so the synthetic cold-start loop's rows can never feed a prod routing-policy promotion — prod refits filter source='prod'. Existing 147 real rows backfill to 'prod'. Additive; Disc #12 intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AIN-303 [Labs] Synthetic cold-start — bootstrap methodology on Spark Day 0 (planted-solution validation)
Bootstrap the L14.2 methodology on synthetic data the day Spark lands (2026-05-29)Lets the cadence (judge → LinUCB refit → replay → promote) start running Day 0, BEFORE real agent traffic, and run daily through the SG-incorp/payments wait window until real volume arrives post-launch. Resolves the cold-start chicken-and-egg (no volume → no moat) for the waiting period. Design (canonical): ainfera-ai vault What it is / is NOT (Disc #12 + research integrity)
Planted-solution design (why it's rigorous)Synthetic world has a KNOWN ground-truth optimal routing (planted_optimum.json answer key). Logging policy is deliberately suboptimal so the bandit has room to learn. SANITY GATE: learned policy must converge toward the planted optimum. Pipeline bug → caught Day 0 on Spark, not after weeks of real traffic. Provenance separation (protects the clean corpus we just purged)
Waves (Aulë, from Spark Day 0)
Acceptance
Depends on: AIN-301 (Labs DB), AIN-294 (Spark provisioning). Blocks: meaningful AIN-288 delta on real (synthetic is not the delta). |
source discriminator (prod|synthetic|shadow) enforcing INVARIANT 1's synthetic wall in SQL. Additive, reversible.
Note
Low Risk
Schema-only additive migration with safe backfill default; no application or routing logic changes in this diff.
Overview
Adds a
sourcecolumn onrouting_outcomesso prod routing-policy refits can exclude synthetic and shadow rows in SQL (INVARIANT 1).The migration is additive:
NOT NULLwithserver_default='prod'(existing rows treated as prod traffic), aCHECKonprod/synthetic/shadow, andix_routing_outcomes_sourcefor filtered corpus reads. Downgrade drops the index, constraint, and column.Reviewed by Cursor Bugbot for commit 0e9ceb1. Bugbot is set up for automated code reviews on this repo. Configure here.