Skip to content

Split Windows sandbox cleanup into preparation and completion phases - #45178

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a32663171bce027f771f738d71b0c46404edbedc
Sep 13, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a32663171bce027f771f738d71b0c46404edbedc

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Split Windows sandbox cleanup into preparation and completion phases

What changed

Expose prepare_packaged_windows_sandbox_cleanup to disable sandbox accounts and stop their processes before returning a PreparedWindowsSandboxCleanup guard that retains the setup lock. Its finish method removes resources and protections; dropping it only releases the lock, leaving accounts disabled and protections intact.

Keep clean_up_packaged_windows_sandbox as a wrapper around both phases, and extract the service's existing package cleanup logic into a dedicated module.

…45178)

## What changed

Expose `prepare_packaged_windows_sandbox_cleanup` to disable sandbox accounts and stop their processes before returning a `PreparedWindowsSandboxCleanup` guard that retains the setup lock. Its `finish` method removes resources and protections; dropping it only releases the lock, leaving accounts disabled and protections intact.

Keep `clean_up_packaged_windows_sandbox` as a wrapper around both phases, and extract the service's existing package cleanup logic into a dedicated module.

GitOrigin-RevId: a32663171bce027f771f738d71b0c46404edbedc
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a32663171bce027f771f738d71b0c46404edbedc branch from e93639b to a4c61af Compare September 13, 2026 06:15
@copyberry
copyberry Bot merged commit a4c61af into main Sep 13, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a32663171bce027f771f738d71b0c46404edbedc branch September 13, 2026 06:15
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 13, 2026

This branch was successfully deployed

1 active deployment
issue-triage — a4c61aff Deployed Sep 13, 2026 by ARTHUR-BBU via Generate label suggestions #45125
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants