✗
Failing This test is currently failing.
Failed: backend-exec
Failure Output
error[KORU021]: continuation branch 'ok' on tor 'std.io:read.ln' — a bare return has no tags
--> tests/regression/600_STDLIB/650_FS/650_007_read_ln_leaks/input.k:15:0
hint: bind the value with `: name`, not `| ok`
❌ Compiler coordination error: Incomplete branch coverage
(set KORU_BACKEND_TRACE=1 for the backend return trace) Code
// PIN (2026-07-05, honest red): std/io:read.ln() leaks its line buffer.
// The implementation dupes the line via koru_allocator() and returns it as
// a bare []const u8 — no phantom obligation, no companion free event — so
// the leak checker fires on ANY program that calls it:
// KORU LEAK CHECK FAILED: the produced program leaked
// The program itself works (prints the line first). Either read.ln grows
// an obligation + free story like the rest of the stdlib, or it borrows
// like read-lines' streaming arm. Surfaced by the wordfreq kernel port
// (which used read-lines instead — the grounded, leak-free path).
//
// Correct behavior: prints the line and exits leak-clean.
import std/io
std/io:read.ln()
| ok l |> std/io:print.ln("got: {{ l:s }}")
Expected output
got: hi
Flows
flow ~read.ln click a branch to expand · @labels scroll to their anchor
read.ln
Test Configuration
MUST_RUN