Mpaa added a comment.
The problem here is that we should timestamp (using touched timestamp when retrieving it) the text that we are going to modify and use that timestamp as basestamp in editpage. The tricky part to me is to understand when the text that is going to be modified is loaded. First access? When page._text is first created? Updating timestamp every time page._text is updated is not reliable, as a call to page.latest_revision updates page._text as well, and this might happen also after the bot has modified the intended text.
TASK DETAIL https://phabricator.wikimedia.org/T93364
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa Cc: Mpaa, jayvdb, Xqt, Aklapper, pywikipedia-bugs