@@ -58,6 +58,7 @@ def test_sandbox_use_updates_config_and_engine(monkeypatch):
5858
5959 health = {
6060 "local" : RuntimeHealth (runtime = "local" , available = True , detail = "ok" ),
61+ "monty" : RuntimeHealth (runtime = "monty" , available = True , detail = "ok" ),
6162 "docker" : RuntimeHealth (runtime = "docker" , available = True , detail = "ok" ),
6263 "apple-container" : RuntimeHealth (
6364 runtime = "apple-container" , available = False , detail = "missing"
@@ -77,6 +78,7 @@ def test_sandbox_status_runs_without_error(monkeypatch):
7778
7879 health = {
7980 "local" : RuntimeHealth (runtime = "local" , available = True , detail = "ok" ),
81+ "monty" : RuntimeHealth (runtime = "monty" , available = False , detail = "missing dependency" ),
8082 "docker" : RuntimeHealth (runtime = "docker" , available = False , detail = "down" ),
8183 "apple-container" : RuntimeHealth (
8284 runtime = "apple-container" , available = False , detail = "missing"
@@ -204,6 +206,7 @@ def test_sandbox_manual_override_marks_profile_custom(monkeypatch):
204206
205207 health = {
206208 "local" : RuntimeHealth (runtime = "local" , available = True , detail = "ok" ),
209+ "monty" : RuntimeHealth (runtime = "monty" , available = True , detail = "ok" ),
207210 "docker" : RuntimeHealth (runtime = "docker" , available = True , detail = "ok" ),
208211 "apple-container" : RuntimeHealth (
209212 runtime = "apple-container" , available = False , detail = "missing"
@@ -214,3 +217,23 @@ def test_sandbox_manual_override_marks_profile_custom(monkeypatch):
214217
215218 assert handler .config_manager .config .sandbox .superbox_profile == "custom"
216219 assert handler .config_manager .saved is True
220+
221+
222+ def test_sandbox_use_monty_updates_config_and_engine (monkeypatch ):
223+ handler = _build_handler ()
224+
225+ health = {
226+ "local" : RuntimeHealth (runtime = "local" , available = True , detail = "ok" ),
227+ "monty" : RuntimeHealth (runtime = "monty" , available = True , detail = "ok" ),
228+ "docker" : RuntimeHealth (runtime = "docker" , available = True , detail = "ok" ),
229+ "apple-container" : RuntimeHealth (
230+ runtime = "apple-container" , available = False , detail = "missing"
231+ ),
232+ }
233+ monkeypatch .setattr ("rlm_code.commands.slash_commands.detect_runtime_health" , lambda : health )
234+
235+ handler .cmd_sandbox (["use" , "monty" ])
236+
237+ assert handler .config_manager .config .sandbox .runtime == "monty"
238+ assert handler .config_manager .saved is True
239+ assert handler .execution_engine .get_runtime_name () == "monty"
0 commit comments