mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
Simplify plugin MCP approval policy tests (#63614)
## What changed Use a manifest default of `writes` and a user override of `prompt` in the plugin manager test to verify that the user setting takes precedence. Remove the standalone tool-call approval test and keep the regression test that checks a per-tool override after the plugin cache has been warmed. GitOrigin-RevId: 667e613729e47507030308646d5adc5b5794e2c2
This commit is contained in:
@@ -1316,7 +1316,7 @@ async fn load_plugins_applies_plugin_mcp_server_policy() {
|
||||
"sample": {
|
||||
"type": "http",
|
||||
"url": "https://sample.example/mcp",
|
||||
"default_tools_approval_mode": "prompt",
|
||||
"default_tools_approval_mode": "writes",
|
||||
"enabled_tools": ["read", "search"],
|
||||
"tools": {
|
||||
"search": { "approval_mode": "prompt", "output_token_limit": 8000 }
|
||||
@@ -1334,7 +1334,7 @@ enabled = true
|
||||
|
||||
[plugins."sample@test".mcp_servers.sample]
|
||||
enabled = false
|
||||
default_tools_approval_mode = "approve"
|
||||
default_tools_approval_mode = "prompt"
|
||||
enabled_tools = ["search"]
|
||||
disabled_tools = ["delete"]
|
||||
|
||||
@@ -1353,7 +1353,7 @@ output_token_limit = 12000
|
||||
assert!(!server.enabled);
|
||||
assert_eq!(
|
||||
server.default_tools_approval_mode,
|
||||
Some(AppToolApproval::Approve)
|
||||
Some(AppToolApproval::Prompt)
|
||||
);
|
||||
assert_eq!(server.enabled_tools, Some(vec!["search".to_string()]));
|
||||
assert_eq!(server.disabled_tools, Some(vec!["delete".to_string()]));
|
||||
|
||||
Reference in New Issue
Block a user