Mobile Schema Migration Fleet Simulator (2D)

A staged mobile schema-migration rollout ships a local-database schema bump to a small canary slice of the device fleet first, watches the real per-batch failure rate, and only widens to a gradual then full rollout once each stage clears a safety gate — otherwise it automatically rolls the batch back. This 2D canvas simulator renders every device in the fleet as a cell in a grid, colour-coded live by schema version and migration status, and runs the genuine staged-rollout algorithm underneath: a randomly-ordered rollout queue split into cumulative canary/gradual/full stages, fixed-size batches attempted at a set cadence, an independent per-device success probability drawn as a real Bernoulli trial, and an automatic rollback whenever a batch's observed failure rate — failures divided by batch size — crosses your rollback threshold. A live strip chart tracks every batch's failure rate against that threshold so you can see exactly which batch tripped the gate and watch the stage halt and retry.