From 14e56289391ea95b493c2a20c87f8d88047aa051 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 17:16:08 +0100 Subject: 0.6.0: transcript viewer, turn summary, yolo floor, model/version records - --show renders a session without locking it - status line summarises writes, commands and denials per turn - sessions record harness version; model switches are appended and listed - --yolo refuses $HOME and / unless AGENT686_ALLOW_HOME=1 --- tests/sessions.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/sessions.rs') diff --git a/tests/sessions.rs b/tests/sessions.rs index f21be24..1d40f64 100644 --- a/tests/sessions.rs +++ b/tests/sessions.rs @@ -95,3 +95,18 @@ fn a_session_cannot_be_open_twice() { drop(first); Session::open("locked").expect("after the first handle closes it is available"); } + +#[test] +fn listing_reports_the_model_in_use_after_a_switch() { + let _env = ENV_LOCK.lock().unwrap_or_else(|e| e.into_inner()); + let dir = temp_dir("model-switch"); + std::env::set_var("AGENT686_DATA", &dir); + + let system = json!({ "role": "system", "content": "x" }); + let mut session = Session::create_as("switch".into(), "model-a", &system).unwrap(); + session.record_model("model-b").unwrap(); + + let listed = session::list().unwrap(); + assert_eq!(listed.len(), 1); + assert_eq!(listed[0].model, "model-b"); +} -- cgit v1.2.3