✗
Failing This test is currently failing.
Failed: backend-exec
Failure Output
error[KORU021]: continuation branch 'parsed' on tor 'app.lib.io.parse:lines' — a bare return has no tags
--> tests/regression/100_MODULE_SYSTEM/110_IMPORTS/110_004_file_processor/input.kz:17:4
hint: bind the value with `: name`, not `| parsed`
error[KORU021]: continuation branch 'transformed' on tor 'app.lib.io.transform:uppercase' — a bare return has no tags
--> tests/regression/100_MODULE_SYSTEM/110_IMPORTS/110_004_file_processor/input.kz:18:8
hint: bind the value with `: name`, not `| transformed`
❌ Compiler coordination error: Incomplete branch coverage
(set KORU_BACKEND_TRACE=1 for the backend return trace) Code
// Test 831: File processor (realistic I/O pattern with directory imports)
//
// Common pattern: read file -> process lines -> transform -> write output
// Tests: directory imports, multiple modules from same package, error handling
const std = @import("std");
// Import directory 'lib/io' containing:
// - file.kz (read, write events)
// - parse.kz (lines event)
// - transform.kz (uppercase event)
~import app/lib/io
// The full pipeline using directory imports
~app/lib/io/file:read(path: "input.txt")
| success s |> app/lib/io/parse:lines(text: s)
| parsed _ |> app/lib/io/transform:uppercase(text: s)
| transformed t |> app/lib/io/file:write(path: "output.txt", data: t)
| written _ |> _
| ioerror _ |> _
| notfound _ |> _
| ioerror _ |> _
Expected output
read input.txt
parse lines (11 chars)
uppercase (11 chars)
write output.txt (11 bytes)
Flows
flow ~read click a branch to expand · @labels scroll to their anchor
read (path: "input.txt")
Imported Files
// File I/O module
const std = @import("std");
~pub tor read { path: string }
| success string
| notfound string
| ioerror string
~pub tor write { path: string, data: string }
| written i32
| ioerror string
~proc read|zig {
std.debug.print("read {s}\n", .{path});
return .{ .@"success" = "hello world" };
}
~proc write|zig {
std.debug.print("write {s} ({} bytes)\n", .{ path, data.len });
return .{ .@"written" = @intCast(data.len) };
}
// Parse module
const std = @import("std");
~pub tor lines { text: string } -> [][]const u8
~proc lines|zig {
std.debug.print("parse lines ({} chars)\n", .{text.len});
const empty: [][]const u8 = &.{};
return .{ .@"parsed" = empty };
}
// Transform module
const std = @import("std");
~pub tor uppercase { text: string } -> string
~proc uppercase|zig {
std.debug.print("uppercase ({} chars)\n", .{text.len});
return .{ .@"transformed" = "HELLO WORLD" };
}
Test Configuration
MUST_RUN