AI Guardrail Versioning and Policy Diff

See which rules were added, removed, or changed across the last 20 saved validator versions, and restore an old version as a new one without losing history.

November 28, 2026

Related templates: Policy Change Ticket

Consider an illustrative incident. A refunds agent starts blocking valid responses on a Tuesday morning. The on-call engineer opens the validators editor and finds a stricter enum_validator list, but nobody remembers who saved it or what the rules looked like on Monday. Git does not help, because the last edit was made in the dashboard.

Validator rules are production configuration. A one-line edit to an enum list or an on_fail value changes what reaches customers, yet many teams treat guardrail edits as dashboard tweaks with no record.

AI policy versioning closes that gap. Every save becomes a numbered version, each version can be compared with the one before it, and a bad change can be reversed without erasing it. This pillar explains how validator change management works in ValGuard today, what the guardrail diff shows and misses, and how history relates to proof envelopes. The operator reference lives in the policy history docs.

Why guardrail changes need a history

Validators decide whether a response passes, gets repaired, triggers a re-ask, or is blocked. When those decisions shift, someone eventually asks why. Without history, the only answers are memory, chat threads, and a repository that may not match production.

What ValGuard records today

ValGuard keeps three separate records that touch policy changes. They answer different questions, and they are not joined by a shared identifier.

RecordWhat it capturesWhere it lives
Policy history snapshotThe full rule list for one agent at save time, with a version number, timestamp, and optional notePolicy history panel in the validators editor (latest 20 versions)
Governance audit entryWhich user triggered which action, such as validators.replace, validators.template_apply, or agent.import_configOrg governance audit log
policy_snapshot_hashA configuration stamp stored on each request row and inside the HMAC-signed evidence envelopeRequest records and Proof export (Growth+)

Editor saves and template applies write a snapshot in the same database transaction as the rule change, and each one bumps the agent's version number. One gap matters: importing configuration through the agent config API changes rules without a snapshot. Those edits are logged as agent.import_config and surface in history only inside the next saved diff.

How the guardrail diff works

On the validators editor at /dashboard/agents/<slug>/validators, expand Policy history. After a short loading state, the panel lists the most recent 20 saved versions. Each entry shows the version number, save time, optional note, and three lists of rule names: added, removed, and changed.

The diff compares each version with the one saved directly before it. Rules are matched by name. A rule counts as changed when any of five fields differ: enabled, priority, severity, on_fail, or params.

That matching is deterministic and cheap, but it has edges.

  • Renaming a rule appears as one removal plus one addition, not as a change.
  • The panel names which rules changed, not which field changed or what the old value was. Record the specific edit in your change ticket.
  • If two rules on one agent share a name, the diff compares only one of them.
  • The oldest entry in the list shows no diff, because the version before it is not loaded.
  • Disabling a rule flips enabled, so it appears as a change to that rule.
  • Shadow mode is an agent setting, not part of the rule list. A shadow-to-enforce switch in Agent settings does not appear in policy history.

There is no side-by-side view of two arbitrary versions. Each row compares one version with its immediate predecessor.

A concrete reading helps. Suppose version 14 lists pii_detection under added and required_fields under changed. You know a rule arrived and another moved, but not whether required_fields gained a field or switched from block to reask. The ticket has to say.

Restore without rewriting history

Every entry has a Restore this version action. Restore does not move a pointer backward. It takes the stored rule list from the selected version and saves it again through the same path as a normal save.

The result is a new version at the top of the list with the note Restored version N. The bad version stays in history, so a reviewer sees the mistake, the restore, and the current head. The audit log records a restore as validators.replace, like any save; the automatic note tells them apart.

Restore keeps existing rule row ids when a rule name is unique on the agent, so references that follow the id survive a rollback.

Restore runs as soon as you click it, with no confirmation step and no built-in Simulate pass. It also leaves the agent's shadow or enforce setting untouched.

The note column added in migration 000133 is real, but today the only note written is that restore marker. The editor has no field for typing your own note. Keep ticket links and approver names in your ticketing system.

