057 tainted handles mint and gate

✓ Passing This code compiles and runs correctly.

Code

input.kz

Supporting Files

CS_REFUSES

Actual

note() ran 'boot'
AFF[]:
pub tor peek { q: string } -> string<found>
pub tor deep { q: string } -> string<found!>
pub tor wild { h: string<*> }
pub tor note { t: string }
--
peek ok, held=1
AFF[found]:
pub tor peek { q: string } -> string<found>
pub tor deep { q: string } -> string<found!>
pub tor use { h: string<found> }
pub tor drop { h: string<!found> }
pub tor wild { h: string<*> }
pub tor note { t: string }
--
use() ran for 'peek_1'
borrow ok, held=1
taint consume refused: 'h' wants a <found> to spend — 'peek_1' is a borrow taint, not a dischargeable obligation. Mint one through a verb whose signature ends '-> <found!>'
forged refused: 'h' wants a live <found> — 'forged_1' names nothing the session holds. Mint one through a verb whose signature ends '-> <found!>'
wild() ran for 'literal'
wild ok, held=1
deep ok, held=2
drop() ran for 'deep_1'
drop ok, held=1
after sweep, undischarged=0
spent taint refused: 'h' wants a live <found> — 'peek_1' names nothing the session holds. Mint one through a verb whose signature ends '-> <found!>'

Expected output

note() ran 'boot'
AFF[]:
pub tor peek { q: string } -> string<found>
pub tor deep { q: string } -> string<found!>
pub tor wild { h: string<*> }
pub tor note { t: string }
--
peek ok, held=1
AFF[found]:
pub tor peek { q: string } -> string<found>
pub tor deep { q: string } -> string<found!>
pub tor use { h: string<found> }
pub tor drop { h: string<!found> }
pub tor wild { h: string<*> }
pub tor note { t: string }
--
use() ran for 'peek_1'
borrow ok, held=1
taint consume refused: 'h' wants a <found> to spend — 'peek_1' is a borrow taint, not a dischargeable obligation. Mint one through a verb whose signature ends '-> <found!>'
forged refused: 'h' wants a live <found> — 'forged_1' names nothing the session holds. Mint one through a verb whose signature ends '-> <found!>'
wild() ran for 'literal'
wild ok, held=1
deep ok, held=2
drop() ran for 'deep_1'
drop ok, held=1
after sweep, undischarged=0
spent taint refused: 'h' wants a live <found> — 'peek_1' names nothing the session holds. Mint one through a verb whose signature ends '-> <found!>'

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "demo", source: peek(1) deep(1) use(1) drop(1) wild(1) note(1))
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: "note(t: \"boot\")", scope: "demo", budget: 100, handle_pool: &bridge_pool, auto_discharge: false)

Test Configuration

MUST_RUN JS_REFUSES LANGUAGES: zig js cs

JS must refuse with:

error[KORU047]