Page MenuHomePhabricator

Make It a Post-Condition that the Evaluator's Output Be in Valid Normal Form
Open, MediumPublic

Description

Description

Currently, we do not place many restrictions on the output of the evaluator. For example, if a type converter produces something weird, the evaluator will happily return it (as long as it's valid JSON).

The orchestrator implicitly catches such errors with ZWrapper.create, which recursively checks the form of an object.

But ZWrapper.create is not normally run on the Z22K2/Metadata of envelopes, which are treated as a special kind of object. Currently, we make an extra call to ZWrapper.create simply to catch these kinds of bugs, but we shouldn't have to do that.

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

  • make stronger post-conditions on the evaluator's output, obviating the need for this extra check, OR
  • explicitly check that Z22K2s coming from the evaluator are in valid normal form (instead of the janky ZWrapper.create version)

Completion checklist