Assert subagent corrections without printing

The helper in the subagent decoder tests printed the correction it could not find, and the direct-write audit rejects a print outside a test block. It now fails with a plain assertion.
This commit is contained in:
Pranit committed 2026-10-22 20:04:37 -04:00
1 parent e1442f49fa
commit 2445b4d496
1 file changed
+1 -4
+1 -4
View File
@@ -380,10 +380,7 @@ fn expectCorrection(args_json: []const u8, code: []const u8, correction: []const
var parsed = try std.json.parseFromSlice(std.json.Value, alloc, body, .{});
defer parsed.deinit();
const text = parsed.value.object.get("result").?.string;
if (std.mem.find(u8, text, correction) == null) {
std.debug.print("correction {s} lacks {s}\n", .{ text, correction });
return error.TestExpectedEqual;
}
try std.testing.expect(std.mem.find(u8, text, correction) != null);
}
test "decode accepts flat calls and names what a rejected call got wrong" {