sk. ENGINEERING LABSSource & tests ↗
02 / SYSTEM EVOLUTION

Change the engine.
Keep the contract.

Explore a safer path from legacy to modern: compare quietly, release gradually, and keep a way back.

01 / CONFIGURE

Choose your rollout.

Used in Canary mode. A stable key keeps a customer in the same bucket.

Sample request

FAILURE INJECTION

Candidate checks free shipping before discount instead of after it.

02 / OBSERVE

One request. Two paths.

SHADOW MODE
REQUESTcustomer-demo-42
↓
MIGRATION ROUTERLegacy serves · candidate compares
01Legacy adapterSERVES RESPONSE

$146.70

Discount $11.25 · Shipping $7.95
02Modern adapterSHADOW COMPARE

$146.70

Discount $11.25 · Shipping $7.95
✓

Contract preserved.

Both implementations agree. The legacy result remains authoritative.

Deterministic routing bucket

Calculating…
Legacy bucketCandidate bucketOutlined = current key

A rollback is a routing decision.

Return subsequent requests to legacy. Completed side effects are not reversed.

!

The subtle rule that a rewrite could break.

A $150 member basket gets an $11.25 discount. Its discounted subtotal is $138.75, below the $150 free-shipping threshold. The baseline charges $7.95 shipping. Turn on the pricing regression in Shadow mode to catch a candidate that silently changes this rule.

What this lab demonstrates

Compatibility before cleanup

Golden cases and a seeded 10,000-request Java comparison check business behavior before routing changes.

Evidence before promotion

Real promotion also needs representative traffic, error budgets, latency monitoring and an observation window.

An explicit rollback boundary

This read-only example has no database migration or external side effects. A flag cannot recover dropped data.