That script checks for inconsistencies between the TeamParticipation and TeamMembership tables but currently we only run it as part of the staging_restore.sh cronjob. We should run it on production and make its output more visible by sending it as a separate email to launchpad-error-reports (or something like that).
If we don't do that, one has to dig through the (huge) email report from staging_restore.sh to find the teamparticipation checks, which look like this:
Tue Jun 22 04:32:03 BST 2010 Check team participation
2010-06-22 03:32:30 WARNING Some people/teams are not members of themselves: [(1043028, u'removed1043028')]
BTW, before we set it up on production, it's probably a good idea to delete the Person entry with ID 1043028.
A recent run of the script is showing a bunch of spurious team participation records: https:/ /pastebin. canonical. com/37715/
They might have been caused by recent changes to the code which maintains TeamParticipation as this is something we haven't seen in the past.