Skip to content

Fix Windows renderer staging ACL inheritance - #2734

Draft
kingbentley wants to merge 1 commit into
bmad-code-org:mainfrom
kingbentley:agent/fix-windows-render-staging-acl
Draft

Fix Windows renderer staging ACL inheritance#2734
kingbentley wants to merge 1 commit into
bmad-code-org:mainfrom
kingbentley:agent/fix-windows-render-staging-acl

Conversation

@kingbentley

Copy link
Copy Markdown

Summary

  • create renderer staging directories with inherited ACLs on Windows
  • preserve tempfile.mkdtemp() and private 0700 behavior on non-Windows platforms
  • add focused tests for platform selection, entropy, collision retries, exhaustion, and unexpected filesystem errors
  • register the new tests in the existing test:renderer quality path

Root cause

Python 3.11.10 and newer specially handle mkdir(..., 0o700) on Windows by creating a protected ACL for the owner, SYSTEM, and administrators. tempfile.mkdtemp() uses that mode. In a restricted sandbox, the protected ACL drops inherited workspace principals, so the renderer can create its staging directory but is denied when writing the first snapshot file.

Impact

Sandboxed Windows rendering can publish immutable workflow snapshots without requiring an unsandboxed workaround. Existing atomic rename, concurrent-winner verification, cleanup, destination layout, and POSIX security behavior remain unchanged.

Validation

  • npm ci
  • npm run quality under WSL with Node 22.23.2 and uv 0.12.4 — passed
  • renderer suite within quality: 15/15 Python tests and 24/24 integration tests passed
  • consumer-project sandbox verification: renderer completed and the emitted workflow.md was readable from a separate sandboxed process

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.

1 participant