Block Breaking API Changes in CI
Added 2026-10
Block Breaking API Changes in CI — Chinese original prompt
希望在流水线里自动发现破坏性的接口变更。请基于 [接口描述文件],设计一次对比检查:哪些变化算破坏性(删字段、改类型、加必填、改枚举取值)、哪些算兼容、发现破坏性变更时如何提示替代做法。输出:判定规则表、检查在流水线中的位置、误报的处理方式、以及例外情况的审批流程。
Site original
Chinese original
Example
Sample input
想在流水线里自动拦破坏性接口变更,基于现有接口描述文件设计一次对比检查。
The output should include
- 判定规则表分清破坏与兼容
- 指明检查插在流水线哪一步
- 给出误报处理和例外审批流程
Replace these placeholders 1
Swap the bracketed parts for your own details before sending.
[接口描述文件]
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.