feat(sdk): probe denial capture support - #778
Merged
Merged
Conversation
Expose captureDenials as a typed ProcessContainer capability when the host can create a PSEC environment and start a Learning Mode trace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5bfbefb-3948-452d-a03e-445a179c7352 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Carlos Alexandro Becker (caarlos0)
requested a review
from a team
as a code owner
August 8, 2026 02:05
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Carlos Alexandro Becker (caarlos0)
August 8, 2026 02:05
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes denial-capture availability through the Rust SDK’s backend capability probe.
Changes:
- Adds and re-exports
BackendCapability. - Probes Windows denial-capture support.
- Documents capability discovery and schema requirements.
Show a summary per file
| File | Description |
|---|---|
src/backends/appcontainer/common/src/base_container_runner.rs |
Adds the denial-capture host probe. |
src/core/mxc_engine/src/probe.rs |
Reports backend capabilities. |
src/core/mxc_engine/src/lib.rs |
Exports capability types. |
src/core/mxc-sdk/src/lib.rs |
Re-exports capabilities publicly. |
src/core/mxc-sdk/README.md |
Documents capability probing. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
Do not cache transient Learning Mode trace startup failures so later available_backends calls can retry the capability probe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5bfbefb-3948-452d-a03e-445a179c7352 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copilot started reviewing on behalf of
Carlos Alexandro Becker (caarlos0)
August 10, 2026 12:33
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/backends/appcontainer/common/src/base_container_runner.rs:509
- This still makes the new capability probe depend on
is_process_security_environment_usable(), whoseOnceLock<bool>permanently caches a failedCreateProcessSecurityEnvironmentcall. A transient PSEC creation failure therefore suppressesCaptureDenialsfor every lateravailable_backends()call, even though the capture-specific probe is now retried and the public probe says it is not cached. Please avoid caching negative PSEC results (while keeping tier and capability probing consistent), so a later call can recover.
if !Self::is_process_security_environment_usable() {
return false;
}
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Copilot started reviewing on behalf of
Carlos Alexandro Becker (caarlos0)
August 10, 2026 12:36
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/core/mxc_engine/src/probe.rs:342
- This assertion runs a second independent, uncached
StartLearningModeTraceprobe. A transient failure between the call insideavailable_backends()and this call can therefore make the values differ even though the production behavior is correct (and the probe is intentionally retried on later calls). Please test this mapping with an injected/fixed probe result instead of comparing two live host probes.
assert_eq!(
process_container
.capabilities
.contains(&BackendCapability::CaptureDenials),
BaseContainerRunner::is_capture_denials_usable()
);
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Document the deliberate retry behavior and pass the denial-capture probe result into backend assembly so tests do not start a second live trace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5bfbefb-3948-452d-a03e-445a179c7352 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copilot started reviewing on behalf of
Carlos Alexandro Becker (caarlos0)
August 10, 2026 17:09
View session
Soham Das (SohamDas2021)
self-requested a review
August 10, 2026 17:50
Soham Das (SohamDas2021)
approved these changes
Aug 10, 2026
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.
📖 Description
Expose
captureDenialsthrough the Rust SDK's existingavailable_backends()host-capability probe.ProcessContainer reports
BackendCapability::CaptureDenialsonly after the host successfully creates a minimal PSEC environment and starts a Learning Mode trace. The probe session is immediately discarded. This remains advisory; launch still returnsErrorCode::BackendUnavailableif support changes before execution.🔗 References
No linked issue.
🔍 Validation
cargo test -p mxc_engine -p mxc-sdkcargo clippy -p mxc_engine -p mxc-sdk --all-targets -- -D warningscargo test -p mxc_engine probe::testscargo clippy -p mxc_engine --all-targets -- -D warnings✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHubActions build; it runs on merge to
main, and Microsoft reviewers with write access can trigger iton a PR with
/azp run. See docs/pull-requests.md.If the
dependency-feed-checkcheck fails on a new dependency, the crate must be added tothe feed before the PR can pass. See docs/pull-requests.md
for the steps.
Microsoft Reviewers: Open in CodeFlow