Page MenuHomePhabricator

Evaluate vote detection heuristic
Closed, ResolvedPublic


This task is about creating a way for members of the Editing Team and volunteers to evaluate the reliability of the vote detection heuristic originally shared in T259865#6655698.

Detection heuristic

This section can be completed once the ===Approaches section of the T259865 is completed.


1. Extend the existing comment parser

  • This approach would extend the existing comment parser such that when you add ?dtdebug=1 to a talk page URL, you would be able to see where [ Add comment] affordances would appear on the page.


  1. Navigate to any page, on any wiki, where the Reply Tool is, and theoretically would be, available (e.g. pages in the talk namespace, pages in $wgExtraSignatureNamespaces, pages where __NEWSECTIONLINK__ syntax is present)
  2. Add ?dtdebug=1 to the page's URL
  3. Observe the following:
    • Lines are present to show the relationship/hierarchy of comments
    • [Add comment] affordances appear in sections where the "Detection heuristic" is met
    • [Add comment] affordances do not appear in sections where the "Detection heuristic" is not met

Event Timeline

Change 648560 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Debug: Introduce "vote" debug mode

This comment was removed by Esanders.

On inspecting a few AfD pages across various wikis, there appears to be quite a lot that have leading signed comments at 0 indentation.

My proposed heuristic was these two rules:

  1. First comment after heading has indentation > 0
  2. First comment at indentation > 0 is a bullet/numbered list item

I think condition (1) would exclude quite a lot of existing vote pages, and wouldn't require those wikis to change their conventions (I mentioned this is my previous comment).

I'm now thinking we should drop (1) and just go with (2). This would obviously result in more false positives, although I suspect not that many except for wikis that commonly indent with bullets (, but as I stated before, I don't think false positives are particularly problematic.

I've made dtdebug a bit mask, so we can enable various pieces of the debugger separately:

  • dtdebug = 1: Show comment/signature highlighting
  • dtdebug = 2: Show [ add comment ] (vote) buttons when section starts in a bullet/numbered (original heurstic)
  • dtdebug = 3: Show 1+2
  • dtdebug = 4: Show [ add comment ] (vote) buttons when first comment or reply is a bullet/numbered list (revised permissive heurstic)
  • dtdebug = 5: Show 1+4

Change 648560 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Debug: Introduce "vote" debug mode