Page MenuHomePhabricator

Test Z8013 for Z801/Echo fails
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • New wiki. Go to Z801

What happens?:
You can see that the test for Z8013 fails.

The test is wrong: it uses Z866/String equality for the result condition, but since we are expecting a list, that is a type error. We would need a List equality for this. Since List equality is not a built-in (IIRC) we cannot have this test as a built-in test.

What should have happened instead?:
All built-in tests should pass.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

Should we add List equality as a built-in, then? Or just remove this test?

Should we add List equality as a built-in, then? Or just remove this test?

Can we recurse through the list with a Map() applying the StringEquality()?

Should we add List equality as a built-in, then? Or just remove this test?

Can we recurse through the list with a Map() applying the StringEquality()?

@Jdforrester-WMF, do you mean this is what our built-in implementation for List<String> equality could look like?

In T299194#8442755, @EWright-WMF wrote:

Should we add List equality as a built-in, then? Or just remove this test?

Can we recurse through the list with a Map() applying the StringEquality()?

@Jdforrester-WMF, do you mean this is what our built-in implementation for List<String> equality could look like?

Yes, possibly, but mostly I meant that we could write the verification call here to be a booleanEquality() of recursively booleanAnd()ing through the results of a map of stringEquality() because in this case we know it's a list of Z6/Strings (which isn't generally true).

As James was (I think) suggesting, we don't actually strictly need a built-in implementation to achieve a list equality function. As a POC, I created a new function in beta, 'List of Strings equality', and a recursive composition implementation: https://wikifunctions.beta.wmflabs.org/wiki/Z10338. This function and implementation are specifically for testing equality of List<String>, but you could make a more general list equality function by adding another argument for an equality function, and then calling this when comparing individual elements. I tried doing this, but there are some (I think) bugs preventing setting Z7K1 to an argument reference (T324600, T324597).

@Jdforrester-WMF, @cmassaro: given we can implement a list equality function using composition, does that mean we wouldn't want to create a built-in implementation?

Re: the actual topic of this ticket (Z8013 not passing), the above discussion is for now a moot point. The test is failing before the validation step is ever reached. I'm looking into this.

Re: the actual topic of this ticket (Z8013 not passing), the above discussion is for now a moot point. The test is failing before the validation step is ever reached. I'm looking into this.

The problem is that Z8013 is not compatible with the way we execute Testers in the PHP layer - its Z20K2 is not a call to the function under test, as the PHP layer expects. I don't think there's currently any way to create a Tester for Echo's list case without adding a separate persisted function, like the one I link above.

We agreed in the AW Engineering meeting that we would create a predefined List Equality function, with a built-in implementation, to use in this test.

Change 868643 had a related patch set uploaded (by EWright; author: EWright):

[mediawiki/services/function-schemata@master] Add List Equality Factory function and implementation definitions.

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

Waiting on comment from team on this doc, presenting two options for a list equality function.

Change 868643 abandoned by EWright:

[mediawiki/services/function-schemata@master] Add List Equality Factory function and implementation definitions.

Reason:

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

Change 870927 had a related patch set uploaded (by EWright; author: EWright):

[mediawiki/services/function-schemata@master] Add validator for Z40 to schema.js.

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

Change 870927 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Add validator for Z40 to schema.js.

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

Change 870963 had a related patch set uploaded (by EWright; author: EWright):

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

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

Change 870963 merged by jenkins-bot:

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

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

Change 870551 had a related patch set uploaded (by EWright; author: EWright):

[mediawiki/services/function-orchestrator@master] [WIP] Implement Z989 (built-in implementation for List equality).

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

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

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

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

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

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (f19bc13)

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

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

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

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

Change 870551 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Implement Z989 (built-in implementation for List equality).

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

Change 875346 merged by jenkins-bot:

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (f19bc13)

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

Change 875325 merged by jenkins-bot:

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

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

Change 875324 merged by jenkins-bot:

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

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

Change 878936 had a related patch set uploaded (by EWright; author: EWright):

[mediawiki/services/function-schemata@master] Fix Z8013 - Echo Tester for Typed List.

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

Change 878936 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Fix Z8013 (Echo Tester for Typed List).

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

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

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (4093097)

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

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

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

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

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

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

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

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

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

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

Change 878138 merged by jenkins-bot:

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

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

Change 879128 merged by jenkins-bot:

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (4093097)

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

Change 879129 merged by jenkins-bot:

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

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

Change 879130 merged by jenkins-bot:

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

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