Page MenuHomePhabricator

ZObject creation with invalid Z11K1 goes through when it should not
Closed, ResolvedPublic

Description

Steps to reproduce:

  • In ApiSandbox, go to the wikilambda_edit API and load the creation example
  • (in beta cluster)
  • See that the value of Z11K1 is a language code and not a language Zid

Observed behavior:

  • The ZObject can be successfully created

Expected behavior:

  • The ZObject creation should fail

Completion checklist:

  • Functionality
    • The issue has been resolved
    • The issue has been peer reviewed
    • The issue has been merged
  • Engineering
    • There are existing and passing unit/integration tests effectively testing its success and its failure
    • Explicit regression test mentioning the bug

Event Timeline

Some exploration into this bug threw light into something that doesn't seem to be trivial. The test data available in function-schemata for the objects: Z2, Z4, Z8, Z12, Z32 and Z60, particularly those tests that focus on benjamin arrays, it passes successfully when the tests are run in function-schemata (with Ajv), but they fail when running in Wikilambda (Opis).

Change 801735 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add tests that fail with typed lists in PHP

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

Change 801736 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/services/function-schemata@master] Add test data for monolingual strings with old language code format

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

Change 801736 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Add test data for monolingual strings with old language code format

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

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

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (31f931f)

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

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

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

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

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

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (31f931f)

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

Change 802800 merged by jenkins-bot:

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

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

Change 802801 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (5c8c897)

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

Change 802802 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (5c8c897)

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

Change 802818 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] CanonicalZObjectTest: Disable tests that disagree between Opis and Ajv

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

Change 801735 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add tests that fail with typed lists in PHP

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

Change 802818 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] CanonicalZObjectTest: Disable tests that disagree between Opis and Ajv

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

gengh removed gengh as the assignee of this task.Aug 22 2022, 1:29 PM
gengh changed the task status from Open to In Progress.Aug 14 2023, 3:41 PM
gengh claimed this task.
gengh triaged this task as High priority.

Added front-end mechanisms to clear invalid monolingual string before submission. Issue and tests solved with this patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiLambda/+/949538

Etonkovidova subscribed.

Checked on wikifunctions wmf.28, Zobject creation fails with "message": "Not wellformed"