mirror of
https://github.com/vercel-labs/fx.git
synced 2026-10-28 10:15:17 +08:00
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:
1 file changed
+1
-4
@@ -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" {
|
||||
|
||||
Reference in new issue
Block a user