Skip to content

Remove dead code left by the ProcessContainer fallbacks - #1559

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/remove_guarded_wpr_job_scoping
Oct 23, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/remove_guarded_wpr_job_scoping

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

This PR removes code that only the deleted AppContainer fallback tiers used: the guarded WPR guardian protocol and trace scoping, the never-emitted MXC.EnforcementDegraded event, the AppContainer sandbox-tracking module and wxc-exec's profile-delete mode. It also folds the ProcessContainer dispatcher into the runner. It is stacked on #1558.

Details

  • Drop the attach-job, analyze, discard and trace-transfer guardian controls, the job process tracker, and the matching GuardedSession client methods.
  • Remove attach-handle framing and retire the raw-trace response kind; the client rejects kind 1 instead of accepting an ETL payload.
  • Delete etl_filter.rs and process_lifetime.rs plus the decoder's relogging mode, job-membership analysis, ProcessLifetimeIndex and ProcessLifetime.
  • Collapse the decoder's scope checks to the native always-in-scope result; DenialAnalyzer::analyze reuses into_analysis.
  • Remove the MXC.EnforcementDegraded audit and ETW event and its EffectiveEnforcementLevel vocabulary.
  • Delete sandbox_tracking.rs and remove wxc-exec --delete/--containername, which deleted AppContainer profiles that native ProcessContainer never creates. lxc-exec --delete is unaffected.
  • Redact sandbox-<hex> audit identities like other caller-supplied ids, since nothing mints them; CLI stays accepted.
  • Fold the dispatcher into BaseContainerRunner::for_request, called directly by the engine's run and spawn paths.
  • Remove the filtered-trace scratch file, UiJobObject::handle_value and two unneeded unsafe Send impls.

References

Tests

  • Removed tests for the deleted code; converted seven decoder tests to the native accumulator; moved the dispatcher's rejection tests onto BaseContainerRunner::for_request; added checks that the retired response kind and sandbox-<hex> identities are rejected; updated the ETW privacy contract test to its 10 events.
  • cargo fmt --all -- --check and cargo clippy --workspace --all-targets --features mxc-sdk/schema-gen -- -D warnings (from src): passed.
  • cargo test -p mxc-sdk --lib --features schema-gen: 2653 passed, 4 ignored. cargo test -p wxc: 70 passed; wxc-exec rejects --delete and --containername (exit 2).
  • Contract suites: 278, 279, 373 and 21 passed. check-contract-codegen.js --base-ref origin/main: passed.
  • Native ProcessContainer gate: passed, including native-denial-capture; the privileged-token removal check skips on this host. It ran before test: scope host loopback coverage to direct connections test: fix ARM64 #1553 landed; test: scope host loopback coverage to direct connections test: fix ARM64 #1553 changes only one Rust test file.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@MGudgin
Gudge (MGudgin) requested a review from a team October 22, 2026 00:48
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_guarded_wpr_job_scoping branch from 74a035e to 97ffbc0 Compare October 22, 2026 17:54
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:54
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_guarded_wpr_job_scoping branch from 97ffbc0 to 3dc4e9b Compare October 22, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad Windows capture, cleanup, and packaging removals warrant final human review alongside the reported native-host validation.

No open issues 🎉

What changed in this PR

This PR follows #1558’s native-only ProcessContainer change by removing obsolete fallback infrastructure and the standalone PLM tool. It keeps native audit policy generation in wxc-exec and updates build and packaging expectations.

Changes:

  • Remove PLM/WPR capture infrastructure, process-lifetime filtering, AppContainer tracking, and legacy profile-delete options.
  • Consolidate ProcessContainer runner construction, remove unused degradation events, and redact legacy sandbox-<hex> identities.
  • Move audit compatibility helpers into wxc-exec and remove PLM from SDK bundles, CI, and documentation.
