Page MenuHomePhabricator

Provide a reactive, per-entry regeneration path distinct from the scheduled run
Closed, DeclinedPublic

Description

The weekly/monthly cadence is appropriate for bulk freshness but is too coarse for two real user needs:

  • (a) readers hitting an entry that is known-stale or errored, where the cost of a synchronous regeneration may be acceptable if it yields correct content, and
  • (b) senior editors who have just fixed a fragment-generating function or a Wikidata label and want their fix reflected immediately rather than waiting up to a week.

The second is the abstract-content analogue of action=purge on a normal article.

This task captures the decision to provide such a path; open questions it leaves for implementation are:

  • the triggering surface (a "Purge now" UI control on the rendered article? an API call? both?),
  • the rate limit (PoolCounter pool, per-user quota) so that a malicious or careless actor cannot drive sustained load, and
  • whether the regeneration runs synchronously (reader waits) or asynchronously (reader sees the old value, the refresh lands on the next read).

The gating user right will be a new wikilambda-abstract-purge, registered in the extension and therefore available on every wiki that loads WikiLambda.

Crucially, the purge action needs to be triggerable both on abstract.wikipedia.org itself (where editors know first-hand that a fragment function has been fixed) and on client wikis (where a Test Wikipedia sysop may be the first person to see a broken rendering in context, before anyone on abstract.wikipedia.org notices). That dual-locus requirement makes this control cross-wiki in a way that action=purge is not: a purge on a client wiki has to reach back and regenerate an entry in the durable storage tier shared across all consuming wikis, almost certainly reusing the same fan-out plumbing flagged in the purge/invalidation task from M0 (T422619). Event-driven fan-out from abstract.wikipedia.org edits is related but explicitly a separate concern: that path is triggered by upstream edits, while this one is triggered by downstream signals.

Event Timeline

Could you say why this was declined? It's still needed.

In the current MainStash store, a fragment that failed because of its content (e.g. Z525) is kept for a month and only goes stale 24–30 h after rendering. abstractwiki_run_fragment cannot force a re-render. So after a broken function is fixed, the articles that rendered it keep the error for about a day (see also T439331: Z504 "ZID not found" returned for an existing ZID (Z19201) during orchestration, and the failure is then cached). The only workaround is to edit the fragment just to change its key.

An editor-only, rate-limited re-render of one fragment or one article would be enough.

Could you say why this was declined? It's still needed.

From what you say, you're probably wanting T440369: DE2.5.4: Cache busting for abstract articles (which is rather more work than this task was going to be, hence it was declined).