037 note is the observer channel

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

--- granted session
  note -> {"branch":"","value":"ok"} bound: r1
  chain -> {"branch":"","value":"ok"}
note -> {"branch":"","value":"ok"} bound: r2 as n
echo -> {"branch":"","value":"ok"} bound: r3

  noarg dispatch-error: 'note' needs a `text:` field — note(text: "what you're thinking")
  note-rN -> {"branch":"","value":"ok"}
  tail partial wire_failures=0
step 1/2 residue bound: r5 — your note did not parse as wire, but the observer kept it. Well-formed: note(text: "..."); to deliver it to the user, call say(text: r5)
step 2/2 result: {"branch":"","value":"reached"} bound: r6

--- ungranted session
  denied: event-denied note
--- done

Expected output

--- granted session
  note -> {"branch":"","value":"ok"} bound: r1
  chain -> {"branch":"","value":"ok"}
note -> {"branch":"","value":"ok"} bound: r2 as n
echo -> {"branch":"","value":"ok"} bound: r3

  noarg dispatch-error: 'note' needs a `text:` field — note(text: "what you're thinking")
  note-rN -> {"branch":"","value":"ok"}
  tail partial wire_failures=0
step 1/2 residue bound: r5 — your note did not parse as wire, but the observer kept it. Well-formed: note(text: "..."); to deliver it to the user, call say(text: r5)
step 2/2 result: {"branch":"","value":"reached"} bound: r6

--- ungranted session
  denied: event-denied note
--- done

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "echo", source: echo(1))
subflow ~noted click a branch to expand · @labels scroll to their anchor
run (br, source: "note(text: \"checking tier before touching the reservation\")")
subflow ~note-chain click a branch to expand · @labels scroll to their anchor
run (br, source: "note(text: \"plan: greet, then book\")\n| ok n |> echo(text: n)")
subflow ~note-no-arg click a branch to expand · @labels scroll to their anchor
run (br, source: "note()")
subflow ~note-rname click a branch to expand · @labels scroll to their anchor
run (br, source: "note(text: r1)")
subflow ~note-tail click a branch to expand · @labels scroll to their anchor
run (br, source: "note(text: bare prose, the natural spelling)echo(text: \"reached\")")
subflow ~denied-note click a branch to expand · @labels scroll to their anchor
run (br, source: "note(text: \"can you hear me\")")
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "s1", scope: "echo", introspection: true)

Test Configuration

MUST_RUN