File Description
src/​tools/​wxc/​src/​main.rs Remove legacy profile-delete options and simplify config handling.
src/​tools/​wxc/​src/​audit/​config.rs Localize policy-generation helpers and remove PLM-only code.
src/​tools/​wxc/​src/​audit/​config_inputs.rs Retain denial-to-policy conversion without standalone trace analysis.
src/​tools/​wxc/​src/​audit/​compatibility.rs Keep native audit artifacts without WPR stop operations.
src/​tools/​wxc/​src/​audit.rs Use local helpers and test preserved policy suggestions.
src/​tools/​wxc/​Cargo.toml Add the Windows audit timestamp dependency.
src/​mxc-sdk/​tests/​wxc_e2e_tests_e2e_telemetry_etw.rs Stop building PLM for telemetry tests.
src/​mxc-sdk/​src/​lib.rs Remove the hidden PLM re-export.
src/​mxc-sdk/​src/​core/​plm/​wpr_path.rs Delete WPR executable resolution.
src/​mxc-sdk/​src/​core/​plm/​start.rs Delete WPR start and process-control helpers.
src/​mxc-sdk/​src/​core/​plm/​secure_scratch.rs Delete protected WPR scratch and recovery storage.
src/​mxc-sdk/​src/​core/​plm/​profile_gen.rs Delete the embedded WPR profile.
src/​mxc-sdk/​src/​core/​plm/​mod.rs Delete the PLM module declarations.
src/​mxc-sdk/​src/​core/​plm/​log.rs Delete interactive PLM logging.
src/​mxc-sdk/​src/​core/​plm/​elevated_protocol.rs Delete the guardian protocol re-export.
src/​mxc-sdk/​src/​core/​plm/​coordination.rs Delete PLM singleton and cleanup coordination.
src/​mxc-sdk/​src/​core/​plm/​access_event.rs Delete the legacy access-event model.
src/​mxc-sdk/​src/​core/​mxc_telemetry/​mod.rs Remove the degradation event and update privacy assertions.
src/​mxc-sdk/​src/​core/​mxc_engine/​run.rs Construct ProcessContainer runners directly.
src/​mxc-sdk/​src/​core/​mxc_engine/​dispatch.rs Use direct runner construction for streaming execution.
src/​mxc-sdk/​src/​core/​mxc_common/​telemetry/​mod.rs Remove the degradation logging export.
src/​mxc-sdk/​src/​core/​mxc_common/​telemetry/​events.rs Remove degradation emission and associated tests.
src/​mxc-sdk/​src/​core/​mxc_common/​policy_identity.rs Update identity documentation and tests.
src/​mxc-sdk/​src/​core/​mxc_common/​audit.rs Remove degradation vocabulary and redact legacy identities.
src/​mxc-sdk/​src/​core/​mod.rs Remove the PLM module.
src/​mxc-sdk/​src/​core/​learning_mode_windows/​process_lifetime.rs Delete job-membership lifetime validation.
src/​mxc-sdk/​src/​core/​learning_mode_windows/​mod.rs Remove obsolete protocol and filtering exports.
src/​mxc-sdk/​src/​core/​learning_mode_windows/​guarded_wpr_protocol.rs Delete guardian response and handle framing.
src/​mxc-sdk/​src/​core/​learning_mode_windows/​etl_filter.rs Delete process-scoped ETL rewriting.
src/​mxc-sdk/​src/​core/​learning_mode_core/​verbose_logging.rs Remove guardian-specific wording from size-budget guidance.
src/​mxc-sdk/​src/​core/​learning_mode_core/​mod.rs Remove the process-lifetime export.
src/​mxc-sdk/​src/​core/​learning_mode_core/​analyze.rs Delete the fallback process-lifetime model.
src/​mxc-sdk/​src/​backends/​process_container/​common/​sandbox_tracking.rs Delete AppContainer profile and registry tracking.
src/​mxc-sdk/​src/​backends/​process_container/​common/​mod.rs Remove dispatcher and tracking declarations.
src/​mxc-sdk/​src/​backends/​process_container/​common/​job_object.rs Remove the guardian-only raw handle accessor.
src/​mxc-sdk/​src/​backends/​process_container/​common/​dispatcher.rs Delete the intermediate dispatch layer.
src/​mxc-sdk/​src/​backends/​process_container/​common/​base_container_runner.rs Centralize validated construction and move rejection tests.
src/​host/​plm/​src/​main.rs Delete the standalone PLM CLI.
src/​host/​plm/​readme.md Remove retired tool documentation.
src/​host/​plm/​Cargo.toml Delete the PLM package manifest.
src/​host/​plm/​build.rs Delete PLM version-resource generation.
src/​Cargo.toml Remove PLM from workspace membership.
src/​Cargo.lock Remove PLM and update executor dependencies.
sdk/​node/​tests/​integration/​test-helpers.ts Remove PLM from binary expectations.
sdk/​dotnet/​Microsoft.Mxc.Sdk/​Microsoft.Mxc.Sdk.csproj Remove PLM build, staging, and package requirements.
scripts/​ci/​build-windows-sdk-test-bundle.ps1 Remove stale PLM staging and bundle requirements.
docs/​logging-access-denied.md Simplify native capture wording.
docs/​development/​guides/​diagnostics.md Replace PLM recovery guidance with external WPR management guidance.
docs/​development/​architecture/​telemetry.md Document redaction of legacy identities.
docs/​development/​architecture/​repository-architecture.md Remove PLM from the repository overview.
docs/​development/​architecture/​container-lifecycle.md Remove references to deleted CLI options.
build.bat Stop building PLM and remove stale staged copies.
.github/​workflows/​Build.Windows.Job.yml Stop uploading PLM artifacts.
.github/​workflows/​Build.Linux.Job.yml Remove retired PLM build and test jobs.
.azure-pipelines/​templates/​Vpack.Package.Job.yml Remove PLM from test-bundle requirements.
.azure-pipelines/​templates/​Rust.Build.Job.yml Remove PLM signing and testing steps.
.azure-pipelines/​templates/​IsolationSession.TestBundle.Build.Job.yml Stop requiring PLM in the .NET test payload.
.azure-pipelines/​templates/​DotNet.Validate.Job.yml Remove PLM from package validation expectations.
.azure-pipelines/​templates/​DotNet.Build.Job.yml Stop copying PLM into Windows runtime packages.
.azure-pipelines/​scripts/​verify-dotnet-nuget-package.ps1 Reject packages containing the retired PLM executable.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:59
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_guarded_wpr_job_scoping branch from 3dc4e9b to 4f810c7 Compare October 22, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The cross-cutting Windows tracing, audit, and SDK packaging removals warrant final human review of host-specific validation and packaged artifacts.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 22, 2026 21:42
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_guarded_wpr_job_scoping branch from 4f810c7 to 88d03ba Compare October 22, 2026 21:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Removing privileged Windows tracing infrastructure across runtime and packaging paths warrants human review of the reported host-validation evidence.

