mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3399] [CLOSED] [Other] preserve Windows child identity after adopting user defaults #4616
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4616
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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→GAcorrection and this PR's exact child-identity/ownership-record regression in commite2e99ae5, 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
870aedd9e1ebe1c91f94da93b59af17729f6c5c0confirms the production correction is present andtests/terminal/test_default_object_access.pyis 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()callsadopt_user_defaults()before starting children. Its token-default DACL grantsFA(FILE_ALL_ACCESS), but that default also applies to new process objects. The file access mask omitsPROCESS_QUERY_LIMITED_INFORMATION, so a live child can become unreadable toprocs.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
GAin 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:
0x1000.FAis file-all access;GAis generic-all access.Validation
Windows 11, Python 3.11. Base
c093ac263f8175307e67b7fd7eeeaa2e73ceaded; fixed revision841476cdcc566dcdcf750121ef235749efc06375.Passed:
tests/terminal/test_private_files.py,tests/terminal/test_procs.py, andserve.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 usedunittestdiscovery for the three terminal files plusserve.test_lifeline, with TEMP/TMP in a private directory declared under STRATA_STATE_DIR.Failed:
live child became unreadable after adopting user defaults.Not run:
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.