From 8ae5bd48cf233315b5f36a7a6b39002a5e77f74b Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 18:00:12 +0100 Subject: 0.7.0: resume shows where you left off; no approval for unparsable calls - --continue prints the last answer, or the last reasoning block if there was none - tool arguments are validated before prompting, so an empty bash call becomes an error for the model instead of a blank approval - empty placeholder tool calls are dropped and reported - sessions tolerate invalid UTF-8 lines from a torn write - AGENT686_DEBUG_STREAM=1 dumps SSE frames --- tests/tools.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/tools.rs') diff --git a/tests/tools.rs b/tests/tools.rs index 77c1698..a400df0 100644 --- a/tests/tools.rs +++ b/tests/tools.rs @@ -419,3 +419,18 @@ fn glob_follows_file_symlinks_but_not_directories() { assert!(text.contains("link.rs"), "{text}"); assert!(text.contains("inner.rs"), "{text}"); } + +#[test] +fn validate_rejects_calls_that_cannot_run() { + use agent686::tools::validate; + + assert!(validate("bash", &json!({ "cmd": "" })).is_err()); + assert!(validate("bash", &json!({})).is_err()); + assert!(validate("bash", &json!({ "cmd": "ls" })).is_ok()); + + assert!(validate("read", &json!({ "path": " " })).is_err()); + assert!(validate("edit", &json!({ "path": "a", "old": "" })).is_err()); + assert!(validate("grep", &json!({ "pattern": "" })).is_err()); + // Empty content is how you create an empty file. + assert!(validate("write", &json!({ "path": "a", "content": "" })).is_ok()); +} -- cgit v1.2.3