Page MenuHomePhabricator

WikiLambda: Provide documentation re: implementation ordering
Closed, ResolvedPublic

Description

A few users have expressed confusion or concern about our implementation ordering strategy, as expressed in T363908. The ordering is based primarily on number of failing tests and speed of execution of the implementations, and the first -ranked implementation generally gets chosen when a function is called. It would be helpful to provide documentation and make it readily available.

  • Provide a new documentation page (on mediawiki.org) explaining when and how reordering happens: Implementation_ordering_and_choosing
  • In the metadata dialog, where we show the selected implementation, add a link to the doc page, with text perhaps something like "How chosen?"
  • If feasible, consider also adding a link to the doc page in the edit-message that we generate, in a function's page history, when that function's implementations get reordered

Event Timeline

Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

Proposal:

Screenshot 2025-11-26 at 18.00.51.png (1×2 px, 249 KB)

The link icon links to the docs.

@Gregoryangelom @gengh

Change #1211738 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] FunctionMetadataDialog: Provide documentation about implementation ordering

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

DSmit-WMF changed the task status from Open to In Progress.Nov 26 2025, 6:00 PM
DSmit-WMF updated Other Assignee, added: DSmit-WMF.

@DSmit-WMF Not sure about the "external link" icon used here, it doesn't give any information about where exactly is this link taking you to.

I think we need to go for a more explicit option here to communicate that the link responds to the question "Why was this implementation chosen".

Also, note that often the Function Metadata dialog is also shown when running a function call with a concrete implementation (e.g. from the implementation page, or from the test details in the Tester table in the Function), so in those cases this link would not be applicable.

I'd go for a simple text link below or beside the implementation label, with an explicit copy that indicates the page purpose, and only in cases where automatic implementation selection is applicable.

Im running all my possible suggestions through @JSengupta-WMF . Including copy.

Screenshot 2025-12-02 at 11.44.35.png (1×1 px, 135 KB)
Screenshot 2025-12-02 at 11.44.01.png (1×1 px, 122 KB)
Screenshot 2025-12-02 at 11.32.50.png (1×1 px, 103 KB)
Screenshot 2025-12-02 at 11.30.52.png (1×2 px, 245 KB)
Screenshot 2025-12-02 at 11.33.41.png (1×1 px, 141 KB)

(Just flagging that “Type:” should not be showing as “Z14K2” etc. Please see T358571#9603107. I think it would be preferable to show the programming language in place of “Z14K2”. Just saying….)

"Why was this implementation chosen?" sounds more natural. Alternately "Why did we chose this implementation?" could work too. If it's an external link, please use the Codex icon LinkExternal next to the link.

Change #1211738 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] FunctionMetadataDialog: Provide documentation about implementation ordering

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