022 branch payload acquires once

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

after open, holds 1
posted
after post-ok, holds 1
bad
after post-bad, holds 1
close() ran — released 'res_1'
[BRIDGE] Invoked 'close' for handle 'res_1' [main:open]

Expected output

after open, holds 1
posted
after post-ok, holds 1
bad
after post-bad, holds 1
close() ran — released 'res_1'
[BRIDGE] Invoked 'close' for handle 'res_1' [main:open]

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "res", source: open(10) post(1) close(1) echo(1))
subflow ~open-turn click a branch to expand · @labels scroll to their anchor
run (br, source: "open(path: \"x\")")
subflow ~post-ok click a branch to expand · @labels scroll to their anchor
run (br, source: "post(handle: \"res_1\", amount: \"5\")\n| ok h |> echo(text: \"posted\")\n| bad-amount b |> echo(text: \"bad\")")
subflow ~post-bad click a branch to expand · @labels scroll to their anchor
run (br, source: "post(handle: \"res_1\", amount: \"bad\")\n| ok h |> echo(text: \"posted\")\n| bad-amount b |> echo(text: \"bad\")")
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "b1", scope: "res")

Test Configuration

MUST_RUN