mirror of
https://github.com/openai/codex.git
synced 2026-11-05 16:29:31 +00:00
Add keyed shell environment policy filters (#34590)
## What changed - Add `shell_environment_policy.filters`, mapping environment-variable patterns to `include` or `exclude`, while continuing to accept the legacy `exclude` and `include_only` arrays. - Merge filter keys case-insensitively across config layers so higher-precedence entries can override individual patterns. Switching representations replaces the other representation instead of combining them. - Reject mixed, duplicate, or malformed filter definitions in enabled layers, config writes, and reloads, while retaining the previous session configuration when a reload is invalid. - Make config-manager reads and writes representation-aware and preserve existing formatting when updating individual policy values. ## Testing Add coverage for parsing, schema constraints, layered merging, validation and diagnostics, config writes, override metadata, and invalid session reloads. GitOrigin-RevId: e15464bca53e6e7ef31fcc97537fda60ed5d670a
This commit is contained in:
1 parent
65f8bf6853
commit
7442f5f932
29 files changed
+1662
-115
No files matched your search
@@ -355,7 +355,8 @@ async fn plugins_popup_upgrades_user_configured_git_marketplace_from_marketplace
|
||||
"[marketplaces.repo]\nsource_type = \"git\"\nsource = \"https://github.com/owner/repo.git\"\n",
|
||||
)
|
||||
.expect("marketplace config"),
|
||||
);
|
||||
)
|
||||
.expect("marketplace user config should be valid");
|
||||
|
||||
render_loaded_plugins_popup(
|
||||
&mut chat,
|
||||
@@ -426,7 +427,8 @@ async fn marketplace_add_success_refreshes_to_new_marketplace_tab() {
|
||||
"[marketplaces.debug]\nsource_type = \"git\"\nsource = \"https://github.com/owner/debug.git\"\n",
|
||||
)
|
||||
.expect("marketplace config"),
|
||||
);
|
||||
)
|
||||
.expect("marketplace user config should be valid");
|
||||
render_loaded_plugins_popup(
|
||||
&mut chat,
|
||||
plugins_test_response(vec![plugins_test_curated_marketplace(Vec::new())]),
|
||||
@@ -515,7 +517,8 @@ async fn plugins_popup_removes_user_configured_marketplace_flow() {
|
||||
"[marketplaces.repo]\nsource_type = \"git\"\nsource = \"https://github.com/owner/repo.git\"\n",
|
||||
)
|
||||
.expect("marketplace config"),
|
||||
);
|
||||
)
|
||||
.expect("marketplace user config should be valid");
|
||||
|
||||
render_loaded_plugins_popup(
|
||||
&mut chat,
|
||||
|
||||
Reference in new issue
Block a user