[PR #3399] [CLOSED] [Other] preserve Windows child identity after adopting user defaults #4616

Closed
opened 2026-11-07 15:37:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3399
Author: @midhatn
Created: 10/20/2026
Status: ❌ Closed

Base: main ← Head: codex/windows-default-dacl-20261020


📝 Commits (1)

  • 841476c [Other] preserve Windows child identity after adopting user defaults

📊 Changes

2 files changed (+58 additions, -1 deletions)

View changed files

📝 strata_control/private_files.py (+4 -1)
➕ tests/terminal/test_default_object_access.py (+54 -0)

📄 Description

Implemented upstream; closing this PR as ported. Strata incorporated the token-default FA → GA correction and this PR's exact child-identity/ownership-record regression in commit e2e99ae5, released in v0.2.7. The same commit includes kossum's complementary QoS regression from #3428 and credits both contributors; the maintainer confirmed the port.

Source inspection at current main 870aedd9e1ebe1c91f94da93b59af17729f6c5c0 confirms the production correction is present and tests/terminal/test_default_object_access.py is byte-identical to this PR's test. This is source and attribution verification, not a new runtime test. This PR itself is being closed unmerged; its original description and validation remain below.


Problem and result

On Windows, serve.server.main() calls adopt_user_defaults() before starting children. Its token-default DACL grants FA (FILE_ALL_ACCESS), but that default also applies to new process objects. The file access mask omits PROCESS_QUERY_LIMITED_INFORMATION, so a live child can become unreadable to procs.start_token() and its ownership record cannot be written.

This surfaced as two lifecycle failures after an earlier test entered main(). The same lifecycle tests passed alone. A new isolated regression reproduces the actual cause: adopt the defaults, start a real sleeping child, and try to identify and record it.

Use GA in the token default so Windows maps the access mask for each newly created object type. The existing principals—current user, SYSTEM and Administrators—are unchanged. File-specific ACL code still uses file rights.

Discovered while checking the current release for #1493, but this fix is independent of adaptive inference and changes no model behavior. I searched open and closed items for default DACL, adopt_user_defaults, and child/access-denied reports before opening this.

Approach

One access-mask correction plus a Windows-only regression in a disposable interpreter. The test does not change the test runner's token defaults and always stops its own child.

References used for the correction:

Validation

Windows 11, Python 3.11. Base c093ac263f8175307e67b7fd7eeeaa2e73ceaded; fixed revision 841476cdcc566dcdcf750121ef235749efc06375.

Passed:

  • New regression on the fixed revision: live child identified and recorded.
  • Combined new regression, tests/terminal/test_private_files.py, tests/terminal/test_procs.py, and serve.test_lifeline: 27 tests run, 24 passed, 3 platform skips, in 7.226 seconds.
  • git diff --check.

The new regression can be run with python -m unittest discover -s tests/terminal -p test_default_object_access.py -v. The combined run used unittest discovery for the three terminal files plus serve.test_lifeline, with TEMP/TMP in a private directory declared under STRATA_STATE_DIR.

Failed:

  • Expected before-fix regression on the unchanged base: live child became unreadable after adopting user defaults.
  • An initial private-file test run under a shared, non-profile temporary directory had one failed assertion and two errors because that fixture did not meet those tests' private-inheritance/repair-root assumptions. Repeating under a private declared state root passed; no repair boundaries were relaxed.

Not run:

  • Full repository suite on this public branch, model inference, Linux/macOS, CUDA/HIP/SYCL builds. No native engine files changed.

Limits

This restores access for the same existing token-default principals; it does not grant access to other users or bypass ownership verification. It does not establish a model performance gain or general adaptive-runtime qualification.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3399 **Author:** [@midhatn](https://github.com/midhatn) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/windows-default-dacl-20261020` --- ### 📝 Commits (1) - [`841476c`](https://github.com/Niko1221/Strata/commit/841476cdcc566dcdcf750121ef235749efc06375) [Other] preserve Windows child identity after adopting user defaults ### 📊 Changes **2 files changed** (+58 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `strata_control/private_files.py` (+4 -1) ➕ `tests/terminal/test_default_object_access.py` (+54 -0) </details> ### 📄 Description **Implemented upstream; closing this PR as ported.** Strata incorporated the token-default `FA` → `GA` correction and this PR's exact child-identity/ownership-record regression in [commit `e2e99ae5`](https://github.com/Niko1221/Strata/commit/e2e99ae54aae9a5a28938223679ab9a5ec4ef33c), released in v0.2.7. The same commit includes kossum's complementary QoS regression from #3428 and credits both contributors; the [maintainer confirmed the port](https://github.com/Niko1221/Strata/pull/3428#issuecomment-6445917772). Source inspection at current main `870aedd9e1ebe1c91f94da93b59af17729f6c5c0` confirms the production correction is present and `tests/terminal/test_default_object_access.py` is byte-identical to this PR's test. This is source and attribution verification, not a new runtime test. This PR itself is being closed unmerged; its original description and validation remain below. --- ## Problem and result On Windows, `serve.server.main()` calls `adopt_user_defaults()` before starting children. Its token-default DACL grants `FA` (`FILE_ALL_ACCESS`), but that default also applies to new process objects. The file access mask omits `PROCESS_QUERY_LIMITED_INFORMATION`, so a live child can become unreadable to `procs.start_token()` and its ownership record cannot be written. This surfaced as two lifecycle failures after an earlier test entered `main()`. The same lifecycle tests passed alone. A new isolated regression reproduces the actual cause: adopt the defaults, start a real sleeping child, and try to identify and record it. Use `GA` in the **token default** so Windows maps the access mask for each newly created object type. The existing principals—current user, SYSTEM and Administrators—are unchanged. File-specific ACL code still uses file rights. ## Related discussion Discovered while checking the current release for #1493, but this fix is independent of adaptive inference and changes no model behavior. I searched open and closed items for `default DACL`, `adopt_user_defaults`, and child/access-denied reports before opening this. ## Approach One access-mask correction plus a Windows-only regression in a disposable interpreter. The test does not change the test runner's token defaults and always stops its own child. References used for the correction: - [Microsoft: process security and access rights](https://learn.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights): default process ACLs come from the creator's token; limited process queries require `0x1000`. - [Microsoft: ACE strings](https://learn.microsoft.com/en-us/windows/win32/secauthz/ace-strings): `FA` is file-all access; `GA` is generic-all access. ## Validation Windows 11, Python 3.11. Base `c093ac263f8175307e67b7fd7eeeaa2e73ceaded`; fixed revision `841476cdcc566dcdcf750121ef235749efc06375`. **Passed:** - New regression on the fixed revision: live child identified and recorded. - Combined new regression, `tests/terminal/test_private_files.py`, `tests/terminal/test_procs.py`, and `serve.test_lifeline`: 27 tests run, 24 passed, 3 platform skips, in 7.226 seconds. - `git diff --check`. The new regression can be run with `python -m unittest discover -s tests/terminal -p test_default_object_access.py -v`. The combined run used `unittest` discovery for the three terminal files plus `serve.test_lifeline`, with TEMP/TMP in a private directory declared under STRATA_STATE_DIR. **Failed:** - Expected before-fix regression on the unchanged base: `live child became unreadable after adopting user defaults`. - An initial private-file test run under a shared, non-profile temporary directory had one failed assertion and two errors because that fixture did not meet those tests' private-inheritance/repair-root assumptions. Repeating under a private declared state root passed; no repair boundaries were relaxed. **Not run:** - Full repository suite on this public branch, model inference, Linux/macOS, CUDA/HIP/SYCL builds. No native engine files changed. ## Limits This restores access for the same existing token-default principals; it does not grant access to other users or bypass ownership verification. It does not establish a model performance gain or general adaptive-runtime qualification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:37:51 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4616
No description provided.