diff --git a/crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml b/crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml index a828264a5e..52b1fbf4e6 100644 --- a/crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml +++ b/crates/openshell-driver-mxc/examples/mxc-ocsf-audit.toml @@ -13,6 +13,9 @@ # egress-proxy switch into a disposable copy of this file. Workload command and # cwd are sandbox-scoped and passed separately through --driver-config-json. +[openshell] +version = 2 + [openshell.drivers.mxc] # Path to wxc-exec.exe on the box (patched by the run script; default is the # location observed on the MXC test boxes). diff --git a/crates/openshell-driver-mxc/examples/mxc-ws-gateway.toml b/crates/openshell-driver-mxc/examples/mxc-ws-gateway.toml index 8a2aa4e9b8..5f534bc48c 100644 --- a/crates/openshell-driver-mxc/examples/mxc-ws-gateway.toml +++ b/crates/openshell-driver-mxc/examples/mxc-ws-gateway.toml @@ -32,6 +32,9 @@ # openshell-supervisor-relay kills the server directly and exits # driver also kills wxc-exec as a backstop regardless +[openshell] +version = 2 + [openshell.drivers.mxc] # Path to wxc-exec.exe. Patched at runtime by run-ws-agent-test.ps1. # Leave commented for mock-mode smoke tests (pass -Mock to the script). diff --git a/crates/openshell-driver-mxc/tests/demo_examples.rs b/crates/openshell-driver-mxc/tests/demo_examples.rs index 11e72e688d..7d591fdbfb 100644 --- a/crates/openshell-driver-mxc/tests/demo_examples.rs +++ b/crates/openshell-driver-mxc/tests/demo_examples.rs @@ -38,6 +38,24 @@ fn read_example(name: &str) -> String { .unwrap_or_else(|error| panic!("failed to read {}: {error}", path.display())) } +#[test] +fn shipped_audit_and_websocket_configs_use_current_schema() { + for name in ["mxc-ocsf-audit.toml", "mxc-ws-gateway.toml"] { + let source = read_example(name); + let parsed: Value = toml::from_str(&source) + .unwrap_or_else(|error| panic!("failed to parse {name}: {error}")); + let openshell = parsed + .get("openshell") + .and_then(Value::as_table) + .unwrap_or_else(|| panic!("{name} is missing [openshell]")); + assert_eq!( + openshell.get("version").and_then(Value::as_integer), + Some(2), + "{name} must use schema version 2" + ); + } +} + #[test] fn shipped_inference_configs_declare_required_mxc_settings() { for name in ["mxc-ollama.toml", "mxc-inference.toml"] {