Separate Windows sandbox provisioning from ACL refresh (#42309)

## What changed

- Limit elevated interactive setup to provisioning sandbox identities and proxy settings; do not include caller workspace or ACL roots in its payload.
- Always run the non-elevated setup refresh during sandbox activation so the current permission profile supplies read, write, and deny paths, including when provisioning was completed previously.
- Add an `interactive-provision` setup mode that performs provisioning without the full ACL setup path.

## Testing

- Verify elevated provisioning payloads contain no caller ACL roots and use the new mode.
- Verify the setup helper accepts `interactive-provision` payloads.

GitOrigin-RevId: 081b1b43abd2388773c230fb35da82896e7be2ea
This commit is contained in:
iceweasel-oai authored and copyberry committed 2026-09-02 16:49:45 +00:00
1 parent fc953e5234
commit 1bc8fb16ae
6 files changed
+124 -83

No files matched your search

+1 -12
View File
@@ -1780,22 +1780,11 @@ impl App {
let codex_home = self.config.codex_home.clone();
let tx = self.app_event_tx.clone();
// If the elevated setup already ran on this machine, don't prompt for
// elevation again - just flip the config to use the elevated path.
if crate::windows_sandbox::sandbox_setup_is_complete(codex_home.as_path()) {
tx.send(AppEvent::EnableWindowsSandboxForAgentMode {
preset,
mode: WindowsSandboxEnableMode::Elevated,
profile_selection,
});
return Ok(AppRunControl::Continue);
}
self.chat_widget.show_windows_sandbox_setup_status();
self.windows_sandbox.setup_started_at = Some(Instant::now());
let session_telemetry = self.session_telemetry.clone();
tokio::task::spawn_blocking(move || {
let result = crate::windows_sandbox::run_elevated_setup(
let result = crate::windows_sandbox::prepare_elevated_sandbox(
&permission_profile,
workspace_roots.as_slice(),
command_cwd.as_path(),