✓
Passing This code compiles and runs correctly.
Code
// PIN (GREEN): a FRESH obligation label minted in one module (`mine!` in
// lib) discharges cross-module — both explicitly (`lib:drop`) and via
// auto-discharge — from a consumer module. `allocated!` is the shared
// house label, but fresh labels were asserted (incorrectly, 2026-09-06)
// to NOT travel; this pins the corrected belief. Both paths print the
// value and exit clean.
~import std/io
~import lib
~lib:speak(n: 7)
| ok s |> std/io:print.ln("explicit {{ s:s }}") |> lib:drop(t: s)
| err |> std/io:print.ln("err")
~lib:speak(n: 9)
| ok s |> std/io:print.ln("auto {{ s:s }}")
| err |> std/io:print.ln("err")
Supporting Files
const std = @import("std");
~pub tor speak { n: i64 }
| ok string<mine!>
| err
~proc speak|zig {
var buf: [64]u8 = undefined;
const s = std.fmt.bufPrint(&buf, "n={d}", .{n}) catch return .{ .err = .{} };
const owned = koru_allocator().dupe(u8, s) catch return .{ .err = .{} };
return .{ .ok = owned };
}
~pub tor drop { t: string<!mine> }
~proc drop|zig { koru_allocator().free(t); }
Must run:
Compile and run without errors.
Flows
flow ~speak click a branch to expand · @labels scroll to their anchor
speak (n: 7)
flow ~speak click a branch to expand · @labels scroll to their anchor
speak (n: 9)
Test Configuration
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"lib": "./lib.kz"
}
}