﻿# Which agent policy tests need rerunning after OPA v1.22.3?

Rerun empty-default and with-substitution fixtures after OPA v1.22.3, then compare real authorization decisions separately from test compilation.

Author: Retrivium team
Updated: 2026-11-11
Canonical URL: https://retrivium.ai/journal/news-opa1223-empty-default-with-policy-test-regression/
Language: en

OPA v1.22.3 was published on November 10 with a fix for a type-checker regression involving empty collections and rules replaced by with. An agent authorization layer using such test fixtures should distinguish a recovered test-compilation path from an actual change in the permissions it grants.

## Identify the affected fixture shape

The release describes a rule with an empty default object whose constant key was rejected during type checking even when a test replaced the rule. The correction widens the relevant empty collection type for rules targeted by with. Search the policy test suite for this pattern before changing production rules. A failing fixture can reflect compiler behavior rather than a deliberate denial in the application policy.

## Keep positive and negative cases

Our suggested regression pack includes a permitted tool action, a denied action, a missing key and an empty substituted object. Run it against the previous known-good engine, the affected version if available and the candidate patch. Record compilation errors separately from evaluated results. Otherwise a test runner that never reached evaluation can be mistaken for evidence that an unauthorized action was successfully blocked.

## Check real input and data separately

Test substitution is useful for isolation, but production authorization also depends on the actual input and data bundle. Replay synthetic representative requests through that combination without mocks, using no live credentials or consequential tool actions. Compare the decision and relevant obligations. This second pass asks whether the deployed agent still receives the intended limits, independently of the particular regression in test typing.

## Version the decision boundary

Keep the OPA version, policy bundle revision and input schema with the result. If a patch restores compilation while authorization decisions stay identical, describe exactly that outcome. Do not infer broader policy correctness from a green test run. A release qualification is most useful when another engineer can reproduce the same fixture, see the original failure stage and verify that denied actions remain denied after the update.

## Primary sources

- [OPA v1.22.3 type checker correction](https://github.com/open-policy-agent/opa/releases/tag/v1.22.3)
- [OPA policy testing documentation](https://www.openpolicyagent.org/docs/policy-testing)

## Related reading

- [Historical OPA replay needs the state that the decision actually observed](/journal/enterprise-ai-opa-historical-decision-replay-input-coverage/)
- [OPA policy bundles: signed publication is not active enforcement](/journal/enterprise-ai-opa-signed-bundle-activation-revision/)
