Steps to replicate the issue
Create an abuse filter that uses the new_wikitext parameter and then test these filter with edits and uploads on a file page.
For testing I used the following simple filter
(new_wikitext contains "Information")
on the page https://commons.wikimedia.org/wiki/File:Noten_Ybbstaler_Alpen_2022-08-07_08.jpg.
What happens?:
All edits (action=edit) are marked as filter hits. But all uploads on the page (action=upload) are not marked as hits despite the Wikitext contains the string.
What should have happened instead?:
As per the documentation new_wikitext should also be available for upload actions.
"Variables related to the page edit, including summary, new_wikitext and several others, are now available for action='upload'."
Other information
If this is a mistake in the documentation the software should be changed to match the behavior described in the documentation as we need this feature on Commons to create template based exceptions for upload blocks.
The filter we want to get working is the following:
!("autopatrol" in user_rights) & (action="upload") & (page_first_contributor != user_name) & (page_first_contributor != "") & !(new_wikitext contains "{{Allow Overwriting}}")