fix(controlplane): exempt batch-local policy refs in contract apply

Merged
JA
4mo ago
+293-21

Contract apply resolved every policy and policy-group reference against the persisted registry. As a result, a dry-run apply failed when a contract referenced a policy or policy group that was created in the same batch and therefore not yet persisted.

This adds batch_policy_names and batch_policy_group_names to the WorkflowContractService.Apply request. References whose name is in those sets are treated as known instead of being resolved against the registry, while remote references continue to be validated in both dry-run and real applies.

Assisted-by: Claude Code