Let the API compatibility gate pass additions to `CAPABILITY_TYPES` without a waiver

Merged
DO
1mo ago
+30-8

The API compatibility gate lets a constant listed under growing_collections gain entries without a waiver, but it only understood dict and set literals. CAPABILITY_TYPES is a comprehension over a tuple of capability classes, so each new capability shows up as a changed value and needs a waiver. A waiver now also needs the compatibility impact label, which would put a false entry in the release notes; #11781 (OutputModeFallback) hit this.

A comprehension over one tuple or list literal now counts as a growing collection too. Its entries are the sequence's items, and everything else in the comprehension has to stay the same: a changed key, value, or filter is still a change that needs a waiver. CAPABILITY_TYPES is added to the list.

Checked against #11781's code without its waiver: the gate reports CAPABILITY_TYPES: entries added: ['OutputModeFallback'] as a notice and passes.

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.

šŸ¤– Generated with Claude Code