○
Planned This feature is planned but not yet implemented.
OWED: obligation relay — consumer arm re-sends minted v into a second channel; custody chains. MEASURED (2026-10): transit works — the relay send consumes `v` under `| ok` — but the pin's own `| ok |> print.ln("relayed {{ v.id:d }}")` arm then reads `v.id`, which is the use-after-discharge refusal 699_026 pins as a wall (KORU030 'binding v was already discharged'). The input contradicts the edge contract it pins: under "ok consumes", `v` is dead inside `| ok`. Fix the input (read `v.id` before the send, or print a static string) OR rule that custody-consume leaves the value bytes readable — that ruling is a language-semantics question, not a channel.kz decision.
Code
// OWED: obligations relay — a consumer arm re-sends its minted value into a
// second channel. Custody chains through vessels: v consumed by the second
// send, minted at the second consumer, discharged there. The ledger threads
// through as many vessel boundaries as the program draws.
import std/io
import std/proto
import std/channel
import std/pump
std/proto(Src) {
id: i64
}
pub tor mk { i: i64 } -> Src<live!>
mk -> { id: i }
pub tor dispose { s: Src<!live> } -> i64
dispose -> s.id
std/channel:new(inbox, capacity: 8) { src: Src }
std/channel:new(outbox, capacity: 8) { src: Src }
std/channel(inbox)
! src v |> std/channel:send(outbox, v)
| ok |> std/io:print.ln("relayed {{ v.id:d }}")
| full |> std/io:print.ln("relay full")
| closed |> std/io:print.ln("relay closed")
std/channel(outbox)
! src v |> dispose(s: v): id |> std/io:print.ln("final {{ id:d }}")
mk(i: 1): s |> std/channel:send(inbox, s)
| ok |> std/channel:close(inbox)
| ok |> std/channel:close(outbox)
| ok |> std/io:print.ln("sealed")
| full |> std/io:print.ln("full")
| closed |> std/io:print.ln("closed")
std/pump:create(main)
| drained |> std/io:print.ln("drained")
std/pump(main)
! step |> inbox-step()
! live |> inbox-live()
std/pump(main)
! step |> outbox-step()
! live |> outbox-live()
std/pump:run(main)
Expected output
sealed
relayed 1
final 1
drained
Flows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Src, source: id: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inbox, capacity: 8, source: src: Src)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: outbox, capacity: 8, source: src: Src)
flow ~std/channel click a branch to expand · @labels scroll to their anchor
std/channel (inbox)
flow ~std/channel click a branch to expand · @labels scroll to their anchor
std/channel (outbox)
flow ~mk click a branch to expand · @labels scroll to their anchor
mk (i: 1)
flow ~create click a branch to expand · @labels scroll to their anchor
create (expr: main)
flow ~std/pump click a branch to expand · @labels scroll to their anchor
std/pump (main)
flow ~std/pump click a branch to expand · @labels scroll to their anchor
std/pump (main)
flow ~run click a branch to expand · @labels scroll to their anchor
run (main)
Test Configuration
MUST_RUN