How versions relate to proof envelopes

Evidence envelopes, covered in how to prove AI guardrails actually executed, carry a field called policy_snapshot_hash. It is easy to assume this points at a history version. It does not.

Despite the name, the value is a configuration stamp built from the agent's last update time and the latest update time among its validator rows. It is stored on each request row and covered by the envelope's HMAC signature.

It is not a hash of rule contents, and it is not the snapshot version number or row id. You can sometimes line its timestamps up with a history entry's save time, but there is no direct lookup from a stamp to a version. Every validator save advances the agent's update time, so each saved version gets a new stamp. Requests recorded before that change can share one stamp across several edits.

So keep the two records in their own lanes. The signed envelope shows that configured validators ran on a request and what they decided; the verify guardrail proof tutorial covers offline checks. Policy history shows the rule list at each save. Binding envelopes to a specific version id is not shipped today.

The change management model to aim for

Good validator change management looks like infrastructure change management, scaled down. Each change has an owner, a reason, a pre-save check, and a recorded outcome. The product supplies the record and the diff; your team supplies the process.

  1. Draft the edit in the validators editor without saving.
  2. Simulate the unsaved rules against a sample or a redacted quarantine snapshot. Simulate makes no model call and reports how many fixtures change outcome.
  3. Open a ticket listing the intended added, removed, and changed rules, the exact field edits, and the Simulate summary.
  4. Save, then confirm the new Policy history entry matches the ticket.
  5. Observe in shadow before switching a risky change to enforce.
  6. Restore a known-good version if production regresses, and link the incident in the ticket.

ValGuard does not enforce this sequence. There are no approval gates or second-approver checks, and saves take effect immediately. History is the record your process checks against.

The test policy before production tutorial covers the pre-save step, and how to test AI guardrails before production makes the broader case. Ownership belongs in a RACI, described in who owns validation rules.

Playbooks for validator change management

The primary playbook is policy-change-ticket, a two-step triage and handoff flow. You paste a diff summary, and an extract step structures it as validated JSON.

If that output passes validation, the flow hands it to an approver step and ends at a terminal step. If extraction fails validation, a fallback route ends the flow without reaching the approver, so check the run result. The playbook does not read policy history, restore versions, or save rules.

Four companion playbooks share the same two-step shape. Treat each as a checklist for routing notes to a human, not as automation.

  • rollback-one-click structures incident context before someone clicks Restore in the editor. It does not perform the restore.
  • diff-before-merge prepares added, removed, and changed rule names for a human reviewer. It does not block a save or require a second approver.
  • version-pin-for-audit documents which version an audit period relies on and the freeze window. Nothing is pinned or locked in the product.
  • playbook-fork-sync frames a review of a forked playbook against its upstream template. It does not sync forks automatically.

What this is not

  • Not Git. There are no branches, merges, pull requests, or required approvals.
  • Not a record of agent settings. Shadow mode, fail mode, and budgets sit outside the rule diff.
  • Not a per-request version binding. policy_snapshot_hash is a timestamp stamp, not a version id.
  • Not payload storage. Snapshots hold rule configuration, not prompts or responses.
  • Not an API change. OpenAI-compatible requests, responses, and streaming are unchanged.
  • Not a compliance certificate. History supports an audit narrative but does not replace legal review.

Start this week

Open Policy history on your highest-traffic agent and read the last five entries. For each changed rule, ask whether anyone can explain what moved and why. Every entry nobody can explain marks a gap in your change process.

Then take the next validator edit through the full loop: Simulate, ticket, save, and confirm the new entry matches. If it regresses, restore and let the history show both steps.

Book a technical walkthrough with our team → Start free in shadow mode — no credit card →

Related articles

How to Detect LLM Schema Drift

Catch structural regressions when validation failure rates jump between 7-day windows, and flag unexpected step order on published playbooks.

Shadow Mode Is Not Coverage

Shadow mode shows what would block before enforce. It does not prove every configured validator ran on every request. Use coverage attribution for chain completeness.