TECHNOLOGY

Historical OPA replay needs the state that the decision actually observed

In this article
THE QUICK TAKE

Keep the original decision separate from a present-day reevaluation, and declare replay incomplete when its historical input or nondeterministic-call evidence is missing.

Ask a historical question explicitly

An enterprise assistant was permitted to export a report. During review, the same policy revision now denies a seemingly identical request because a temporary entitlement or time window has changed. The later result does not prove that the original evaluator was wrong. Decide whether the investigation asks what should be allowed now or what the original decision observed. Those questions require different state and must remain separate in the incident record.

Identify the recorded evaluation and its dependencies

The decision-log reference describes query input, result, decision identity and bundle metadata. Preserve that association with the relevant external operation. Inventory the policy’s data dependencies as well: supplied input is not necessarily the whole evaluated world. A current directory lookup cannot stand in for the historical entitlement state. Record whether that state is retained as an approved snapshot, a versioned dependency or an unresolved gap, without assuming bundle revision covers every external fact.

Account for time and nondeterministic observations

The time built-ins documentation says time.now_ns returns the same value within a single evaluation. That does not freeze its value for a later investigation. The configuration reference makes nd_builtin_cache opt-in, capturing nondeterministic builtin observations for decision logs. Verify the evaluator’s effective configuration and the recorded input/output mappings before describing a replay as equivalent. A setting planned in a deployment file is weaker evidence than the actual event retained by the receiver.

Check coverage after the log leaves the evaluator

OPA documents a size-bounding path that drops nd_builtin_cache when its inclusion cannot fit the upload bound. A received decision event can therefore retain its result while lacking the observations required for faithful replay. Masking and retention may remove other required evidence deliberately. Mark coverage explicitly and keep the original outcome authoritative as a historical observation; do not invent missing builtin responses or call a present-day reevaluation a recovered original execution.

Design a replay-coverage fixture

Use a controlled policy whose decision depends on a temporary time window and an external fixture value. Retain an evaluation record, then change the clock and fixture. Compare a historical reconstruction with a clearly labelled current-state evaluation, and repeat with replay observations intentionally absent. Acceptance requires the system to distinguish the outcomes and report insufficient coverage honestly. No policy evaluation, network call or forensic replay was executed here; this is a proposed verification procedure.

Keep investigation from creating new authority

Per-invocation tool policy concerns enforcement at the effect boundary. Reproducible stacks preserve the evaluator environment. A replay can explain a historical decision under retained evidence; it does not authorize a fresh export under old permissions. Isolate reconstructed dependencies from live tool execution, protect sensitive inputs and state the missing evidence. The useful result is a bounded explanation, including when exact reconstruction is impossible, rather than a newly manufactured approval.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles