Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3f0df3c
Finalize telemetry documentation
RamonArjona4 Aug 18, 2026
c35147a
Harden telemetry consent foundation
RamonArjona4 Aug 18, 2026
dc13cc7
Reject stale consent presenter decisions
RamonArjona4 Aug 19, 2026
f375e70
Tag WINEXT telemetry with MXC Part A
RamonArjona4 Aug 20, 2026
257c306
Make WINEXT contract test format-independent
RamonArjona4 Aug 20, 2026
b58d4f8
Request delete access for consent lock
RamonArjona4 Aug 20, 2026
e711eeb
Integrate telemetry into MXC runtime
RamonArjona4 Aug 18, 2026
435b71e
Stabilize blocking-task panic regression
RamonArjona4 Aug 19, 2026
153cb7a
Report confirmed SDK kills as cancellation
RamonArjona4 Aug 20, 2026
bd60b66
Verify WINEXT Part A fields in ETW
RamonArjona4 Aug 20, 2026
253228a
Align telemetry with the 0.8 config adapter
RamonArjona4 Aug 20, 2026
59656df
Expose telemetry through Rust SDK and C ABI
RamonArjona4 Aug 18, 2026
ed3a7c3
Merge main into telemetry runtime branch
RamonArjona4 Aug 31, 2026
cbc42ea
Fix dependency and API parity CI gates
RamonArjona4 Aug 31, 2026
944c698
Preserve telemetry sandbox attribution
RamonArjona4 Aug 31, 2026
bfb0ecb
Complete telemetry contract and lifecycle handling
RamonArjona4 Sep 1, 2026
0ad1b03
Fix telemetry lifecycle edge cases
RamonArjona4 Sep 1, 2026
ad189bb
Merge main into telemetry runtime
RamonArjona4 Sep 1, 2026
704e9e1
Consolidate Rust SDK consent APIs
RamonArjona4 Sep 2, 2026
4169b06
Consolidate telemetry runtime consent pivot
RamonArjona4 Sep 2, 2026
2e6de69
Fix telemetry propagation through FFI requests
RamonArjona4 Sep 2, 2026
34a9059
Remove consent transport versioning
RamonArjona4 Sep 2, 2026
82828cc
Merge unversioned consent transport into Rust SDK
RamonArjona4 Sep 2, 2026
2dc3c0b
Simplify consent command dispatch
RamonArjona4 Sep 2, 2026
bd9bbe6
Merge consent dispatch cleanup into Rust SDK
RamonArjona4 Sep 2, 2026
8a077c2
Fix state-aware telemetry diagnostics
RamonArjona4 Sep 2, 2026
2a6e66a
Merge state-aware telemetry diagnostics into Rust SDK
RamonArjona4 Sep 2, 2026
6826276
Harden FFI telemetry policy parsing
RamonArjona4 Sep 2, 2026
291d015
Fix piped consent smoke assertion
RamonArjona4 Sep 2, 2026
47217f9
Preserve optional backends in test FFI
RamonArjona4 Sep 2, 2026
b56814a
Merge PR 820 telemetry runtime updates
RamonArjona4 Sep 2, 2026
8879a7d
Remove non-Windows executor detail
Copilot Sep 2, 2026
c4aa355
Apply requested telemetry removals
RamonArjona4 Sep 2, 2026
55a45d1
Close telemetry ownership gaps
RamonArjona4 Sep 2, 2026
416f691
Scope smoke-test consent overrides
RamonArjona4 Sep 2, 2026
e24bf5f
Fix consent test module ordering
RamonArjona4 Sep 2, 2026
1f5ace1
Merge main into telemetry runtime
RamonArjona4 Sep 2, 2026
39347d8
Merge latest telemetry runtime updates
RamonArjona4 Sep 2, 2026
77ab5bb
Fix .NET consent review findings
RamonArjona4 Sep 2, 2026
1d62788
Satisfy async consent test analyzers
RamonArjona4 Sep 2, 2026
93de678
Scope .NET consent test overrides
RamonArjona4 Sep 2, 2026
d7e00a6
Remove duplicate telemetry policy projection
RamonArjona4 Sep 3, 2026
c2c39c6
Correct telemetry SDK guidance
RamonArjona4 Sep 3, 2026
42c0c12
Merge main into telemetry runtime
RamonArjona4 Sep 4, 2026
ab5de3c
Merge updated telemetry runtime
RamonArjona4 Sep 4, 2026
5df9226
Merge current main into telemetry runtime
RamonArjona4 Sep 4, 2026
2a12fdc
Merge updated telemetry runtime
RamonArjona4 Sep 4, 2026
c8a4595
Merge merged telemetry runtime into Rust SDK
RamonArjona4 Sep 4, 2026
614c947
Address PR 821 review feedback
RamonArjona4 Sep 5, 2026
596aa7e
Report managed telemetry query failures
RamonArjona4 Sep 5, 2026
e853782
Harden managed fail-closed diagnostics
RamonArjona4 Sep 5, 2026
78af63c
Unify managed telemetry diagnostics
RamonArjona4 Sep 5, 2026
b4fe3af
Isolate fail-closed diagnostic tracking
RamonArjona4 Sep 5, 2026
ca7546d
Cover managed telemetry query failures
RamonArjona4 Sep 5, 2026
81aae66
Make telemetry query test scope atomic
RamonArjona4 Sep 5, 2026
0a91c0b
Retry failed managed diagnostics
RamonArjona4 Sep 5, 2026
cc19864
Harden telemetry test overrides
RamonArjona4 Sep 5, 2026
1faac24
Isolate telemetry diagnostic tests
RamonArjona4 Sep 5, 2026
2d94ffd
Make telemetry override test exception-safe
RamonArjona4 Sep 5, 2026
b3b659a
Clarify bounded telemetry diagnostics
RamonArjona4 Sep 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions scripts/check-dotnet-api-parity.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -206,22 +206,21 @@ function managedJsonFields(source, className) {
});
}

