Review an API for Versioning Risk
Added 2026-11-03
Mark which changes would break callers before they ship.
Here is an API definition and its consumers (below). Review versioning risk: 1) list three likely future changes and judge which break callers — field removal, type change, semantic change; 2) point out the most fragile part of the current design, such as overloading status codes with meaning; 3) give a compatibility checklist; 4) say which changes require a new version and which can ship compatibly; 5) warn me about the breaking change most easily missed.
Site original
Chinese original
How to use
接口的破坏性改动,通常出在「语义悄悄变了」。
Try tweaking it
- Have it restate requirements and constraints before writing code.
- Ask for the smallest change plus a rollback path, not a full-file rewrite.
What you should get
- A minimal, runnable change with copy-ready code
- Impact list: which files and call sites must follow
Common mistakes
- Asking it to touch ten files at once, then losing track of what broke what.
- Pasting only the error, with no code or version, and getting an unfixable answer.
How to check the output
- The change runs, can be rolled back, and touches nothing unrelated.
- Edge cases (empty, oversized, concurrent) are covered or explained.
Where it works
- Good for: having it restate requirements and constraints, then propose the smallest runnable change.
- Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.