From 84e70c0e73460e5db1297c47d02d9b76802bfdf7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 18 Nov 2026 12:28:29 +0100 Subject: 0.9.1: correctness fixes from the audit - 64 MiB limit detected by file length, so pipelines and redirects are reported - bash temp files removed on every path via a scope guard - validate requires content/new as the schemas declare (present, may be empty) - Session::open folds in model-switch records; resume matches --list - combining mark at a wrap boundary no longer counts as a new row - --flag=value accepted; flag-shaped values rejected - dead code removed; last_reply folded into open (one read per resume) --- tests/sessions.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/sessions.rs') diff --git a/tests/sessions.rs b/tests/sessions.rs index 748b689..b381888 100644 --- a/tests/sessions.rs +++ b/tests/sessions.rs @@ -159,7 +159,9 @@ fn last_reply_prefers_content_and_falls_back_to_reasoning() { .append(&json!({ "role": "assistant", "content": null }), Some("only thinking")) .unwrap(); - let reply = session::last_reply("reply").expect("there is a reply"); + drop(session); + let (opened, _system, _messages) = Session::open("reply").expect("open"); + let reply = opened.last_reply.expect("there is a reply"); assert_eq!(reply.content, "the answer", "prefers a real block"); assert_eq!(reply.reasoning, "the thinking", "and its own reasoning"); @@ -168,7 +170,9 @@ fn last_reply_prefers_content_and_falls_back_to_reasoning() { session .append(&json!({ "role": "assistant", "content": null }), Some("thoughts")) .unwrap(); - let reply = session::last_reply("reasoning-only").unwrap(); + drop(session); + let (opened, _system, _messages) = Session::open("reasoning-only").unwrap(); + let reply = opened.last_reply.unwrap(); assert!(reply.content.is_empty()); assert_eq!(reply.reasoning, "thoughts"); } -- cgit v1.2.3