Constrain Windows sandbox requirements#23766
Conversation
cecd93c to
e5e02f8
Compare
e5e02f8 to
3d81774
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e6ca07486
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # codex-rs/tui/src/app/event_dispatch.rs
5fb25b2 to
2c46222
Compare
# Conflicts: # codex-rs/app-server/src/request_processors/windows_sandbox_processor.rs # codex-rs/tui/src/lib.rs
| ) | ||
| .await | ||
| .map_err(|err| config_load_error(&err))?; | ||
| let (mode, requested_mode) = match params.mode { |
There was a problem hiding this comment.
nit, this looks like mode = current and requested_mode = new mode, but they are both the requested mode. maybe rename mode to something else
| })) | ||
| }), | ||
| ); | ||
| let (outgoing_tx, mut outgoing_rx) = tokio::sync::mpsc::channel(1); |
There was a problem hiding this comment.
lots of setup for this test. non-blocking but maybe consider more of a unit test that just tests the logic, without requiring tokio channels, an analyticseventsclient etc.
Why
Managed requirements can already constrain sandbox policy choices, but Windows sandbox implementation selection was still resolved independently from those requirements. That left the TUI able to continue through the unelevated fallback even when an organization wants to require the elevated Windows sandbox implementation.
What
[windows].allowed_sandbox_implementationsrequirements support for the Windowselevatedandunelevatedimplementations.Semantics
["elevated"]unelevated/ unsetelevated["unelevated"]elevated/ unsetunelevated["elevated", "unelevated"]elevatedelevated["elevated", "unelevated"]unelevatedunelevated["elevated", "unelevated"]elevatedAvailability is handled by interactive setup surfaces after allowlist resolution. If the effective elevated implementation is not ready, elevated-only requirements block on setup. When unelevated is also allowed, the UI may offer the existing unelevated fallback.
TUI Screens
If elevated setup is not already complete:
If admin setup fails under
["elevated"]:Next Steps
configRequirements/read, so clients can inspect the loaded[windows].allowed_sandbox_implementationsrequirement instead of inferring it from Windows setup statewindowsSandbox/readinessas well["unelevated"]case where elevated is disallowed