✓
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 147006165 panic: std/store: stale row handle into store 'nodes' - the row it addressed was removed (stale-handle trap pinned at 690_115)
???:?:?: 0x102aa647f in _output_emitted.main_module.__KoruStoreT_nodes.__koru_resolve (???)
???:?:?: 0x102aa5973 in _output_emitted.main_module.flow0 (???)
???:?:?: 0x102aa574f in _output_emitted.main (???)
???:?:?: 0x102aa566b in _main (???)
???:?:?: 0x1816a3dff in ??? (???)
???:?:?: 0x0 in ??? (???)
Expected patterns
Each line is a regex that must match the program output.
took 100
std/store: stale row handle into store 'nodes' - the row it addressed was removedFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (nodes, capacity: 8, source: val: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (out, source: v: 0[i64])
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (nodes, source: val: 100)
Test Configuration
MUST_RUN EXPECT_TRAP · exit # Zig's panic handler aborts: 128 + SIGABRT(6) = 134.
134