When performing api edits on testwiki changing a page from a redirect into text and back, the events produced to mediawiki.page_change.v1 have incorrect values for redirects.
Reproduction:
Monitor events from the public streams:
curl -s -N https://stream.wikimedia.org/v2/stream/mediawiki.page_change.v1 | grep "Cirrus_Updater"
edit to redirect:
curl -s -XPOST 'https://test.wikipedia.org/w/api.php' \ -d 'action=edit&format=json&title=Cirrus%20Updater&text=%23REDIRECT%20%5B%5BSandbox%5D%5D&token=%2B%5C&formatversion=2'`
edit to plaintext:
curl -s -XPOST 'https://test.wikipedia.org/w/api.php' \ -d 'action=edit&format=json&title=Cirrus%20Updater&text=plaintext&token=%2B%5C&formatversion=2'`
On the edit from a redirect into plaintext the page field of the event includes is_redirect: false, which is correct, but it also includes redirect_page_link which should not be populated because that is the old redirect.
"page":{"page_id":153275,"page_title":"Cirrus_Updater","namespace_id":0,"is_redirect":false,"redirect_page_link":{"page_title":"Sandbox","namespace_id":0,"page_id":68971,"is_redirect":false}}
on edit from plaintext into a redirect, the event incorrectly reports that there is no redirect:
"page":{"page_id":153275,"page_title":"Cirrus_Updater","namespace_id":0,"is_redirect":false}