No open issues 🎉

Review effort: Balanced

Base automatically changed from user/gudge/remove_tier_3_support to main October 23, 2026 04:02
Copilot AI balanced review requested due to automatic review settings October 23, 2026 04:02
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/remove_guarded_wpr_job_scoping branch from 88d03ba to 074c888 Compare October 23, 2026 04:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

This PR removes the remaining AppContainer fallback infrastructure and the
standalone PLM executable, including its elevated WPR guardian. Native
ProcessContainer capture remains in the SDK, while audit output, policy
suggestions, and artifact handling live with the wxc-exec audit command.

Details

* Retire PLM, guardian controls, transport framing, trust helpers, and WPR
  profiles; remove their build, signing, staging, and packaging inputs.
* Preserve native audit configuration suggestions, collision safeguards,
  artifact locations, and the serialized-analysis size bound.
* Remove fallback trace scoping, sandbox tracking, profile deletion, and
  retired enforcement telemetry events and vocabulary.
* Fold ProcessContainer setup into BaseContainerRunner::for_request and use
  it directly from the engine's run and spawn paths.
* Clean stale staged PLM executables and reject retired NuGet payloads.

Tests

* Rust checks passed: cargo fmt --all -- --check,
  cargo check --workspace --all-targets --features schema-gen, and
  cargo clippy --workspace --all-targets --features schema-gen -- -D warnings.
* SDK library, 158 CLI, and public Rust streaming tests passed outside the
  sandbox, including native audit suggestions and hard-link safeguards.
* Managed tests passed: 323 passed, 31 skipped. Node typecheck and unit tests
  passed: 454 passed, 21 skipped.
* Single-RID NuGet packing, retired-payload rejection fixtures, SDK parity,
  contract codegen, and validation of 413 configurations passed.
* These results predate the latest rebase. Linux, macOS, ARM64 runtime, and
  full scheduled-bundle execution were not run locally.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 7a356c9c-8a05-4876-bdfc-db4df054c68b
Generated-with: gpt-6.1-sol
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad removal of privileged tracing and cleanup infrastructure, together with cross-architecture SDK packaging changes, warrants final human verification.

No open issues 🎉

Review effort: Balanced

@MGudgin
Gudge (MGudgin) merged commit ae9774b into main Oct 23, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/remove_guarded_wpr_job_scoping branch October 23, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processcontainer] Remove sandbox_tracking.rs & cleanup tracking entries

3 participants