Skip to main content
Paper / PolicyStrata

PolicyStrata: Responsibility-Scoped Testing for Cross-Layer Policy Drift in LLM Data Agents

PolicyStrata detects cross-layer policy drift in LLM data agents with responsibility-scoped tests, clean controls, and minimized failure witnesses.

See PolicyStratain the Raintree portfolio →
ResearchZachary Roth8 pagesHTML + PDF
Non-clean cases
1,720 / 1,720 detected
Clean controls
80 tested, 0 false positives

Abstract

LLM data agents translate natural-language requests into semantic plans, SQL queries, and analytical answers. Existing evaluations emphasize text-to-SQL correctness, malformed-output reduction, or model refusal behavior. Deployed agents also replicate authorization, semantic, lineage, version, and release obligations across model-visible manifests, grammars, validators, compilers, database controls, and output filters. These non-equivalent surfaces can drift after policy, schema, or semantic model updates, producing failures that component tests miss.

We present PolicyStrata, a regression-testing framework for cross-layer policy drift in governed data-agent stacks. PolicyStrata generates principals, requests, plans, mixed-version surface configurations, database states, and lowered queries, then checks whether each surface preserves its assigned authorization, semantic, lineage, containment, and release obligations. Its minimized witnesses identify the first violated transition. The artifact includes DataPolicyDriftBench, a deterministic benchmark with three analytics domains; seeded, generated, detector-frozen held-out, and clean-control suites; baseline comparators; ablations; JSONL traces; optional database smoke fixtures; and a brownfield integration check. On deterministic, non-equivalent mutant suites generated from the implemented operators and fixtures, PolicyStrata reports witnesses for all 1720 covered injected faults, with 0 false positives on 80 clean controls. This is v1 fault-model coverage, not recall on unknown production faults.

Problem definition

Each layer has a different responsibility.

A grammar, validator, compiler, database policy, and release filter are not equivalent representations. PolicyStrata checks whether each one preserves the obligation assigned to it as a request moves from model-visible input to released output.

  1. Layer 1

    Manifest or grammar

    Expose only capabilities whose reachable operations are authorized for the principal and runtime context.

  2. Layer 2

    Semantic-plan validator

    Accept supported authorized plans and reject unauthorized plans inside the declared support envelope.

  3. Layer 3

    Compiler or lowering

    Preserve tenant, purpose, policy version, lineage, and business semantics while producing executable work.

  4. Layer 4

    Database policy and RLS

    Contain unauthorized executable operations under the database role that runs the query.

  5. Layer 5

    Release policy

    Release only result-lineage pairs allowed to cross the human, model, log, cache, or tool boundary.

Method

Generate, replay, localize, and minimize.

  1. 1

    Sample or import a principal, request, database state, and version vector for every policy-bearing surface.

  2. 2

    Derive authorization, semantic, lineage, and release expectations from independently implemented reference interpreters.

  3. 3

    Replay manifest exposure, validation, compiler lowering, database containment, and the release decision.

  4. 4

    Check each transition against that surface's responsibility and stop at the first violated obligation.

  5. 5

    Minimize the principal, request, plan, policy clauses, database rows, version vector, and SQL while preserving the failure.

  6. 6

    Emit deterministic JSONL traces, a minimized witness, provenance hashes, suite summaries, baselines, and ablations.

DataPolicyDriftBench results

Deterministic coverage, controls, baselines, and ablations.

The benchmark spans support SaaS, household finance, and product analytics fixtures. These results measure the implemented fault model. They do not claim recall on unknown production failures.

DataPolicyDriftBench deterministic suite results
SuiteCasesFaults detectedControls / false positives
Support seeded5050 / 50
Support generated500500 / 500
Support heldout-v1500500 / 500
Finance seeded2020 / 20
Finance heldout-v1250250 / 250
Analytics seeded100100 / 100
Analytics generated300300 / 300
Clean controls8080 / 0
Total1,8001,720 / 1,72080 / 0

Baseline comparison

Faults detected by PolicyStrata and point-check baselines
ComparatorDetected
Grammar only121 / 1,720
Semantic validator only573 / 1,720
SQL AST policy checker1,043 / 1,720
Database policy only326 / 1,720
Release filter only364 / 1,720
Lineage only239 / 1,720
Random data generation1,246 / 1,720
Naive surface equality573 / 1,720
Defense-in-depth stack1,561 / 1,720
PolicyStrata1,720 / 1,720

Ablation results

PolicyStrata results with individual obligations removed
AblationDetectedMissed
Without database containment1,394326
Without independent oracle1,357363
Without lineage1,65763
Without release policy1,68238
Without transition obligations3631,357

PolicyStrata emitted witnesses for all 1,720 injected faults covered by the deterministic v1 operators and fixtures, with no false positives across 80 clean controls.

The defense-in-depth point-check baseline detected 1,561 of 1,720 cases. Its 159 misses lacked responsibility-scoped transition contracts or witness attribution.

Removing transition obligations caused the largest ablation loss: 1,357 of 1,720 non-clean cases were missed.

The artifact generated 1,800 deterministic traces and 1,720 minimized JSON witnesses without an LLM API key or host PostgreSQL installation.

Limitations and non-claims

What the result does not establish.

  • The 1,720/1,720 result measures coverage of implemented deterministic fault operators and fixtures, not recall on unknown production faults.

  • Detector-frozen held-out suites reduce post-hoc tuning risk but remain built-in synthetic cases rather than independently authored or blinded benchmarks.

  • Independent reference interpreters cannot detect a uniformly wrong canonical policy without an external specification or human-reviewed oracle.

  • Surface adapters belong to the trusted computing base and can hide or invent drift if their mappings are wrong.

  • Generated database states can miss semantic differences outside the searched state space; equal visible results do not prove authorized lineage.

  • Write actions, adaptive privacy, sequential or history-aware release, and model-in-the-loop exploitability are outside the deterministic v1 guarantee.

Citations

Cite the paper and inspect the related work.

BibTeX

@article{roth2026policystrata,
  title = {PolicyStrata: Responsibility-Scoped Testing for Cross-Layer Policy Drift in LLM Data Agents},
  author = {Roth, Zachary},
  year = {2026},
  month = {June},
  url = {https://raintree.technology/writing/policystrata}
}

PDF page preview

The research is readable in HTML above. Preview all 8 PDF pages here.

PolicyStrata paper page 1 of 8
PolicyStrata paper page 2 of 8
PolicyStrata paper page 3 of 8
PolicyStrata paper page 4 of 8
PolicyStrata paper page 5 of 8
PolicyStrata paper page 6 of 8
PolicyStrata paper page 7 of 8
PolicyStrata paper page 8 of 8

Supporting files

RepositoryView the source and tests on GitHubArtifact kitDownload the reproducible submission bundle

See how Raintree tests policy behavior in AI systems.

Raintree builds responsibility boundaries, regression tests, and human checkpoints into its products and developer tools.