✓
Passing This code compiles and runs correctly.
Code
// Pins: a quoted wire value carrying RAW newlines still delivers its text —
// the scanner canonicalizes it to \n escapes instead of copying verbatim.
// Before the fix a multi-line quoted `src:` evaluated to "" — the proc saw
// an empty field and downstream emitters shipped empty output (measured
// kopium task2 2026-10-06: say(text: "<three paragraphs>") emitted
// {"kind":"say","text":""} and the marshal's message validator killed
// the run). Escaped \n literals keep working — they were already canonical.
import std/io
import std/bridge
import std/runtime
tor render { src: string }
proc render|zig {
_ = @import("std").posix.write(1, "render:") catch {};
_ = @import("std").posix.write(1, src) catch {};
_ = @import("std").posix.write(1, "\n") catch {};
}
std/runtime:register(scope: "api") {
render(1)
}
tor gated { br: *std/bridge:Bridge<session>, source: string }
gated = std/bridge:run(br, source)
| result r |> std/io:print.ln("ran")
| partial p |> std/io:print.ln("{{ p.report:s }}")
| unhandled-branch ub |> std/io:print.ln("FAIL unhandled {{ ub.branch:s }}")
| event-denied ev |> std/io:print.ln("FAIL denied {{ ev:s }}")
| residue _ |> std/io:print.ln("FAIL: residue outcome")
| parse-error p |> std/io:print.ln("FAIL parse {{ p.message:s }}")
| validation-error v |> std/io:print.ln("FAIL invalid {{ v:s }}")
| shape-error sh |> std/io:print.ln("FAIL shape {{ sh.message:s }}")
| dispatch-error e |> std/io:print.ln("FAIL dispatch {{ e.message:s }}")
| defined d |> std/io:print.ln("FAIL defined {{ d:s }}")
| exhausted _ |> std/io:print.ln("FAIL exhausted")
| scope-not-found s2 |> std/io:print.ln("FAIL noscope {{ s2:s }}")
// Raw newline inside the quoted value — the shape that lost its text.
[with]std/bridge:create(id: "cap", scope: "api"): br
|> gated(br, source: "render(src: \"line1\nline2)\")")
// Control: the escaped-\n spelling was already canonical.
|> gated(br, source: "render(src: \"line3\\nline4\")")
Actual
render:line1
line2)
ran
render:line3
line4
ran
Expected output
render:line1
line2)
ran
render:line3
line4
ran
Flows
flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "api", source: render(1))
subflow ~gated click a branch to expand · @labels scroll to their anchor
run (br, source)
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "cap", scope: "api")
Test Configuration
MUST_RUN