Refinement note: the live-advance core to production
This page is part of the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at LiveAdvanceCoreRefinement.md, and llms.txt lists every page.This note maps WalLiveAdvanceCore.tla - when one leaf's
activation may advance its read position over its own applied appends without reading
the WAL, and what that does to the shared snapshot and the GC trim - to the
Orleans.Lattice code that plays each role. It is module C of the five modules promoted
from the design model design/WalLiveAdvance.tla for epic
#5605, and the sink of their assume-guarantee graph
(LiveAdvanceInterface.md). The design authority is
design/LiveAdvanceDesign.md: section 1's "Arming" list,
section 4's unstamped watermark and self-report, and "The model". Production landed in
#5704. Like the other notes in this directory it is a documented mapping, not a
refinement proof: the gates check its names, detectors and coverage, and its claims were
checked by reading production.
In plain terms, the module guarantees that a leaf's live advance never moves its read
position past a record of its range it does not hold, whoever wrote that record; that
the shared snapshot never claims coverage of a record it lacks; that the GC never trims
an acknowledged append the snapshot lacks; and that the append fence never rejects an
unstamped append. It also checks that a newborn leaf's WAL pin eventually becomes usable
through the live advance alone, without a replay from -1. It relies on the other four
modules only through the guarantees they check.
Contents
- Model scope in one paragraph: One leaf L at one WAL partition of three offsets.
- Interface: This module is C in the assume-guarantee graph of the five modules that replace the design model.
- Variable mapping
- Action mapping
- Property mapping
- Excluded properties
- Property classification (issue #2321):
TypeOKand the four invariants are state safety, reached and checked on the base and re-checked in each variant. - Design mutations moved here: The design model's mutations the contract assigns to this module were moved, re-targeted where needed and re-anchored on this module's text.
- Deliberate abstraction gaps: C checks what a split hint may claim - every durable record at or below it is in the rows handed to the sibling (
SiblingHintHonest) - and that a capture claims only the read position over rows held (SnapshotHonest).
Model scope in one paragraph
One leaf L at one WAL partition of three offsets. Its born activation a1 and one
duplicate a2, which starts from the shared snapshot, replay, live-advance, capture into
the shared per-leaf snapshot, and append; the GC trims below the snapshot's coverage.
Every other author of an entry L owns is environment, constrained exactly by the
guarantee of the module that owns it: own stamped appends by the current activation only,
with a claim head equal to the allocator head at the raise (E); foreign appends only while
L's marker is open or not initialised, with a close recording a head above them once it is
(H); one hand-off window and
a hand-off that may deliver a foreign record to an activation; a 10.2.0 silo's unstamped
append, always admitted and raising the partition's unstamped watermark. The base adds
nothing else. The variants add one environment each: a WAL shard restart (Restart), own
unstamped appends by any running activation (GateFlip), L's tree purged and re-created
with a straddler of the purged incarnation and the re-created incarnation's first
initialisation (R and H, in three slices: Recreate, RecreateSurvivor and
RecreateSurvivorMixed), and a bulk-born leaf (Bulk, B). The core owns
Armed(a), LiveAdvance, Replay, Capture, GcTrim, the applied-prefix tracker
(mine, and the in-flight own appends), the unstamped watermark with its restart reset and
self-report, and the duplicate. The base and the variants whose newborn it applies to
(Bulk, KeyMove, PreArmBulk, FreeKeyMove, FreeSplitBirth, FreeSplitLink,
FreeEpochOnly and FreeForwardIn) also check the liveness property
NewbornPinEventuallyUsable under LiveSpec's explicit fairness, and the base,
FreeSplitLink, FreeEpochOnly and FreeForwardIn the second, SplitEventuallyLinked;
the other variants check safety only.
Excluded properties
| Spec property | Reason |
|---|---|
TypeOK |
Finite-domain model sanity, not a production representation. It retains its own paired experiment. |
Design mutations moved here
The design model's mutations the contract assigns to this module were moved, re-targeted where needed and re-anchored on this module's text.
| Design mutation | Here |
|---|---|
NoTrimPastAckedLiveAdvance5578 |
Same name. It replaces Armed with #5578's rule and drops the current-activation guard from OwnAlloc, the environment's form of the epoch check it removed. |
ReadPositionHonestNoClaimHeadReplay |
Same name; edits Armed. |
SnapshotHonestNoOwnTracker |
Same name; edits Armed. |
ReadPositionHonestNoSelfReport |
Same name; anchored on OwnAllocUnstamped, with WithGateFlip. |
ReadPositionHonestUnstampedNotReported |
Same name; edits Armed. The base carries the 10.2.0 silo's append, so it needs no bound. |
ReadPositionHonestRestartForgetsUnstamped |
Same name; anchored on Restart, with WithRestart. |
OldNeverRejectedRejectedOnceFenced |
Same name; the edit is the admission in OldAlloc, and the partition is fenced once any claim of L has been raised there. |
Two of the design's redundancy checks bear on Armed. ReadPositionHonestNoMarkerInit,
clean in the design's legacy hand-off configuration, is red here: with the purge in the
environment, the initialised guard is what holds a re-created incarnation while a write of
the purged one is still allocated, so it is a mutation in this module.
ReadPositionHonestArmsWithoutClaim stays a redundancy check: run locally against this
module's base and its four variants as member 6a landed them it is clean, because an activation that has not claimed has only
unstamped own appends, each reporting itself, so it never arms past one. It is kept, as the
design keeps it, because arming without a claim is meaningless, and it is not in the
mutation directory, which holds only experiments that must go red.
ReadPositionHonestAssumePurgeSparesClaimed is a redundancy check too: with the purge
leaving the current activation's epoch raised (Recreate keeping cur), the Recreate
slice stays clean. The core's properties do not tell incarnations apart: the purged
activation's later appends are its own, applied by it and below every later claim head,
so retiring the purged epoch protects the re-created tree's identity, which E and R
check, not any read position here. It is kept out of the mutation directory for the same
reason as the one above.