Store each API compatibility waiver in its own file under `.github/api-compatibility-waivers/`
Merged
DO
1mo ago+664+664+012345678901234567890123456789-688-688-012345678901234567890123456789
Every PR that needs an API-compatibility waiver appended to the end of allowed_breakages in .github/api-compatibility-allowlist.json, so any two such PRs conflicted (three times for #11388 alone). Each waiver is now its own file, .github/api-compatibility-waivers/<fingerprint>.json, so two PRs touch the same file only when they waive the same finding.
New public surface: none (repository CI tooling only).
Change
check_api_compatibility.pyloads the waiver directory (--waivers, default.github/api-compatibility-waivers). Each file holdsagainst,reasonandpull_request; the fingerprint is the filename, so it can't drift from the content. Validation is unchanged: the schema, the unused-waiver check for the current baseline, and a waiver against an older release not covering a current finding. A misnamed file (not<lowercase 64-hex>.json) is an error. A missing directory (git drops it once every waiver is pruned) means no waivers. Duplicates can no longer exist, because the filesystem enforces them. The finding error now names the file to add.allowed_breakagesis removed from the allowlist JSON, which keepsmodel_name_literalsandgrowing_collections. A stale PR that still appends there fails withextra_forbidden.pr_gates.py(Gate: compatibility waiver labeled) compares the changed waiver files at head and at the merge base, so a new file, or a changedagainst, still needscompatibility impact. Waivers still listed in the merge base'sallowed_breakagescount as existing. So moving them, as this PR does, adds none, while moving one with a differentagainststill counts as added. That read is transitional, only for this PR's own gate run, and can go in a follow-up.- All 73 waivers on
mainwere migrated mechanically.agent_docs/api-design.mdnow says how to add one;.github/workflows/AGENTS.md's description of the gate names no path and needs no change.
Verification
test_check_api_compatibility.pyandtest_pr_gates.py: 151 passed locally. Pyright on the touched scripts: 0 errors.- Ran the real
check_api_compatibility.py --against v2.63.0on this branch: exit 0, all 10 current waivers matched, none unused.
What changes for existing users: nothing.
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.
Posted by CLAI on Douwe's behalf.