raft double counted ack

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU030]: Use-after-discharge: binding 'a1' was already discharged and cannot be used
  --> tests/regression/830_THE_WORLD/850_raft_double_counted_ack/input.k:48:0

❌ Compiler coordination error: Phantom semantic validation failed
   (set KORU_BACKEND_TRACE=1 for the backend return trace)

Must fail at runtime with:

CONTAINS Use-after-discharge

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (raft, capacity: 1, source: counted: 0[i64], best: 0[i64], commit: 0[i64], half: 2[i64])
subflow ~tally.count click a branch to expand · @labels scroll to their anchor
stored (source: raft.counted: raft.counted + 1, raft.best: ack)
subflow ~quorum.check click a branch to expand · @labels scroll to their anchor
if (raft.counted > raft.half)
subflow ~commit.advance click a branch to expand · @labels scroll to their anchor
if (upto > raft.commit)
flow ~peer.matched click a branch to expand · @labels scroll to their anchor
peer.matched (id: 1, index: 7)
flow ~quorum.check click a branch to expand · @labels scroll to their anchor
quorum.check

Test Configuration

MUST_ERROR