Split in-memory execution policy rules into a separate crate (#62615)

## Why

Configuration, protocol, and prompt code use in-memory policies and
previously pulled in the Starlark parser through `codex-execpolicy`.

## What changed

Move policy construction, rule validation, and evaluation into
`codex-execpolicy-rules` and use it directly from those crates. Keep
Starlark policy loading and file updates in `codex-execpolicy`, which
re-exports the shared rule types and wraps rule validation errors while
preserving their source locations.

GitOrigin-RevId: 5bc70d3cd387b43a3ad1fcc56af96ad169ac8b13
This commit is contained in:
Charlie Marsh
2026-11-19 22:32:56 +00:00
committed by copyberry
parent db263d4f54
commit 5bdb5e8b3c
26 changed files with 261 additions and 171 deletions
+1 -1
View File
@@ -9,12 +9,12 @@ use codex_config::ConfigLayerSource;
use codex_config::ConfigLayerStack;
use codex_execpolicy::AmendError;
use codex_execpolicy::Decision;
use codex_execpolicy::Error as ExecPolicyRuleError;
use codex_execpolicy::Evaluation;
use codex_execpolicy::MatchOptions;
use codex_execpolicy::Policy;
use codex_execpolicy::PolicyParser;
use codex_execpolicy::RequirementsExecPolicy;
use codex_execpolicy::RuleError as ExecPolicyRuleError;
use codex_execpolicy::RuleMatch;
use codex_execpolicy::blocking_append_allow_prefix_rule;
use codex_execpolicy::blocking_append_network_rule;