Metakit / @doeixd/metakit/conformance

bundleVectors

function · packages/metakit/src/conformanceVectors.ts:123

function bundleVectors<Env>(
  rule: Expr<Env, unknown>,
  bundle: PortableExprBundleV1,
  environments: ReadonlyArray<Env>,
): ReadonlyArray<BundleVector>
function bundleVectors<State, Input, Emit, Supplied>(
  rule: Transition<State, Input, Emit, Supplied>,
  bundle: PortableTransitionBundleV1,
  environments: ReadonlyArray<TransitionEnv<State, Input, Supplied>>,
): ReadonlyArray<BundleVector>

The vector of each environment for rule and its bundle (from Artifact.encodeExprBundle or encodeTransitionBundle): the slots read from the environment as evaluation reads a path, and the reference's answer. Give each environment as values of the rule's Schemas ({ state, input, supplied } for a transition), so the step's input check sees a real input; a slot value the host refuses (a NUL, a lone surrogate) answers outsideProfile before the rule runs. A step refused for its input or supplied value answers outsideProfile too.