Description
In executeInternal, we do some final nested metadata cleanup (only for topLevel objects). In this clause, we also add implementation metadata.
We should create a stronger guarantee that there will be no circular references in the nested metadata "tree." Alternatively, we should attach the original ZWrapper's scope to the result of execute, which should automatically remove the need to stitch nested metadata maps together.
Whatever fix we decide on, it should not only happen at the top level.
Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- find a more robust way to attach a function call's nested metadata to its result's metadata
- apply this solution to non-top-level objects
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist