Skip to main content

Module fixture_eval

Module fixture_eval 

Source
Expand description

Evaluate parsed omena-fixture-v0 expectations against engine output.

RFC 0003 (#37 wiring-gap): the fixture grammar parses assertion forms (diagnostic / no-diagnostic / count / cascade-outcome / cascade-witness / boundary-state) and classifies them with OmenaFixtureExpectationKindV0, but nothing turned a classified expectation into a pass/fail. This module closes the evaluator gap for the P0-independent families.

§Dependency-light wiring

omena-testkit must stay free of an omena-query dependency to preserve the workspace DAG (the test substrate sits below the engine). So the evaluator never names an engine type: the consumer supplies diagnostics as OmenaFixtureDiagnosticV0 (a minimal { code } projection of OmenaQueryStyleDiagnosticV0) and boundary states as OmenaFixtureBoundaryStateV0 (a { reference, state } projection of the resolver boundary-state lattice). A real engine-backed consumer such as omena-diff-test — which already depends on omena-query — maps the shipped diagnostic/boundary structs into these projections.

§Live vs deferred families

Live now (backed by shipped functions):

  • diagnostic / no-diagnostic / count — matched against diagnostic codes.
  • boundary-state — matched against the resolver boundary-state lattice.
  • cascade-outcome / cascade-witness — matched against per-declaration cascade winners/witnesses. #33’s in-process bridge now generates the SIFs the resolver-generator consumes, so a consumer can run the cascade and project each scope’s winner id plus its witness (also-considered) declaration ids into OmenaFixtureCascadeV0. The evaluator stays free of an omena-cascade / omena-query dependency by matching only against that projection (see “Dependency-light wiring” above).

Structs§

OmenaFixtureBoundaryStateV0
Minimal boundary-state projection consumed by the fixture evaluator.
OmenaFixtureCascadeV0
Minimal cascade-outcome projection consumed by the fixture evaluator.
OmenaFixtureDiagnosticV0
Minimal diagnostic projection consumed by the fixture evaluator.
OmenaFixtureExpectationOutcomeV0
Outcome of evaluating one fixture expectation.

Functions§

evaluate_omena_fixture_v0
Evaluate every parsed expectation in fixture against supplied engine output, returning one OmenaFixtureExpectationOutcomeV0 per expectation.
evaluate_omena_fixture_v0_with
Evaluate a fixture against diagnostics produced lazily by an injected closure, keeping the engine dependency on the consumer side.