Skip to content

Handle disabled Windows sandbox accounts during cleanup - #46333

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/801bec408a27ac85ccdc3eb5ca2bdb2ccb3d5827
Sep 18, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Handle disabled Windows sandbox accounts during cleanup

Why

Cleanup needs fresh logon tokens for sandbox accounts that may already be disabled. Temporarily enabling those accounts must leave a durable obligation to disable them again if the service exits unexpectedly.

What changed

  • Persist cleanup_logon_pending before enabling an account, then disable it again after the logon attempt before clearing the marker.
  • Recover pending account disables before owner restoration or IPC admission, validating account SIDs before restoration. Block runtime readiness and provisioning while recovery is pending, and defer retirement until cleanup logons are prepared.
  • Include the blocking logon details in cleanup timeout errors and suppress repeated identical cleanup errors in the Windows event log.

Testing

Add receipt tests covering backward-compatible defaults and pending cleanup state surviving serialization, blocking readiness and owner admission until cleared.

## Why

Cleanup needs fresh logon tokens for sandbox accounts that may already be disabled. Temporarily enabling those accounts must leave a durable obligation to disable them again if the service exits unexpectedly.

## What changed

- Persist `cleanup_logon_pending` before enabling an account, then disable it again after the logon attempt before clearing the marker.
- Recover pending account disables before owner restoration or IPC admission, validating account SIDs before restoration. Block runtime readiness and provisioning while recovery is pending, and defer retirement until cleanup logons are prepared.
- Include the blocking logon details in cleanup timeout errors and suppress repeated identical cleanup errors in the Windows event log.

## Testing

Add receipt tests covering backward-compatible defaults and pending cleanup state surviving serialization, blocking readiness and owner admission until cleared.

GitOrigin-RevId: 801bec408a27ac85ccdc3eb5ca2bdb2ccb3d5827
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/801bec408a27ac85ccdc3eb5ca2bdb2ccb3d5827 branch from eac997c to fd875b1 Compare September 18, 2026 00:36
@copyberry
copyberry Bot merged commit fd875b1 into main Sep 18, 2026
@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.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/801bec408a27ac85ccdc3eb5ca2bdb2ccb3d5827 branch September 18, 2026 00:36
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 18, 2026
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.

1 participant