Add Win32 worker factory and broker identity binding#48
Merged
Conversation
Owner
Author
|
Quality rerun passed on commit 96cf53a: 242 Python tests passed (1 expected skip), frontend type/lint/unit/build checks passed, launcher-managed bundle verification passed, and the Windows package build passed. The PR remains ready for review. Provider execution is still gated on the signed installed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This stage implements the concrete Windows launch and broker-identity controls that PR #47 deliberately left behind:
NativeWin32ProcessFactory, which creates the fixed worker suspended in a unique zero-capability AppContainerNativeBrokerIdentityBinder, which opens the protected named pipe only after the worker PID and AppContainer SID are knownWhy this matters
The launcher now exercises the real construction order:
create suspended -> apply/query Job policy -> bind live PID/AppContainer identity -> resumeThere is no subprocess, shell, stdio, weaker-sandbox, or host-process fallback.
Validation
python -m pytest -q— 242 passed, 1 skippedfindstr.exechildpython -m ruff check ...— passedpython -m compileall -q ...— passedpython tools/generate_contracts.py— passedgit diff --check— passedCI correction
The first Quality run failed because Python 3.11 on the GitHub Windows runner does not expose
ctypes.wintypes.HRESULT; the local Python 3.14 environment did. The adapter now uses the ABI-correctctypes.c_longfor HRESULT return values. The focused Win32 tests and complete local suite pass after that correction.Remaining release gate
Provider execution is still intentionally disabled. The signed installed
recipe_worker.exegeneration and the worker-side native broker client loop still must be wired and run end-to-end through authenticated input/output, watchdog, cancellation, hostile decoder, artifact publication, and cleanup tests. External security review and lifecycle enablement remain required afterward.The pre-existing
Cortex.pyprojedit is intentionally not included.