Skip to content

Run Windows session ACL operations asynchronously - #651

Open
sylvesterkaczmarek wants to merge 1 commit into
anthropics:mainfrom
sylvesterkaczmarek:fix/windows-acl-async-647
Open

sylvesterkaczmarek wants to merge 1 commit into
anthropics:mainfrom
sylvesterkaczmarek:fix/windows-acl-async-647

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #647.

Windows initialization and reset run session ACL subprocesses synchronously. A slow grant, stamp or cleanup blocks the embedding process's event loop for up to the 60-second subprocess timeout, interrupting unrelated heartbeats and requests.

Add asynchronous grant, stamp, revoke and restore helpers using the existing asynchronous subprocess runner. Await them during initialization, rollback and normal reset, preserving operation order, error codes, timeouts and per-path cleanup diagnostics.

Serialize initialization and reset so teardown cannot clear the session identity during an outstanding ACL operation. Keep synchronous cleanup for the process exit handler, where Node cannot await promises. Existing synchronous public helpers remain available.

Validation

  • Eight lifecycle tests use real delayed subprocesses to check responsiveness, ordering, rollback and cleanup diagnostics, concurrent reset, reinitialization and process exit. Seven fail on the original code; the exit control passes.
  • Windows-wrapper and public-export suites: 44 passed, 65 platform-specific skips, 0 failures.
  • Build, source and test typechecking, changed-file ESLint, Prettier and git diff --check passed.
  • Native Windows ACL enforcement was not exercised on the Linux test host.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@sylvesterkaczmarek

sylvesterkaczmarek commented Oct 7, 2026 •

Copy link
Copy Markdown
Author

Refreshed onto current main and updated the lifecycle fixture for the new literal-path input type. Build, source/test typechecking, lint and formatting pass; the Windows-wrapper/export suite passes 45 tests with 64 platform skips on macOS. The eight lifecycle cases use real delayed subprocesses; native Windows ACL enforcement is not claimed from that local run. Could you review the refreshed head? The current Tests workflow requires maintainer approval: https://github.com/anthropics/sandbox-runtime/actions/runs/37550153813.

@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix/windows-acl-async-647 branch from df584ee to 5a01b5c Compare October 7, 2026 00:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: initialize() runs srt-win acl grant/stamp/restore via spawnSync, blocking the host event loop for up to 60s

1 participant