You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the proposed design for explicit opt-in Windows ProcessContainer service enumeration through processContainer.services.enumerateVisible in the development contract (1.1.0-alpha).
The spec is at docs/development/architecture/designs/1900-services-enumeration/README.md.
Only explicit enumerateVisible: true adds permission. Omitted, empty, and false policies add none.
Any present services section, including {}, requires native Windows ProcessContainer and PSEC 1.3; unsupported hosts/backends reject it.
Published contracts and typed V1 SDK requests retain their existing PSEC version-selection rules and receive no implicit grant.
Existing V1.Dev JSON APIs can carry development-contract services without new signatures; nonempty-observation preparation preserves services presence/value and prospective PSEC. Empty-observation preparation returns valid, authorized JSON unchanged without establishing host compatibility.
Request-aware probes check PSEC 1.3 through the shared launch-eligibility decision. The version guarantee is limited to explicit services; bare probes report generic availability and launch still validates its selected PSEC version.
Direct native in-process PTY remains unsupported. Node V1.Dev already supports executor-backed ConPTY; policy refusal appears in terminal output and exit status after executor startup. Policy hashes represent explicit request intent, without a host-resolved default.
Backend delivery requires real-host PSEC 1.3 enforcement, older-host version rejection, and injected creation-refusal coverage. Management-denial checks require successful unsandboxed BITS/SCM access controls and sandbox ERROR_ACCESS_DENIED, without service mutation. Real feature-disabled coverage is explicitly unverified until the OS team supplies a build/image or supported provisioning procedure; a skip is not passing evidence.
This PR is documentation-only and does not change public SDK signatures. The proposal remains pending maintainer acceptance and design approval; implementation PR #1868 must not merge before this spec is approved and merged.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The specification has conflicting enumeration defaults and PSEC compatibility guarantees, promises unsupported PTY behavior, and leaves host-resolved audit hashing and required Windows test gates unresolved.
Adds a proposed design for Windows service enumeration in MXC’s native ProcessContainer backend. This is a specification-only change; it does not implement the feature or change published SDK APIs.
Changes:
Proposes processContainer.services.enumerateVisible in the development contract, mapped to Windows PSEC 1.3.
Defines host-dependent defaults, backend restrictions, compatibility expectations, and security behavior.
Outlines acceptance criteria, Windows validation, and delivery milestones.
Vsevolod (beervoley)
changed the title
User/vsiliush/spec services enumeration
[Spec]: Update sandbox configuration schema to allow services enumeration
Dec 1, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The spec requires a nonexistent ProcessContainer fallback and misstates V1.Dev compatibility, with missing validation for services preservation and prospective PSEC reproduction.
[P2] The public V1.Dev JSON APIs already accept development-contract requests, so callers can express services without contract promotion (see docs/api-reference/{rust,dotnet,node}/v1/dev.md). Distinguish those callers from unchanged typed V1 inputs here and in the other compatibility claims, including lines 62–65 and 165–166. Include V1.Dev execution and policy preparation in validation, checking that preparation preserves services values and section presence and reproduces the prospective PSEC.
Refs #1900. Preserve the design approval gate and name the spec folder for its tracking issue.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2681ffd7-9999-40c1-b6bc-6d1b7f87bc3c
Addressed the five review comments in e189b39 and 0f16097: service enumeration is now explicitly opt-in (including empty-object behavior); published callers retain existing PSEC version selection; PTY is unsupported; policy identity no longer depends on a host-resolved default; and functional Windows coverage is part of backend delivery rather than a follow-up. Created tracking issue #1900 and renamed the spec folder accordingly. Maintainer acceptance and design approval remain pending.
Refs #1900. Mark AppContainer fallback not applicable and specify native PSEC availability and version rejection instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2681ffd7-9999-40c1-b6bc-6d1b7f87bc3c
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The documentation misleadingly implies probing detects unsupported PSEC 1.3, although the unchanged probe does not validate the requested version and rejection occurs at launch.
Also addressed the previously missed V1.Dev finding from review 6158786872 in cc61587. The compatibility, non-goals, API, acceptance, and delivery sections now distinguish unchanged typed V1 inputs from existing Rust/.NET/Node V1.Dev JSON APIs, with links to all three references; no SDK signature change or contract promotion is needed to submit development services. The validation plan now explicitly includes Dev execution and nonempty-observation preparation. Implementation commit 479f3f9 exercises public Rust Dev preparation removing registryRead, preserves omission/empty/false/true distinctly, compares the resulting PSEC with native submission and backend execution, and verifies unsupported requests do not create or launch. Maintainer acceptance/design approval and the PSEC 1.3-enabled/feature-disabled host results remain outstanding.
The reason will be displayed to describe this comment to others. Learn more.
Summary
Requesting revisions to the proposed validation plan and the policy-preparation semantics. Findings 1-6 are posted inline; the claim-only corrections in 3 and 5 are nonblocking by themselves.
Verified against head cc615879081f72b086d2cca93cd623d8849a393b and PR merge-base dcb23e53344faf882560d3751dc6bd8a936e1e44.
Verified scope
The diff adds only the 263-line design document: no implementation, public SDK signature, released schema, or existing CI gate is modified. Runtime implementation and successful PSEC 1.3 host validation remain later delivery work; neither was required or claimed as completed in this review.
Findings outside the diff
None. All six comments anchor to added specification lines.
Verified pre-existing - not attributed to this PR
The supporting Node PTY route, empty-observation preparation no-op, baseline probe/version-query split, and existing cleanup/test harness are byte-identical between merge-base and head. They are context, not old-code defects or independent merge conditions. In particular, Node's PTY route is documented in docs/api-reference/node/v1/dev.md:70-76, and the preparation exception is explicit in docs/development/architecture/designs/1634-creation-policy-correction/README.md:109-114. The requested changes concern this proposal's new claims, interactions, and validation criteria.
The reason will be displayed to describe this comment to others. Learn more.
Medium (testability / test coverage) - 1. Separate real-host coverage from injected refusal coverage.
Attribution:introduced_by_change - the new required matrix promises a feature-disabled host without establishing how that state can be provisioned.
The PSEC 1.3 build/CI host is still an open question, and the spec does not identify a supported way to obtain the OS-feature-disabled state. We should not assume a feature toggle exists or require one machine to support all three states. Generic base-container availability also does not establish those states.
Requested change: distinguish the required real-host enforcement run, older-host version rejection, and injected creation-refusal tests. State how any real feature-disabled scenario would be provisioned, or explicitly record it as unverified until the OS team supplies that mechanism. Keep required execution distinct from a successful skip. This asks for a feasible coverage plan, not three already-configured CI cells or completed implementation tests.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f. The plan now separates required real-host PSEC 1.3 enforcement, older-host version rejection, and injected creation-refusal coverage. It explicitly requires recorded build/version-query/enforcement results, allows separate hosts or images, and does not infer a feature toggle from generic availability. Real feature-disabled coverage is marked unverified until the OS team provides a specific build/image or supported configuration procedure. Missing prerequisites and skips cannot satisfy required execution.
The reason will be displayed to describe this comment to others. Learn more.
Medium (reliability / testability) - 2. Distinguish creation refusal from version rejection.
Attribution:introduced_by_change - the proposal adds a creation-time refusal case but does not state an assertion proving that creation was reached.
A failed launch with no workload execution also occurs when an older host rejects PSEC 1.3 before CreateProcessSecurityEnvironment. That result alone does not cover the separate Windows creation-refusal path described here.
Requested change: add a planned injected regression where the version query accepts 1.3, creation receives the services policy and returns a failure, and MXC propagates it without launching work or retrying with the policy removed. Existing src/mxc-sdk/src/backends/process_container/common/policy_preparation_backend_tests.rs:78-120 exercises injected creation HRESULTs through public spawn_json, so this does not require a feature-disabled physical host. This is a coverage assertion, not a claim that the current implementation downgrades policy.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f with a distinct planned injected creation-refusal regression: accept PSEC 1.3 in the version query, capture the unchanged services policy in the PSEC received by CreateProcessSecurityEnvironment, return a known failing HRESULT, and assert exactly one creation call, propagated HRESULT/operation context, no workload, and no retry with services removed or disabled. The spec explicitly distinguishes this MXC error-propagation test from older-host rejection and from real feature-disabled OS enforcement.
The reason will be displayed to describe this comment to others. Learn more.
Medium (correctness) - 3. Account for Node's existing executor-backed PTY route.
Attribution:claim_mismatch - the new blanket PTY exclusion conflicts with an existing supported SDK route; this is nonblocking by itself.
Direct native ProcessContainer PTY is unsupported, but Node V1.Dev spawnWithPtyJson forwards ProcessContainer JSON to wxc-exec under ConPTY (sdk/node/src/v1/dev/index.ts:235-251; sdk/node/src/bindings/process-container-pty.ts:140-176,229-236). That route can carry the new field once shared parsing and creation support it, without a new API.
Requested change: distinguish native in-process PTY from Node's executor-backed mode and include services enforcement on the latter. Preserve its documented failure contract: the promise resolves at executor startup, while later policy refusal appears in terminal output and exit status (docs/api-reference/node/v1/dev.md:70-76). This does not ask to add PTY support.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f. The execution table now distinguishes unsupported direct native in-process PTY from the existing Node V1.Dev spawnWithPtyJson -> wxc-exec/ConPTY route. The spec preserves resolution at executor startup and later policy refusal via combined terminal output/nonzero exit, not Promise rejection. The validation plan includes services enforcement on this route and an older-host refusal case with an absent workload sentinel; it does not add PTY support.
The reason will be displayed to describe this comment to others. Learn more.
Medium (correctness) - 4. Preserve empty-observation preparation as a no-op.
Attribution:newly_exposed_by_change - the new services host requirement is stated for every V1.Dev API without preserving the existing preparation exception.
With empty observations, preparation returns valid, authorized request JSON unchanged and skips backend serviceability (src/mxc-sdk/src/core/mxc_engine/policy_preparation.rs:34-55). The accepted preparation design explicitly says this is not validation or approval (docs/development/architecture/designs/1634-creation-policy-correction/README.md:109-114). After services JSON is accepted, that no-op can therefore return a services request on an older host even though execution correctly rejects it.
Requested change: state that empty-observation preparation preserves the JSON, including services, without providing a host-compatibility result. Scope candidate compatibility checks to nonempty-observation preparation; execution still checks launch eligibility. Add the empty-observation regression alongside the proposed nonempty case.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f. Empty observations are now explicitly a no-op after contract/phase/authorization checks: JSON remains byte-for-byte unchanged, including services, without backend serviceability checks or host approval. Candidate compatibility checks are scoped to nonempty observations, and execution always rechecks eligibility. Added planned empty-observation regressions for all four services shapes with missing/pre-1.3/1.3 version-query configurations, followed by execution rejection where appropriate; linked the accepted preparation design.
The reason will be displayed to describe this comment to others. Learn more.
Medium (correctness) - 5. Bound the probe's version-compatibility guarantee.
Attribution:claim_mismatch - the new general guarantee exceeds the existing probe behavior if the proposed version query is added only for present services sections; this is nonblocking by itself.
For requests omitting services, the current shared decision checks native API availability, while launch separately queries the selected PSEC version (src/mxc-sdk/src/backends/process_container/common/base_container_runner.rs:489-529,634-647,673). The probe explicitly disclaims launch-time PSEC version validation (src/mxc-sdk/src/backends/process_container/common/probe.rs:99-104). Adding only a services-specific 1.3 check does not establish version compatibility for every supplied configuration.
Requested change: either narrow this sentence to compatibility with an explicit services section, or explicitly specify and test a shared selected-version check for all request-aware probes. Keep bare probing unchanged. The existing split is context; the attributable issue is the new guarantee.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f by narrowing the guarantee, not broadening runtime probing. Success for a request with an explicit services section establishes support for that section's PSEC 1.3 requirement only. The spec now states that requests omitting services keep existing probe behavior and launch separately validates the selected PSEC version. Bare probing remains generic and unchanged.
The reason will be displayed to describe this comment to others. Learn more.
Medium (testability / test coverage) - 6. Give management denial a discriminating baseline.
Attribution:introduced_by_change - the new functional acceptance criterion specifies denial without a concrete valid operation or expected error.
An arbitrary nonzero exit could mean missing tooling, a nonexistent service, or a service ACL that already denies the test identity. Such a result does not establish that the new enumeration permission remains separate from management access.
Requested change: name a management operation or access check on a known service, establish that it is available and permitted for the unsandboxed test identity, then assert the expected access-denied result in the enumeration-enabled sandbox. The spec needs that test oracle, not a complete service-fixture implementation.
The reason will be displayed to describe this comment to others. Learn more.
Addressed in b44347f with a concrete, non-mutating oracle: require installed BITS and successful unsandboxed OpenSCManagerW(SC_MANAGER_CREATE_SERVICE) plus OpenServiceW(BITS) with SERVICE_CHANGE_CONFIG/START/STOP for the same elevated test identity. Close handles without changing services. In the enumeration-enabled sandbox, require enumeration success and management ERROR_ACCESS_DENIED (5), including a denied SCM connection as the prerequisite denial for dependent service opens. Missing service/tooling, unrelated errors, or a failed host positive control do not count as passing denial coverage.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The security-sensitive token-permission design still requires maintainer and OS-team confirmation of PSEC 1.3 enforcement semantics, supported Windows builds, and CI provisioning to validate feature-disabled behavior.
The reason will be displayed to describe this comment to others. Learn more.
Verified the updated specification at b44347f against all six findings from my previous review. All six are addressed: the coverage plan separates real-host enforcement from injected refusal testing, the failure assertions are explicit, and the existing PTY, empty-observation preparation, and probe semantics are preserved. No remaining blocker from that review. This is specification approval; implementation and PSEC 1.3 host validation remain delivery requirements.
This branch has not been deployed
No deployments
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
Feature-Spec-In-ReviewLabel for feature spec PRs that are currently in reviewNeeds-AttentionRequires attention or a decision from the MXC maintainers.
5 participants
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.
Description
Adds the proposed design for explicit opt-in Windows ProcessContainer service enumeration through
processContainer.services.enumerateVisiblein the development contract (1.1.0-alpha).The spec is at
docs/development/architecture/designs/1900-services-enumeration/README.md.enumerateVisible: trueadds permission. Omitted, empty, and false policies add none.{}, requires native Windows ProcessContainer and PSEC 1.3; unsupported hosts/backends reject it.This PR is documentation-only and does not change public SDK signatures. The proposal remains pending maintainer acceptance and design approval; implementation PR #1868 must not merge before this spec is approved and merged.
References
Refs #1900
Implementation: #1868
Validation
Documentation-only changes; reviewed for consistency with the opt-in behavior and review comments.
Checklist
feature-acceptedIssue Type
Feature