005 exhaustion with handles

? Unknown Status unknown.

Code

input.kz

Expected output

opened x.txt
auto-closing file
[AUTO-DISCHARGE] Invoked 'close' for handle 'file_1' [main:opened]
PASS: exhausted with 10 used, last event: open

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "test", source: open(10) close(1) expensive-read(100) // Very expensive!)
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: TEST_SOURCE, scope: "test", budget: 50, auto-discharge: true)

Test Configuration

MUST_RUN