fix: tui default trusted settings should respect workspace write config (#3341)

## Summary
When using the trusted state during tui startup, we created a new
WorkspaceWrite policy without checking the config.toml for a
`sandbox_workspace_write` field. This would result in us setting the
sandbox_mode as workspace-write, but ignoring the field if the user had
set `sandbox_workspace_write` without also setting `sandbox_mode` in the
config.toml. This PR adds support for respecting
`sandbox_workspace_write` setting in config.toml in the trusted
directory flow, and adds tests to cover this case.

## Testing
- [x] Added unit tests
This commit is contained in:
Dylan
2025-10-16 11:23:38 -07:00
committed by GitHub
parent 0139f6780c
commit 4b01f0f50a
4 changed files with 203 additions and 145 deletions

1
codex-rs/Cargo.lock generated
View File

@@ -1422,6 +1422,7 @@ dependencies = [
"textwrap 0.16.2",
"tokio",
"tokio-stream",
"toml",
"tracing",
"tracing-appender",
"tracing-subscriber",