✗
Failing This test is currently failing.
Failed: must-fail-passed
Failure Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission) Code
// PIN (design gap — RED): std/io:read-stdin allocates a []const u8 via
// koru_allocator().readToEndAlloc (io.kz line 153) and returns it in the
// `| ok []const u8` branch. No phantom obligation attaches to the slice.
//
// The caller below consumes the content for a length calculation and drops
// it — the allocator-owned buffer leaks. The phantom checker has no handle
// because `[]const u8` is a bare type with no phantom state.
//
// This is the stdin variant of 335_042 (read-file). Together they pin the
// full IO-read surface gap: every readToEndAlloc path in io.kz leaks
// invisibly because the output types carry no phantom.
//
// The intended fix is to add `[]const u8<allocated!>` to the OK branch
// and a matching std/io:free-bytes { data: []const u8<!allocated> } event.
// Once that lands, this test becomes green-reject.
//
// PREDICTION: RED PIN (compiler accepts today).
//
// Grounding:
// std/io:read-stdin event — koru_std/io.kz line 146: event read-stdin {}
// | ok []const u8 branch — koru_std/io.kz line 147
// | eof branch — koru_std/io.kz line 148
// | failed branch — koru_std/io.kz line 149
// ~import std/io — 330_068/input.kz line 13
~import std/io
// Read all of stdin. Use the content, then drop the slice — no free.
// The allocator-owned buffer leaks invisibly because []const u8 has
// no phantom obligation forcing the caller to dispose it.
~std/io:read-stdin()
| ok content |> std/io:print.ln("{{ content:s }}")
| eof |> _
| failed _ |> _
Must fail at runtime with:
CONTAINS allocatedError Verification
Expected Error Pattern
RED PIN — design gap: std/io:read-stdin returns a bare []const u8 with no
phantom obligation. The allocator-owned buffer leaks. The phantom checker
is blind because the type carries no allocated! state. This is the stdin
twin of 335_042 (read-file gap). Pin stays red until the IO surface gains
phantom obligation on its allocated outputs.Actual Compiler Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission)Test Configuration
MUST_FAIL