On Thu, Sep 29, 2011 at 1:08 PM, Merlijn van Deen <valhallasw(a)arctus.nl>wrote;wrote:
2. Why does this happen?
This is unclear. On the one hand, interwiki.py is somewhat black
magic: none of the current developers intimately knows its workings.
On the other hand, the bug is not reproducible: running it on the
exact same page with the exact same page text does not result in a
cleared page. It could very well be something like broken network
error handling - but mainly, we have no idea. Did anything change in
Special:Export (which is still used in interwiki.py) or the API which
might cause something like this? I couldn't find anything in the
release notes.
The thing I'd recommend is enabling some debug instrumentation in the bots,
so that next time one makes a bad edit y'all can review those logs and see
what it was doing.
I don't know what logging is already available, but you basically want to
see every HTTP request it makes (URL and POST data if any), and the response
received.
This should help narrow it down significantly to one of:
* something in MW is outputting wrong data (visibly wrong output from
api/export)
* something in pywikipediabot is processing data wrong (all right output
from api/export, but input data being sent on edit is already wrong)
* something in MW is processing input data wrong (all right output from
api/export, all input being sent looks correct)
Note that there may be legitimate differences in api or export data that the
bot is processing incorrectly, so look close. :)
-- brion