It looks like most of the PageTriage maintenance scripts in the maintenance folder are meant to fix SQL bugs that crop up over time.
- make sure they all have a --dry-run mode that doesn't change anything, just shows how many changes it would make in non dry run mode. If no --dry-run mode, change the code to add a --dry-run mode.
- add integration tests to make sure that --dry-run is actually dry run
- identify which maintenance scripts are meant for fixing bugs, then run them with --dry-run and note which ones identify issues
- make Phab tickets for those, to investigate and fix the root causes of the bugs
For example, running maintenance/cleanupPageTriage.php --dry-run will probably identify thousands of entries. See screenshot in T321982: Unexpected namespaces in pagetriage_page table