✗
Failing This test is currently failing.
Failed: leak-output
Failure Output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission) Code
// Pins std/compress:gzip across body shapes — the tor's `compressed` branch
// carries {data, original_size}; `std/compress:crc32` pins the emitted
// stream's exact bytes as a number (the encoder is deterministic: same
// input, same tree, same stream). Lengths pin block-type selection: the
// near-empty bodies take the fixed-Huffman path, the repeated-JSON body
// earns a dynamic block.
import std/io
import std/compress
// empty body — valid gzip stream, header+trailer only
std/compress:gzip(data: "")
| error e |> std/io:print.ln("ERR {{ e:s }}")
| compressed { data, original_size } |> std/compress:crc32(data): crc
|> std/io:print.ln("empty {{ original_size:d }}->{{ data.len:d }} crc={{ crc:d }}")
// short literal — fixed block
std/compress:gzip(data: "hello koru")
| error e |> std/io:print.ln("ERR {{ e:s }}")
| compressed { data, original_size } |> std/compress:crc32(data): crc
|> std/io:print.ln("short {{ original_size:d }}->{{ data.len:d }} crc={{ crc:d }}")
// repeated-key JSON — the shape that earns a dynamic Huffman block
std/compress:gzip(data: "{\"items\":[{\"id\":1,\"name\":\"item-1\",\"qty\":7},{\"id\":2,\"name\":\"item-2\",\"qty\":14},{\"id\":3,\"name\":\"item-3\",\"qty\":21}],\"count\":3}")
| error e |> std/io:print.ln("ERR {{ e:s }}")
| compressed { data, original_size } |> std/compress:crc32(data): crc
|> std/io:print.ln("json {{ original_size:d }}->{{ data.len:d }} crc={{ crc:d }}")
Actual
empty 0->20 crc=3337515259
short 10->30 crc=1488681909
json 122->95 crc=803705021
KORU LEAK CHECK FAILED: the produced program leaked (trace above)
Expected output
empty 0->20 crc=3337515259
short 10->30 crc=1488681909
json 122->95 crc=803705021
Flows
flow ~gzip click a branch to expand · @labels scroll to their anchor
gzip (data: "")
flow ~gzip click a branch to expand · @labels scroll to their anchor
gzip (data: "hello koru")
flow ~gzip click a branch to expand · @labels scroll to their anchor
gzip (data: "{\"items\":[{\"id\":1,\"name\":\"item-1\",\"qty\":7},{\"id\":2,\"name\":\"item-2\",\"qty\":14},{\"id\":3,\"name\":\"item-3\",\"qty\":21}],\"count\":3}")
Test Configuration
MUST_RUN