Page MenuHomePhabricator

In Wikifunctions Beta, valid and correct implementations of functions often fail to execute successfully
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

Orchestration result
Evaluation result
Reference void

appears in the box below the Call Function button. Click the Show Error button

type: Error
error type: Argument type mismatch
type: Argument type mismatch
String Invalid argument type: expected Z4, got Z14

appears in the box below the Show Error button.

What should have happened instead?:
The function should have evaluated correctly (using this particular implementation)

Software version (skip for WMF-hosted wikis like Wikipedia):
Wikifunctions Beta https://wikifunctions.beta.wmflabs.org

Other information (browser name/version, screenshots, etc.):
This bug is not specific to any particular implementation or function. For example:

"Z2K2": {

		"Z1K1": "Z4",
		"Z4K1": "Z14",
		"Z4K2": [
			"Z3",

That is, a Z14 is currently defined to be a Z4. This also seems to be the case for a Z16. In any event…

“type: Error
error type: ZID not found
type: ZID not found
String Builtin validator "Z107" not found for "Z7". The Implementation used (if any) does not seem to be referenced in the Orchestration result object.

Event Timeline

Comment received via Telegram:
<James_F> The page 'Z14' is actually a Z2/Persistent object encapsulating a Z4/Type representing the concept of Z14/Implementations; so Z14 has a top-level Z1K1 of 'Z2', and a second-level (within the Z2K2) Z1K1 of 'Z4'. Not sure if that explains?

[I think it explains https://wikifunctions.beta.wmflabs.org/wiki/Z14 but not the structure of Z16/code Z14/implementations created as in the Description in this bug report (like https://wikifunctions.beta.wmflabs.org/wiki/Z10078), where the second-level Z1K1 is “Z14”.]

GrounderUK renamed this task from In Wikifunctions Beta, implementations of functions fail to execute successfully, returning a Z506/argument type mismatch error “ Invalid argument type: expected Z4, got Z14” to In Wikifunctions Beta, code implementations of functions fail to execute successfully, returning a Z506/argument type mismatch error: “Invalid argument type: expected Z4, got Z14”.Aug 13 2022, 8:40 AM
GrounderUK renamed this task from In Wikifunctions Beta, code implementations of functions fail to execute successfully, returning a Z506/argument type mismatch error: “Invalid argument type: expected Z4, got Z14” to In Wikifunctions Beta, implementations of functions fail to execute successfully, returning a Z506/argument type mismatch error: “Invalid argument type: expected Z4, got Z14”.Aug 13 2022, 9:56 AM
GrounderUK updated the task description. (Show Details)

I removed this:
“The Compositions that can execute successfully seem not to have the Evaluate Function box on their Implementation page (which is https://wikifunctions.beta.wmflabs.org/wiki/Z14). See, for example, https://wikifunctions.beta.wmflabs.org/wiki/Z10056.”

It appears that these Compositions are an illusion. My guess is that the illusion arises from a mishandling of Benjamin array notation for the Z8K4, which should be a separate ticket. The relevance here is that it suggests that user implementations may work occasionally when called from the function page. For example, with the same input, https://wikifunctions.beta.wmflabs.org/wiki/Z10072 evaluated correctly on the 18th, 22nd and 29th occasions.

GrounderUK renamed this task from In Wikifunctions Beta, implementations of functions fail to execute successfully, returning a Z506/argument type mismatch error: “Invalid argument type: expected Z4, got Z14” to In Wikifunctions Beta, valid and correct implementations of functions often fail to execute successfully.Aug 13 2022, 3:08 PM
GrounderUK updated the task description. (Show Details)

Update.
The Z107 problem seems to have disappeared but the “Argument type mismatch” error persists on the Implementation page. (It is now only possible to fail to evaluate the function once on this page, since the button is disabled (and argument input boxes are not available). An associated Implementation is shown as “not associated”.)

More complete error details are now available, however. For example:

type: Argument type mismatch
String Generic type function did not return a Z4: {"Z1K1":{"Z1K1":"Z9","Z9K1":"Z4"},"Z4K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z7"},"Z7K1":{"Z1K1":"Z9","Z9K1":"Z881"},"Z881K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z14"},"Z14K1":{"Z1K1":"Z9","Z9K1":"Z10130"},"Z14K2":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z7"},"Z7K1":{"Z1K1":"Z9","Z9K1":"Z866"},"Z866K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z7"},"Z7K1":{"Z1K1":"Z9","Z9K1":"Z10101"},"Z10101K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z18"},"Z18K1":{"Z1K1":"Z6","Z6K1":"Z10130K1"}}},"Z866K2":{"Z1K1":{"Z1K1":"Z9","Z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11K2":{"Z1K1":"Z6","Z6K1":"tail"}},"K2":{"Z1K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z7"},"Z7K1":{"Z1K1":"Z9","Z9K1":"Z881"},"Z881K1":{"Z1K1":"Z9","Z9K1":"Z11"}}}}}},"K2":{"Z1K1":{"Z1K1":{"Z1K1":"Z9","Z9K1":"Z7"},"Z7K1":{"Z1K1":"Z9","Z9K1":"Z881"},"Z881K1":{"Z1K1":"Z9","Z9K1":"Z3"}}}}},"Z4K3":{"Z1K1":"Z9","Z9K1":"Z831"}}

Checked the links cited in the task description/comments - the error appears for users without editing rights (non-functioneers). For functioneer users - Run function returns the results as expected; for the invalid input there is a proper error reporting, e.g. could not convert string to float: 'test'

The table below reflects the current behavior:

Linka functioneer user - Run function resulta non-functioneer user - Run function result
https://wikifunctions.beta.wmflabs.org/wiki/Z10019OKwikilambda-zerror
https://wikifunctions.beta.wmflabs.org/wiki/Z10078OKwikilambda-zerror
https://wikifunctions.beta.wmflabs.org/wiki/Z10072OKOK Note: all inputs processed properly without any discrepancies described in the task
https://wikifunctions.beta.wmflabs.org/wiki/Z10178 (composition)OKwikilambda-zerror
https://wikifunctions.beta.wmflabs.org/wiki/Z10179 (python)OKwikilambda-zerror
DVrandecic claimed this task.

Thank you Elena for checking so thoroughly. Closing.