// `legacyManagedOnly` lists managed JSON fields that intentionally have no Rust
// counterpart because they are deprecated compatibility aliases. They must stay
// serializable so legacy JSON round-trips, but the managed request path strips
// them before the native layer sees them.
// `managedOnly` lists managed JSON fields intentionally represented outside the
// Rust policy builder. Compatibility aliases are stripped before native parsing;
// telemetry is extracted by the FFI and applied through SandboxRequest.
function compareStructFields(
label,
rustSource,
rustName,
managedSource,
managedName,
legacyManagedOnly = []
managedOnly = []
) {
compare(
`${label} fields`,
managedJsonFields(managedSource, managedName).filter(
(field) => !legacyManagedOnly.includes(field)
(field) => !managedOnly.includes(field)
),
rustStructFields(rustSource, rustName)
);
Expand DownExpand Up@@ -312,12 +311,18 @@ for (const [
rustSource,
rustName,
managedName,
legacyManagedOnly,
managedOnly,
] of [
// `captureDenials` is an obsolete managed-only alias (MXC0001, removed in
// 1.0). Rust only accepts it under `containment.captureDenials`, and
// MxcSandbox.PrepareRequest strips it from the policy before serialization.
["sandbox policy", rustPolicy, "SandboxPolicy", "SandboxPolicy", ["captureDenials"]],
[
"sandbox policy",
rustPolicy,
"SandboxPolicy",
"SandboxPolicy",
["captureDenials", "telemetry"],
],
["filesystem policy", rustPolicy, "FilesystemSection", "FilesystemPolicy"],
["UI policy", rustPolicy, "UiSection", "UiPolicy"],
["network policy", rustNetworkPolicy, "NetworkSection", "NetworkPolicy"],
Expand All@@ -334,7 +339,7 @@ for (const [
rustName,
managedPolicy,
managedName,
legacyManagedOnly
managedOnly
);
}
const managedOneShot = [
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,12 +12,53 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants Condition="'$(MxcWithWslc)' == 'true'">$(DefineConstants);MXC_WITH_WSLC</DefineConstants>
<DefineConstants Condition="'$(MxcWithIsolationSession)' == 'true'">$(DefineConstants);MXC_WITH_ISOLATION_SESSION</DefineConstants>
<MxcSrcDir>$(MSBuildProjectDirectory)/../../../src</MxcSrcDir>
<MxcTestCargoTargetDir>$(MxcSrcDir)/target/dotnet-test-support</MxcTestCargoTargetDir>
<MxcTestCargoProfileArg Condition="'$(Configuration)' == 'Release'">--release</MxcTestCargoProfileArg>
<MxcTestCargoProfileDir Condition="'$(Configuration)' == 'Release'">release</MxcTestCargoProfileDir>
<MxcTestCargoProfileDir Condition="'$(Configuration)' != 'Release'">debug</MxcTestCargoProfileDir>
<MxcTestCargoFeatures>test-support</MxcTestCargoFeatures>
<MxcTestCargoFeatures Condition="'$(MxcWithIsolationSession)' == 'true' and $([MSBuild]::IsOSPlatform('Windows'))">$(MxcTestCargoFeatures) isolation_session</MxcTestCargoFeatures>
<MxcTestCargoFeatures Condition="'$(MxcWithWslc)' == 'true' and $([MSBuild]::IsOSPlatform('Windows'))">$(MxcTestCargoFeatures) wslc</MxcTestCargoFeatures>
<MxcTestNativeFileName Condition="$([MSBuild]::IsOSPlatform('Windows'))">mxc_ffi.dll</MxcTestNativeFileName>
<MxcTestNativeFileName Condition="$([MSBuild]::IsOSPlatform('OSX'))">libmxc_ffi.dylib</MxcTestNativeFileName>
<MxcTestNativeFileName Condition="'$(MxcTestNativeFileName)' == ''">libmxc_ffi.so</MxcTestNativeFileName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit.v3" Version="4.0.0" />
</ItemGroup>

<Target Name="BuildMxcTestSupportNativeLibrary"
AfterTargets="Build"
Condition="'$(DesignTimeBuild)' != 'true'">
<Exec Command="rustc -vV"
WorkingDirectory="$(MxcSrcDir)"
ConsoleToMSBuild="true"
StandardOutputImportance="low">
<Output TaskParameter="ConsoleOutput" ItemName="MxcTestRustcVersion" />
</Exec>
<ItemGroup>
<MxcTestRustcHostLine Include="@(MxcTestRustcVersion)"
Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').StartsWith('host: '))" />
</ItemGroup>
<PropertyGroup>
<MxcTestRustcHostLine>@(MxcTestRustcHostLine)</MxcTestRustcHostLine>
</PropertyGroup>
<Error Condition="'$(MxcTestRustcHostLine)' == ''"
Text="mxc: 'rustc -vV' reported no host triple, so the isolated test-support build cannot be pinned to this host. Ensure the Rust toolchain is installed and on PATH." />
<PropertyGroup>
<MxcTestRustHostTriple>$(MxcTestRustcHostLine.Replace('host: ', '').Trim())</MxcTestRustHostTriple>
<MxcTestNativeOutput>$(MxcTestCargoTargetDir)/$(MxcTestRustHostTriple)/$(MxcTestCargoProfileDir)/$(MxcTestNativeFileName)</MxcTestNativeOutput>
</PropertyGroup>
<Message Importance="high" Text="mxc: building isolated test-support native library for $(MxcTestRustHostTriple)" />
<Exec Command="cargo build -p mxc_ffi --features &quot;$(MxcTestCargoFeatures)&quot; --target $(MxcTestRustHostTriple) $(MxcTestCargoProfileArg) --target-dir &quot;$(MxcTestCargoTargetDir)&quot;" WorkingDirectory="$(MxcSrcDir)" />
<Error Condition="!Exists('$(MxcTestNativeOutput)')"
Text="The test-support native build did not produce $(MxcTestNativeOutput)." />
<Copy SourceFiles="$(MxcTestNativeOutput)"
DestinationFolder="$(TargetDir)" />
</Target>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Mxc.Sdk\Microsoft.Mxc.Sdk.csproj" />
</ItemGroup>
Expand Down
17 changes: 17 additions & 0 deletions sdk/dotnet/Microsoft.Mxc.Sdk.Tests/MxcSandboxTests.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -827,6 +827,23 @@ public void SerializeRequest_StripsLegacyCaptureDenialsFromThePolicy()
.GetString());
}

[Fact]
public void SerializeRequest_PreservesTelemetryWhenMigratingLegacyCaptureDenials()
{
var policy = CreateLegacyCaptureDenialsPolicy(
new CaptureDenialsPolicy(),
"0.9.0-alpha");
policy.Telemetry = new TelemetrySettings { Enabled = true };
var request = new SandboxRequest(policy, "echo hi");

using var doc = JsonDocument.Parse(MxcSandbox.SerializeRequest(request));
var serializedPolicy = doc.RootElement.GetProperty("policy");

Assert.True(
serializedPolicy.GetProperty("telemetry").GetProperty("enabled").GetBoolean());
Assert.False(serializedPolicy.TryGetProperty("captureDenials", out _));
}

private static SandboxPolicy CreateLegacyCaptureDenialsPolicy(
CaptureDenialsPolicy captureDenials,
string version = "0.8.0-alpha")
Expand Down
Loading
Loading