List of steps to reproduce (step by step, including full links if applicable):
- Have a page with content
- Add some crap to said page
- Log in as a different user, take the previous page version, edit it in a different conflicting way, make API call with a timestamp that predates the timestamp for the previous edit.
var api = new mw.Api(); api.postWithEditToken( { format: 'json', title: 'User_talk:AJ-test', action: 'edit', summary: 'test', text: '==section test 1==\ntest barfoo4 this edit has a starttimestamp of 2022-01-20T22:36:00Z', starttimestamp: '2022-01-20T22:36:00Z' } ).done( function ( data ) { } );
What happens?:
https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=User_talk:AJ-test&diff=258465&oldid=258464 the text "This addition should not be removed" which was added at 22:37 was removed by an edit with a starttimestamp of 2022-01-20T22:36:00Z. (see code)
What should have happened instead?:
The edit should have been rejected as there was an edit conflict.
Noting that I also just tried to break https://commons.wikimedia.beta.wmflabs.org/w/index.php?title=User_talk:AJ-test&diff=258466&oldid=258465 with an edit with baserevid 258465, but that did result in an edit conflict. So adding baserevid prevents edit conflicts but starttimestamp doesn't.