Policy Validator

Purpose

Pre-activation policy validation. The Policy Validator performs conflict detection, safety checks, deadlock prevention, and coverage gap analysis before any policy goes live. It is the safety net that prevents bad policies from reaching production.

Responsibilities

  • Detect conflicts between proposed and existing policies

  • Verify that platform safety constraints are not violated

  • Check for deadlock conditions (circular dependencies, impossible states)

  • Identify coverage gaps (scenarios with no applicable policy)

  • Simulate policy effects before activation

Validation Checks

Check

Description

Example

Conflict detection

Two policies give contradictory answers for the same input

“Allow Zone A at night” vs “Deny Zone A after 10 PM”

Safety override

User/app policy attempts to weaken platform safety

Battery threshold set below platform minimum

Deadlock detection

Policies create circular blocking

A requires B complete first, B requires A complete first

Coverage gap

No policy covers a valid scenario

No failure recovery defined for timeout errors

Hierarchy violation

Lower-tier policy overrides higher-tier

User policy contradicts app-defined preset

API Surface

Operation

Description

POST /validate

Validate a policy against the current policy set

POST /simulate

Simulate policy effects for a given scenario

GET /validate/{id}/report

Get detailed validation report

Dependencies

Service

Relationship

Policy Service

Reads current policy set for conflict detection

Consumed By

Consumer

Usage

Policy Service

Mandatory validation before policy activation

AI Policy Agent

Validates conversationally-created policies before proposing

StarGate

Shows validation results in the admin UI