✓
Passing This code compiles and runs correctly.
Code
// PINS O10.iv's HANDLE-SAFETY FLOOR (690_STORE/DESIGN.md), read half: an
// indexed field READ (`nodes[a].val` on an expression's value side, the
// 690_076 lowering) through a taken row's handle traps. This is the path
// DESIGN.md's adversary called the true silent-wrong-answer risk — a read
// that skips the generation compare returns another row's data with no
// diagnostic. The floor is the compare; elision must be PROVEN, not skipped.
import std/io
import std/store
std/store:new(nodes, capacity: 8) { val: i64 }
std/store:new(out) { v: 0[i64] }
std/store:insert(nodes) { val: 100 }
| row a |> std/store:insert(nodes) { val: 200 }
| row b |> std/store:take(nodes[a])
| item gone |> std/io:print.ln("took {{ gone.val:d }}")
|> std/store:stored { out.v: nodes[a].val }
Actual
took 100
thread 173561762 panic: std/store: stale row handle into store 'nodes' - the row it addressed was removed (stale-handle trap pinned at 690_115)
???:?:?: 0x104d98bfb in _main (???)
???:?:?: 0x18eec7dff in ??? (???)
???:?:?: 0x0 in ??? (???)
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: nodes, capacity: 8, source: val: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: out, source: v: 0[i64])
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: nodes, source: val: 100)
Test Configuration
MUST_RUN