Page MenuHomePhabricator

Use postprocessing cache for Discussion Tools
Closed, ResolvedPublic

Description

There are a number of DT issues like T371125 that are caused by the ParserAfterTidy hook being run too often and in too many contexts: it is run for sub-parses, for interface messages, for random text on special pages, etc.

Eventually we might solve this by moving processing into OutputTransform, but keeping it pre-cache.

But in the near term, the issue is mostly that core doesn't have an unambiguous "at top level" indicator to flag when the ParserOutput has the complete top level contents of an article page, ie not a sub-parse or interface text, etc. This could be addressed by adding an ArticleAfterParse hook (bikeshed bikeshed) like we added ArticleParserOptions to allow DiscussionTools to post process *only complete pages* not partial parses.

Related Objects

StatusSubtypeAssignedTask
OpenNone
Openihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
OpenNone
Resolvedcscott
ResolvedBUG REPORTcscott
Resolvedcscott
Resolvedcscott
OpenNone
ResolvedKrinkle
ResolvedKrinkle
Resolved DAlangi_WMF
Opencscott
Openihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedihurbain
Resolvedcscott
Resolvedihurbain
OpenNone
ResolvedPRODUCTION ERRORcscott
Openihurbain

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
MSantos edited projects, added MW-1.43-release, Content-Transform-Team-WIP; removed Parsoid.
ihurbain subscribed.

This is the path we currently see to be able to have legacy DT in the post-processing cache, AND to be able to move away from modifying cache-varying options during the post-processing, so I'm moving this back to "current work" and doing that now.

cscott renamed this task from Create new AfterArticleParse hook for Discussion Tools to Use postprocessing cache for Discussion Tools.Jan 26 2026, 4:14 PM

Change #1233222 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@master] Clarify the post-processing cache status of Article

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

Change #1233222 merged by jenkins-bot:

[mediawiki/core@master] Clarify the post-processing cache status of Article

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

Change #1235841 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@master] Sets title in Parser-generated ParserOutput

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

Change #1235841 merged by jenkins-bot:

[mediawiki/core@master] Sets title in Parser-generated ParserOutput

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

Change #1254885 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/extensions/DiscussionTools@master] Limit legacy postprocessing cache to pages where DT does apply

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

Change #1254956 had a related patch set uploaded (by C. Scott Ananian; author: Isabelle Hurbain-Palatin):

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.20] Limit legacy postprocessing cache to pages where DT does apply

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

Change #1254885 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Limit legacy postprocessing cache to pages where DT does apply

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

Change #1254956 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.46.0-wmf.20] Limit legacy postprocessing cache to pages where DT does apply

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

Mentioned in SAL (#wikimedia-operations) [2026-03-18T20:24:20Z] <cscott@deploy2002> Started scap sync-world: Backport for [[gerrit:1254956|Limit legacy postprocessing cache to pages where DT does apply (T376183)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-18T20:26:20Z] <cscott@deploy2002> cscott: Backport for [[gerrit:1254956|Limit legacy postprocessing cache to pages where DT does apply (T376183)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-03-18T20:38:13Z] <cscott@deploy2002> Finished scap sync-world: Backport for [[gerrit:1254956|Limit legacy postprocessing cache to pages where DT does apply (T376183)]] (duration: 13m 54s)

Change #1265467 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[operations/mediawiki-config@master] Enable legacy post-processing cache for DiscussionTools

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

Change #1265467 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable legacy post-processing cache for DiscussionTools

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

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:43:13Z] <cscott@deploy1003> Started scap sync-world: Backport for [[gerrit:1267439|ParserMigration: transition to new configuration variables (T422543)]], [[gerrit:1265467|Enable legacy post-processing cache for DiscussionTools (T376183)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:45:03Z] <cscott@deploy1003> ihurbain, cscott: Backport for [[gerrit:1267439|ParserMigration: transition to new configuration variables (T422543)]], [[gerrit:1265467|Enable legacy post-processing cache for DiscussionTools (T376183)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-04-07T21:50:53Z] <cscott@deploy1003> Finished scap sync-world: Backport for [[gerrit:1267439|ParserMigration: transition to new configuration variables (T422543)]], [[gerrit:1265467|Enable legacy post-processing cache for DiscussionTools (T376183)]] (duration: 07m 40s)