✗
Failing This test is currently failing.
Failed: output
Failure Output
🎯 Compiler coordination: Passes: 22 (flow-based: elaborate, analysis, emission) Code
// PIN (currently RED — silent wrong-code defect, measured 2026-11-22):
// a `when` guard on a std/store:watch field arm drops a `std/store:stored`
// body. Emitted shape (scratch/duration): `.v => |x| if (x > 1) {}` — the
// guard plants at the write site per Ruling 7 ("guard included"), the
// body vanishes. Every green guarded watch in this cluster carries a
// print body (690_002/013/026/030/340); every green guarded `stored`
// body sits under a query arm (690_008/030/297). This join was unprobed.
//
// Worse: when the bound name is used only by the guard, nothing even
// notices — the program compiles and silently never writes. (When the
// name is otherwise unused, the same drop surfaces as a backend
// unused-capture error.)
//
// Semantics under the ruling: dst follows src for writes > 1.
import std/io
import std/store
std/store:new(src) { v: 0[i64] }
std/store:new(dst) { v: 0[i64] }
std/store:watch(src)
! v x when x > 1 |> std/store:stored { dst.v: x }
std/store:watch(dst)
! v x |> std/io:print.ln("dst {{ x:d }}")
std/store:stored { src.v: 1 }
std/store:stored { src.v: 2 }
std/store:stored { src.v: 3 }
Expected output
dst 2
dst 3
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (src, source: v: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (dst, source: v: 0[i64])
flow ~watch click a branch to expand · @labels scroll to their anchor
watch (src)
flow ~watch click a branch to expand · @labels scroll to their anchor
watch (dst)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: src.v: 1)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: src.v: 2)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: src.v: 3)
Test Configuration
MUST_RUN LANGUAGES: zig cs