permissions: store only constrained permission profiles (#19735)

This commit is contained in:
Michael Bolin
2026-04-26 20:59:58 -07:00
committed by GitHub
parent 8033b6a449
commit 0ccd659b4b
32 changed files with 242 additions and 215 deletions

View File

@@ -38,11 +38,8 @@ async fn websocket_test_codex_shell_chain() -> Result<()> {
let mut builder = test_codex().with_windows_cmd_shell();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy(
"run the echo command",
test.config.permissions.sandbox_policy.get().clone(),
)
.await?;
test.submit_turn_with_policy("run the echo command", test.config.legacy_sandbox_policy())
.await?;
let connection = server.single_connection();
assert_eq!(connection.len(), 2);
@@ -85,11 +82,8 @@ async fn websocket_first_turn_uses_startup_prewarm_and_create() -> Result<()> {
let mut builder = test_codex();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy(
"hello",
test.config.permissions.sandbox_policy.get().clone(),
)
.await?;
test.submit_turn_with_policy("hello", test.config.legacy_sandbox_policy())
.await?;
assert_eq!(server.handshakes().len(), 1);
let connection = server.single_connection();
@@ -135,11 +129,8 @@ async fn websocket_first_turn_handles_handshake_delay_with_startup_prewarm() ->
let mut builder = test_codex();
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy(
"hello",
test.config.permissions.sandbox_policy.get().clone(),
)
.await?;
test.submit_turn_with_policy("hello", test.config.legacy_sandbox_policy())
.await?;
assert_eq!(server.handshakes().len(), 1);
let connection = server.single_connection();
@@ -191,11 +182,8 @@ async fn websocket_v2_test_codex_shell_chain() -> Result<()> {
});
let test = builder.build_with_websocket_server(&server).await?;
test.submit_turn_with_policy(
"run the echo command",
test.config.permissions.sandbox_policy.get().clone(),
)
.await?;
test.submit_turn_with_policy("run the echo command", test.config.legacy_sandbox_policy())
.await?;
let connection = server.single_connection();
assert_eq!(connection.len(), 3);