✓
Passing This code compiles and runs correctly.
Code
// A store with TWO columns keeps the ROW RECORD in its `! discharge` payload.
//
// This is the control for the one-column identity lowering: arity picks the
// payload shape, so at two columns `item` is a record and `item.<field>` is the
// only way to reach a column. The 2026-07-21 per-field reissue reason is live
// here — `tx` carries an obligation, `n` does not, and one payload has to carry
// both.
import std/io
import std/store
import app/lib/tx
std/store:new(txns, capacity: 8) { tx: *app/lib/tx:Transaction<active!>, n: i64 }
! discharge item |> app/lib/tx:commit(item.tx)
app/lib/tx:begin(): t1 |> std/store:insert(txns) { tx: t1, n: 1 }
| row _ |> _
app/lib/tx:begin(): t2 |> std/store:insert(txns) { tx: t2, n: 2 }
| row _ |> _
std/io:print.ln("inserted")
Actual
inserted
commit 7
commit 7
Must contain:
insertedFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: txns, capacity: 8, source: tx: *app/lib/tx:Transaction<active!>, n: i64)
flow ~begin click a branch to expand · @labels scroll to their anchor
begin
flow ~begin click a branch to expand · @labels scroll to their anchor
begin
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "inserted")
Imported Files
// An AMBIGUOUS owned resource: *Transaction<active!> with TWO void dischargers
// consuming <!active> — commit AND rollback. The store cannot pick, so an owned
// column of this type must be DRAINED (caller discharges each element), not
// auto-torn-down. (Mirrors 690_035's entity ambiguity one level down.)
const std = @import("std");
const Transaction = struct { id: i32 };
~pub tor begin { } -> *Transaction<active!>
~proc begin|zig {
const t = std.heap.page_allocator.create(Transaction) catch unreachable;
t.* = .{ .id = 7 };
return t;
}
~pub tor commit { tx: *Transaction<!active> }
~proc commit|zig {
std.debug.print("commit {d}\n", .{tx.id});
std.heap.page_allocator.destroy(tx);
}
~pub tor rollback { tx: *Transaction<!active> }
~proc rollback|zig {
std.debug.print("rollback {d}\n", .{tx.id});
std.heap.page_allocator.destroy(tx);
}
Test Configuration
MUST_RUN