Records
opulse.verify.records ¶
Independent re-computation of dataset records and traces (spec section 9, items 5-7).
Records are produced with compiled code (Python or Cython); these checks redo the arithmetic with the reference oracle, which reads only definition text.
VerificationError ¶
Bases: AssertionError
A produced answer disagrees with the reference semantics. Nothing is written.
verify_trace ¶
verify_trace(trace, oracle: Oracle) -> None
Check every step on its own, not only the value of the whole expression.
For each step: it continues from the previous expression; its focus is the application
at path with the recorded number arguments; the new expression is the old one with
exactly that subtree replaced; the replacement has the operator's value (an eval
step gives that value directly, an undefined step needs it to be NaN); an expand
step takes the branch the reference semantics selects. Finally the whole expression
keeps its value and the trace ends at it.
audit_record ¶
audit_record(
row: dict,
registry,
oracle: Oracle,
settings,
runtime=None,
trace_cache: dict | None = None,
) -> list[str]
Every field of a released expression record, re-derived independently; returns problems.
Checks the value and expansion (reference interpreter), that the expression texts parse back to the tree, that the result text decodes to the result, the combined text, every evaluation step, the provenance (same operator set), and, when present, that the step-by-step solution is reproduced exactly from its recorded settings.