You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop the dev schema advertising a stop/deprovision config for IsolationSession (#683)
* Stop the dev schema advertising a stop/deprovision config for IsolationSession
`wire::IsolationSession` reused a single `IsolationSessionPhase` for all four
per-phase state-aware slots, but the backend's `StatefulSandboxBackend` impl
declares `StopConfig`/`DeprovisionConfig`/`ExecConfig` as `()`. The generated
dev schema and SDK wire types therefore advertised an optional `user` payload
for `stop`/`deprovision` that `deserialize_config` rejects at dispatch.
Drop the two fields from the wire model and regenerate both artifacts. The SDK
never emitted those slots (it lifts `version` to the envelope top level), so
only a hand-authored raw-JSON caller reading the schema could be misled; there
is no behavior change.
Add two regression tests in the iso backend, where both halves of the contract
are visible: one pins the wire model's per-phase key set (built field-by-field,
so a newly added field breaks the build instead of silently regenerating), the
other pins that the `()` config phases reject a payload. The existing codegen
gate only proves the artifacts match the wire model, not that the wire model
matches the backend.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f3b1916-3f39-4dcc-a420-2ce5db5898bd
* Address review O1/O2: precise exec wording, pin the wire->config direction
O1 — the doc comment on `wire::IsolationSession` grouped `exec` with `stop`
and `deprovision` as "invoked via the top-level `phase` field with
`sandboxId`". That is correct for stop/deprovision and incomplete for exec,
which also requires the top-level `process` block: `validate_exec_common`
rejects an empty `process.commandLine` as `malformed_request`, and the dev
schema root carries no `required` array, so this description is the only
in-schema guidance a hand-authored caller gets. Separate the two cases and
regenerate both artifacts, since the text is copied verbatim into each.
O2 — the parity tests pinned only the negative direction (the advertised key
set, and that the `()` phases reject a payload), while the section comment
claimed they pinned both halves. Add
`phases_with_a_config_accept_the_wire_payload`, which derives its payload
from `wire::IsolationSessionPhase` rather than a JSON literal and asserts the
user bundle survives into `ProvisionConfig` and `StartConfig`.
That closes a real gap rather than restating existing coverage: on the
state-aware path the wire model is never constructed — the dispatcher
deserializes raw JSON straight into the config types — so the
`From<crate::wire::IsolationUser>` compile-time guard protects only the
one-shot path. A rename of the wire `user` key would leave both config types
(`#[serde(default)]`, no `deny_unknown_fields`) silently dropping the bundle,
provisioning a local sandbox for a caller who asked for an Entra one.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f3b1916-3f39-4dcc-a420-2ce5db5898bd
---------
Co-authored-by: adpa-ms <>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f3b1916-3f39-4dcc-a420-2ce5db5898bd
Copy file name to clipboardExpand all lines: schemas/dev/mxc-config.schema.0.8.0-dev.json
+1-23Lines changed: 1 addition & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -260,19 +260,8 @@
260
260
"type": "object"
261
261
},
262
262
"IsolationSession": {
263
-
"description": "IsolationSession backend config. Carries the one-shot `user` field and the per-phase state-aware nesting (`provision` / `start` / `stop` / `deprovision`).",
263
+
"description": "IsolationSession backend config. Carries the one-shot `user` field and the per-phase state-aware nesting for the phases that take config (`provision` / `start`). `stop`, `deprovision`, and `exec` take no per-phase config payload: `stop` and `deprovision` are invoked with only the top-level `phase` and `sandboxId`, and `exec` additionally carries the top-level `process` block.",
* IsolationSession backend config. Carries the one-shot `user` field and the per-phase state-aware nesting (`provision` / `start` / `stop` / `deprovision`).
110
+
* IsolationSession backend config. Carries the one-shot `user` field and the per-phase state-aware nesting for the phases that take config (`provision` / `start`). `stop`, `deprovision`, and `exec` take no per-phase config payload: `stop` and `deprovision` are invoked with only the top-level `phase` and `sandboxId`, and `exec` additionally carries the top-level `process` block.
0 commit comments