From 8128019680df9a16a5f2d1e2d95c4f41955f37bf Mon Sep 17 00:00:00 2001 From: cyrus Date: Fri, 25 Sep 2026 16:08:54 +0530 Subject: [PATCH] fix(stream): hold a bare /< followed only by whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TinySweeper flagged a real streaming regression in the prior commit: the complete-tag regex now accepts a space before the DSML/namespace marker (`< | DSML | invoke`), but the streaming scrubber's hold-back list only matched fixed literal opener prefixes (" usize { } } } + if let Some(idx) = trailing_bare_angle_bracket(tail) { + best = best.min(idx); + } best } +/// Byte index of a trailing `<` or ` Option { + let trimmed = tail.trim_end_matches(char::is_whitespace); + if let Some(stripped) = trimmed.strip_suffix("{\"path\":\"a\"}"); + assert_eq!(second.calls.len(), 1); + assert_eq!(second.calls[0].name, "read"); +} + #[test] fn plural_tool_calls_prose_is_not_held() { assert_eq!(