Add visible v1 diagnostics guardrails
This commit is contained in:
+5
-2
@@ -1,4 +1,5 @@
|
||||
const std = @import("std");
|
||||
const diagnostics = @import("diagnostics.zig");
|
||||
|
||||
// Explicit local build/test job execution for the shared panel model.
|
||||
// req: repo/002, ui/002, testing/001, testing/002, testing/003, testing/004
|
||||
@@ -57,10 +58,11 @@ fn runRowsWithPreviewAlloc(
|
||||
const result = std.process.run(allocator, io, .{
|
||||
.argv = argv,
|
||||
.cwd = .{ .path = cwd },
|
||||
.stdout_limit = .limited(256 * 1024),
|
||||
.stderr_limit = .limited(256 * 1024),
|
||||
.stdout_limit = .limited(diagnostics.process_stdout_limit),
|
||||
.stderr_limit = .limited(diagnostics.process_stderr_limit),
|
||||
}) catch |err| {
|
||||
try rows.append(allocator, try std.fmt.allocPrint(allocator, "{s}:status:spawn_error_{s}", .{ kind, @errorName(err) }));
|
||||
try rows.append(allocator, try diagnostics.processLimitRowAlloc(allocator, kind, diagnostics.process_stdout_limit, diagnostics.process_stderr_limit));
|
||||
return rows.toOwnedSlice(allocator);
|
||||
};
|
||||
defer allocator.free(result.stdout);
|
||||
@@ -70,6 +72,7 @@ fn runRowsWithPreviewAlloc(
|
||||
try appendOutputRows(allocator, &rows, "stdout", result.stdout);
|
||||
try appendOutputRows(allocator, &rows, "stderr", result.stderr);
|
||||
if (rows.items.len == 2) try rows.append(allocator, try std.fmt.allocPrint(allocator, "{s}:output_empty", .{kind}));
|
||||
try rows.append(allocator, try diagnostics.processLimitRowAlloc(allocator, kind, diagnostics.process_stdout_limit, diagnostics.process_stderr_limit));
|
||||
return rows.toOwnedSlice(allocator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user