rizer.adaptive_models.review#

Human-review status of the physics, enforced at run time.

Every physical model, transition operator and the model selector declares a reviewed_by class attribute. It is None until a physicist has read both the equations in rizer/adaptive_models/PHYSICS.md and the implementation, and takes responsibility for them; signing off is a one-line change:

class IsentropicExpansion(BasePhysicalModel):
    reviewed_by = "A. Physicist (2026-09-15)"

While it is None, entering that model (or applying that operator) raises an UnreviewedPhysicsWarning, once per class and per process, so that a run whose trajectory passed through unvalidated physics says so in its own log rather than only in the documentation.

Turn the warnings into errors to refuse unreviewed physics outright:

warnings.simplefilter("error", UnreviewedPhysicsWarning)

Exceptions#

UnreviewedPhysicsWarning

Physics used by the run has not been validated by a human.

Functions#

warn_if_unreviewed(→ None)

Warn once per class that obj's physics has no human reviewer.

Module Contents#

exception rizer.adaptive_models.review.UnreviewedPhysicsWarning#

Bases: UserWarning

Physics used by the run has not been validated by a human.

rizer.adaptive_models.review.warn_if_unreviewed(obj: Any, kind: str) → None#

Warn once per class that obj’s physics has no human reviewer.

Parameters:
  • obj (object) – The model, transition operator or selector being entered. Its class carries the reviewed_by attribute; a truthy value silences the warning.

  • kind (str) – What obj is, for the message (e.g. "model", "transition operator").