The policy states:
Code MUST emit hard deprecation notices for at least one major MediaWiki version before being removed. It is RECOMMENDED to emit hard deprecation notices for at least two major MediaWiki versions. EXCEPTIONS to this are listed in the section "Removal without deprecation" below.
So this seems to imply that code that starts to emit a deprecation warning in version X can only be removed in version Y. In terms of master development, this means that code can only be removed if it has started to emit deprecation warnings before the last release branch was cut (and waiting for two such cuts is recommended). This effectively recommends that code be kept in the hard deprecated state for at least half a year, with a preference for a full year. However, we now have this exception in place:
The deprecation process may be bypassed for code that is unused within the MediaWiki ecosystem. The ecosystem is defined to consist of all actively maintained code residing in repositories owned by the Wikimedia foundation, and can be searched using the code search tool.
It is unclear whether this only applies to code that had already been unused before becoming obsolete, making deprecation unnecessary. Or if it also means that after deprecation, obsolete code can be deleted as soon as all known usages have been removed. This would allow for a much tighter timeline for the removal of deprecated code: unwanted code can be removed from one release to another without any deprecation (in a release), if all usages have been removed.
I see no harm in the latter interpretation, if we are careful to actually catch and remove all usages. I believe this interpretation is desirable, since it allows for a much faster pace of change. However, it may come as a surprise to some, so we should clarify the wording.
Perhaps something like this:
Obsolete code MAY be removed without deprecation if it is unused (or appropriately gated) within the MediaWiki ecosystem, which is defined as all actively maintained code covered by the code search tool. Obsolete code that is still used within the ecosystem MAY be removed if it has been emitting deprecation warnings in at least one major version release, but removing usages of obsolete code SHOULD always be preferred. Code that has been emitting deprecation warnings SHOULD be removed as soon as possible, and MUST be removed if it has been emitting deprecation warnings for more than one major version release.
I believe this would be more clear. Thoughts?