The database column looks the same. Its unit does not.
quantity = cartonsquantity = partsA code rollback changes which application is running. It does not rewrite the records already stored by v2.
Live on Google Cloud Run
Switchback blocks a release when new code writes business data that the previous application version will misread after rollback.
01 · The problem
Health checks, schema checks and version-local tests may all pass. The failure appears later, when yesterday's code reads records written by today's code.
quantity = cartonsquantity = partsA code rollback changes which application is running. It does not rewrite the records already stored by v2.
Switchback tests the mixed-version sequence that matters: old writes, new writes, requests retry across versions, then traffic returns to old code.
The final answer is compared with an append-only ledger of accepted receipt facts.
02 · What Switchback does
The release gate runs both application versions against one disposable database and refuses the release when old code cannot recover the right business answer.
Create the first accepted receipt using the old application and its known data contract.
Let the candidate write to the same database, including an idempotent retry across versions.
Send the final read through old code, which recreates the result of a real code rollback.
Compare with accepted facts. A mismatch returns BLOCK and stops the release.
03 · Live compatibility lab
Each button creates a fresh disposable SQLite database and runs real FastAPI requests. The verdict comes from the source-controlled gate, not an LLM.
04 · How we solved it with GitLab
MR !1 changes one application setting on synthetic data. Ordinary checks pass, but the compatibility gate reports 20 expected and 110 after rollback.
GitLab CI records JSON, HTML and JUnit evidence and exits with a release-blocking status.
Session 10014531 reads the MR diff, the failed job and the reviewed business-data contract.
Repair MR !4 selects the compatible writer. It cannot approve or merge itself.
Pipeline 2986179598 passes all 11 jobs and reports 20 expected and 20 after rollback. A person still owns the merge decision.
05 · Public proof
The GitLab Duo session page is private, so the public merge requests, passing pipeline and video carry the judge-facing proof.
Scope
Prove one inventory contract across mixed-version writes, retries, reads and code rollback.
Claim that every database migration is safe or change any production data.
Every run uses fixed synthetic receipts and a disposable database.
CI verifies the repair. A person decides whether anything merges.