Page MenuHomePhabricator

Add logging to detect pastes that would not cause Paste Check to activate as currently configured
Closed, ResolvedPublic

Description

T402460 added instrumentation that enables us to track pastes during edit sessions that would have caused Paste Check to activate were it available.

This task involves the work of introducing a new event that would enable us to track Pastes that would not have caused Paste Check to activate, given how it is currently configured.

Story

As a data scientist and member of the Editing Team, I want to be able to track pastes that would have caused Paste Check had the text not been copied from a known source so that we can, among other things, understand how many edits Paste Check is being suppressed from showing witin.

Requirements

Building on the current relevant-paste event, we can also instrument when a paste is detected and check whether it's a paste that's (a) long enough to be shown as a paste check, and (b) would not have been shown as a paste check because it has a known-source.

We can log it as ignored-paste-[source], where source is currently one of googleDocs, libreOffice, microsoftOffice, plainText, and visualEditor.

As with the relevant-paste event, this would happen for all users, not just those on an a/b test wiki. The practical difference would be that since it's logging when paste check doesn't show, it'll also be appearing for a/b test wiki users who're in the test group (who don't get relevant-paste because they emit the normal check-shown event instead).

Done

  • Requirements drafted
  • @MNeisler approves
  • Requirements implemented
  • Editing QA verifies event being emitted client-side
  • @MNeisler verifies event being logged in DB

Event Timeline

Change #1196744 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Edit check: instrument when pastes happen with known sources

https://gerrit.wikimedia.org/r/1196744

Change #1196744 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Edit check: instrument when pastes happen with known sources

https://gerrit.wikimedia.org/r/1196744

Change #1199027 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.24] Edit check: instrument when pastes happen with known sources

https://gerrit.wikimedia.org/r/1199027

Change #1199027 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.45.0-wmf.24] Edit check: instrument when pastes happen with known sources

https://gerrit.wikimedia.org/r/1199027

Mentioned in SAL (#wikimedia-operations) [2025-10-27T20:34:34Z] <kemayo@deploy2002> Started scap sync-world: Backport for [[gerrit:1199027|Edit check: instrument when pastes happen with known sources (T407302)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-27T20:36:55Z] <kemayo@deploy2002> kemayo: Backport for [[gerrit:1199027|Edit check: instrument when pastes happen with known sources (T407302)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-27T20:44:50Z] <kemayo@deploy2002> Finished scap sync-world: Backport for [[gerrit:1199027|Edit check: instrument when pastes happen with known sources (T407302)]] (duration: 10m 16s)

Ryasmeen subscribed.

Verified that the ignored-paste-[source] appears when paste-check is not activated in both a/b test and non a/b test wiki where the pasted content was long enough but source was one of googleDocs, libreOffice, microsoftOffice, plainText, and visualEditor.