Repository navigation
Move lifecycle routing to executor arguments - #1256
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
The merge-base changed after approval.
e959d2c to
bb436f7
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Existing tests now panic, early lifecycle decode errors violate the response protocol, and the worked SDK example documents the wrong wire shape.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Moves state-aware lifecycle routing from executor JSON into explicit CLI arguments while preserving exact contract parsing.
Changes:
- Adds
--operationand--sandbox-idlifecycle arguments. - Injects CLI routing into source-preserving JSON before exact parsing.
- Updates executor tests and lifecycle documentation.
| File | Description |
|---|---|
src/testing/wxc_e2e_tests/src/lib.rs |
Converts lifecycle test requests to CLI routing. |
src/core/wxc/src/main.rs |
Adds lifecycle CLI arguments and dispatch. |
src/core/wxc_common/src/splice.rs |
Splices routing fields into JSON. |
src/core/wxc_common/src/config_parser.rs |
Parses CLI-routed lifecycle requests through exact contracts. |
docs/state-aware-lifecycle/mxc-state-aware-sandbox-api.md |
Documents the executor transport. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bb436f7 to
e8eaab9
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Lifecycle parse errors can corrupt the JSON-only stdout contract, duplicate diagnostics, and conflict with documented error routing.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (3)
e8eaab9 to
b4505c5
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Lifecycle debug logging can contaminate stdout, and source failures produce inaccurate audit classifications.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
b4505c5 to
44a02bf
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Lifecycle input and parse rejections omit the known phase from ConfigRejected records.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
Resolved since last review (2)
44a02bf to
d9191e3
Compare
90bcc52 to
02941b8
Compare
02941b8 to
d48077c
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Lifecycle routing currently accepts and silently ignores the delete-only --containername argument.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (1)
d48077c to
da4af50
Compare
da4af50 to
c3ed23d
Compare
c3ed23d to
1e3a8b1
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The E2E helper can mask invalid provision payloads, and several canonical guides still document the obsolete executor contract.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (1)
1e3a8b1 to
4ed4c52
Compare
This PR changes direct `wxc-exec` state-aware transport so lifecycle operation and existing sandbox identity are passed as command-line arguments while raw exact SDK and FFI APIs retain their phase-bearing JSON contracts. Details * Add `--operation provision|start|exec|stop|deprovision` and require `--sandbox-id` for operations on an existing sandbox. * Preserve exact phase-specific parsing by overlaying CLI routing onto a source-preserving temporary document before normalization. * Reject caller-supplied `phase` and `sandboxId` fields and emit actionable migration guidance for valid or malformed phase-bearing executor JSON. * Reject delete and maintenance routing options, including `--containername`, when lifecycle routing is selected. * Route lifecycle failures and debug diagnostics away from stdout so it remains exclusively a JSON envelope or exec workload stream. * Distinguish malformed encoded or file content from unavailable input sources and retain the selected lifecycle phase on `ConfigRejected` records. * Place mandatory routing and configuration arguments before caller-supplied options and trailing workload commands. * Preserve invalid provision `sandboxId` fields in E2E payloads so exact contract validation rejects them. * Keep Node on `mxc_ffi` and consistently distinguish SDK/FFI envelopes from direct executor payloads in canonical lifecycle documentation. Tests * `cargo fmt --all -- --check` * `cargo check -p wxc_e2e_tests --all-targets` * `cargo clippy -p wxc_e2e_tests --all-targets -- -D warnings` * `cargo test -p wxc_common` (912 passed). * `cargo test -p wxc` (68 passed). * `cargo test -p wxc_e2e_tests --lib` (2 passed). * `cargo test -p wxc cli_rejects_lifecycle_operation_with_utility_modes` (1 passed). * Full workspace Clippy with all targets and features. * `git diff --check` Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1d91874d-feea-4a33-b183-67d506ae61b5 Copilot-Session: 33217f7b-dc7d-4da0-af5f-018fef64013c Generated-with: gpt-5.6-sol
4ed4c52 to
64893fb
Compare



This PR moves state-aware lifecycle routing out of direct executor JSON and
into explicit
wxc-execcommand-line arguments. Raw exact SDK and FFI APIscontinue to use their registered phase-bearing JSON contracts.
Details
--operation provision|start|exec|stop|deprovisiontowxc-exec.--sandbox-idfor non-provision lifecycle operations.source-preserving temporary document before normalization.
phaseandsandboxIdfields instead of silentlyoverriding command-line routing.
mxc_ffitransport and documentthe direct executor CLI as a separate ingress path.
Tests
wxc_commontests passed (910 unit tests plus additional suites).wxctests passed (64).mxc_enginetests passed (150).mxc-sdktests passed (54, with 4 backend-dependent ignores).git diff --checkMicrosoft Reviewers: Open in CodeFlow