Policy Versioning for AI Decision Consistency

Teams managing policy changes while ensuring AI decisions stay consistent and historical decisions remain auditable.

The answer

Policy sets in Corules are versioned and immutable once published. When you update a discount cap, a new policy version is published — the old version remains available for historical audit. Every decision evaluation records the policy version that produced it. This means: policy changes take effect only from the publish timestamp, historical decisions reference the policy that was active at decision time, and the impact of policy changes can be simulated before publishing.

How it works

Corules's policy runtime sits in the enforcement path between your AI agent and the action it wants to take. The agent sends a structured context payload to /v1/validate. Corules evaluates the context against a compiled CEL policy set and returns a structured decision — ALLOW, BLOCK, or ESCALATE — with a reason and audit ID.

Every decision is recorded in an immutable audit ledger. You can replay any past decision by providing the policy_set_version and the normalized input hash — the result will be identical.

Policy example

Policies are written in CEL (Common Expression Language). They are compiled once at publish time and evaluated in microseconds at request time.

// Policy versions are immutable after publish:
{
  "policy_set_id": "pset_01J...",
  "version": "3.2.1",
  "published_at": "2026-01-15T09:00:00Z",
  "status": "active"  // previous versions: "archived"
}
// Decisions made before 2026-01-15 reference version 3.1.0

Frequently Asked Questions

Can I roll back a policy if it causes problems?

Yes. Activating a previous policy version is an API call. The previous version is never deleted — it is always available for reactivation.

How do policy changes affect in-flight decisions?

In-flight decisions (mid-workflow) evaluate against the policy version that was active when the evaluation began. Policy changes are not retroactive.

See it working in your environment

Start free — no credit card, no sales call. Evaluate up to 1,000 decisions per month.

Get started free