Background
For T435516: AbuseReview: Create Superset dashboard we want to chart:
percentage of mitigated edits that were seen on Special:AbuseReview for each tag type
We don't yet have enough information to calculate the following for PII:
- We only want to include PII suppressions. In English the chart query should be able to detect these by checking the reason starts with "Disclosure of...", and since we are only tracking 5 languages here, we could do the equivalent for the other languages.
- We preferably don't want to include subsequent suppressions (i.e. suppressions to subsequent good edits). Although there could be multiple PII-disclosing edits getting suppressed in one go, we can usually make the assumption that only the earliest edit disclosed PII.
Details
We could do this by adding a couple more things to RevisionVisibilityHandler:
foreach ( $newlySuppressedRevisionIds as $revisionId ) { $this->instrumentationClient->submitInteraction( RequestContext::getMain(), 'revision_content_suppressed', [ 'action_subtype' => in_array( $revisionId, $revisionsIdsTaggedWithPersonalInfoTag, true ) ? 'personal-info-tagged' : 'personal-info-not-tagged', 'identifier' => $revisionId, 'identifier_type' => 'revision', // Add the page ID, so that the query can calculate which revision is likely to be the earliest on a page in a batch of suppressions // Add the suppress reason, so that the query can filter to suppressions likely due to PII violations ] ); }
Note: In order to add the reason, we would need to pass the reason through "ArticleRevisionVisibilitySetHook".