Page MenuHomePhabricator

Update definition of references, related tests & any related code
Closed, ResolvedPublic

Description

Description

Heretofore, references have been defined to allow not only ZIDs, but also external entities, such as QIDs and Lexeme IDs (LIDs) in Wikidata. In particular, isReference currently allows for any strings matching the following regex:

/^[A-JL-Z][1-9]\d*$/

Recently, we decided that references should not include external entities, so isReference should be redefined using:

/^Z[1-9]\d*$/

Update: we will leave isReference as is, but replace its uses with uses of a new function called isZObjectReference.

We might revisit this, fairly soon, if we choose to rework references, but we are starting to use Wikidata identifiers, and isReference needs to be updated for now to avoid errors, such as errors in canonicalization and normalization.

Tests that involve calls to isReference should be updated as needed.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • This should be done carefully so as not to change the system behavior, or introduce any new errors.

Remove all the non-applicable tags from the "Tags" field, leave only the tags of the projects/repositories related to this task


Completion checklist

Event Timeline

Change #1070964 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (5b29ba9)

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

Change #1070964 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (5b29ba9)

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

Change #1075554 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-08-13-135124 to 2024-09-24-145528

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

Change #1075555 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-08-20-132618 to 2024-09-24-221243

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

Change #1075554 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-08-13-135124 to 2024-09-24-145528

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

Change #1075555 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-08-20-132618 to 2024-09-24-221243

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