Evolution and Compatibility Lab
Retrieval Prompts
- State from memory the eight-item breaking-change checklist.
- Give three examples of safe changes to a JSON response and three examples of breaking changes.
- Name three versioning strategies and one real API that uses each.
- State the two HTTP headers used to signal deprecation and sunset, and give an example value for each.
- Why is
410 Gonepreferred over404 Not Foundfor a removed endpoint?
Compare and Distinguish
Separate these pairs cleanly:
- backward compatibility vs forward compatibility - which does each protect?
- URL-path version bump vs adding a new endpoint - when is each appropriate?
- soft-deleting a field (marked deprecated, still present) vs removing it
- announcement via changelog vs announcement via
Deprecationheader - why you need both - "ignore unknown fields" tolerance vs "strict schema" parsing - how each reacts to additive changes
Common Mistake Check
Identify the error in each:
- "Adding a field is always safe." (What configuration of client parser makes this false?)
- "We're changing
amountfrom dollars to cents in v1.2 because it's just a unit change." - "The endpoint is now deprecated. We removed it from the docs. That should be enough."
- "Our sunset was last week; we kept it running anyway because a customer asked."
- "We're moving the currency inside a nested
moneyobject. Old clients will just ignore the extra nesting."
Spec-Diff Drill
Given v1 and proposed v2 of the Order response:
v1:
{
"id": "ord_1",
"customer_id": "c_9",
"total": 4599,
"currency": "USD",
"status": "paid",
"items": [
{ "sku": "s_1", "quantity": 2, "unit_price": 2299 }
],
"created_at": "2026-04-10T15:19:58Z"
}
Proposed v2:
{
"id": "ord_1",
"customer": { "id": "c_9", "email": "a@example.com" },
"total": { "amount_minor": 4599, "currency": "USD" },
"status": "PAID",
"state": "COMPLETED",
"items": [
{ "sku": "s_1", "quantity": 2,
"unit_price": { "amount_minor": 2299, "currency": "USD" } }
],
"created_at": "2026-04-10T15:19:58Z",
"paid_at": "2026-04-10T15:20:02Z"
}
For each change:
- Classify as safe / breaking.
- If breaking, propose how to deliver the value without breaking v1 (new parallel field, new endpoint, opt-in header, etc.).
- Write the deprecation plan for v1 after v2 is released: announce date, sunset date, headers, migration guide table of contents.
Expect 8-10 distinct changes.
Versioning Design
Pick a versioning strategy for the API in the diff above. Write:
- The choice (URL, header, both) and a three-sentence justification.
- The URL pattern and the header contract.
- The rule for what a version bump means in this API.
- The supported-versions paragraph for the docs.
- The behavior when a request omits the version (default to latest? reject? error?).
Deprecation Playbook
Write a reusable deprecation playbook (template, not example-specific):
- Runway lengths by audience.
- The four stages with dates relative to sunset.
- Headers emitted at each stage.
- The outreach channels and when each is used.
- The metrics that tell you the deprecation is ready to remove.
- The escalation path if a large consumer has not migrated.
- The acceptable reasons to slip the sunset date.
This is a reusable artifact - aim for one page.
Evidence Check
This page is complete only if, given any proposed API change, you can:
- classify it as safe, breaking, or both in under one minute
- if breaking, propose a compatible path that delivers the value
- write the deprecation plan with real dates, real headers, and real removal behavior
- defend the versioning strategy against at least one challenger