microsoft / microsoft/mxc

Emit wxc executor errors and warnings as structured ScriptResponse JSON

Open
#612 1 comment 1 reaction 2 assignees Claimed by @jsidewhite View on GitHub
Area-Executor-WXC Container-Process Issue-Feature OS-Windows
Dominant language
Rust
Stars
1.3k
Forks
79
Avg merge
2d 7h
Merged PRs (30d)
117

Description

### Description of the new feature / enhancement

Currently `wxc-exec` prints errors and warnings as free-form text to stderr/stdout — for example `eprintln!("error: {e}")` and the per-warning `dacl warning:` lines in `src/core/wxc/src/main.rs`. Consumers that drive the executor programmatically cannot reliably parse or filter these messages, and the error surface is inconsistent across containment backends.

Routing all executor errors and warnings through the existing `ScriptResponse` structure — so every stderr/stdout message is structured JSON — would make the output machine-parseable and filterable, and give a single consistent error/warning surface across every backend dispatch arm.

Raised by @bbonaby in review of #580.

### Proposed technical implementation details

Replace the ad-hoc `eprintln!`/`eprint!` error and warning emission across the backend dispatch arms in `src/core/wxc/src/main.rs` with structured emission via the `ScriptResponse` structure. This is cross-cutting across every backend, so it is tracked separately from the Phase 3a backend-selection decoupling work in #580.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.