Interface

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 interface.md, and llms.txt lists every page.

Part of Refinement note: the live-advance core to production.

This module is C in the assume-guarantee graph of the five modules that replace the design model. It reads no state of the other modules: each assumption is an environment step or guard written in the contract's vocabulary, and the assumption mutations below weaken each one in turn and go red, so each is load-bearing.

  • Assumptions. Every guarantee the contract lists for C, each modelled as stated:

    Assumption Guarantee Discharged by Here Weakened by
    A claim makes one activation current, its head the allocator head at the raise ClaimHeadCoversPriorAppends E, WalAppendEpoch Claim(a) sets claimHead[a] to next in the step that makes a current ReadPositionHonestAssumeClaimHeadBelowAllocator
    A superseded activation never allocates again; no two activations share a raised epoch StaleEpochNeverAppends, RaisedEpochUnique E, WalAppendEpoch OwnAlloc(a) requires cur = a; a Claim makes the previous current activation stale, and a stale one never claims; the purge retires every raised epoch (Recreate leaves no activation current), but an activation that never claimed may claim afterwards, because E's clear finds no row of it ReadPositionHonestAssumeSupersededAllocates
    A foreign append is allocated only while L's marker is open, or below the closedAt its close recorded HandOffBound H, WalHandOffFence ForeignAlloc requires hoOpen, or the marker not initialised, where H's guarantee is conditioned away; Close records any head up to next above every foreign offset once the marker is initialised, and any head up to next before ReadPositionHonestAssumeForeignAfterClose (the allocation) and ReadPositionHonestAssumeCloseHeadUnderstated (the close)
    An absent or uninitialised marker holds L AbsentMarkerHolds H, WalHandOffFence the purge deletes the marker: mInit is FALSE until the first initialisation ReadPositionHonestAssumeUninitialisedMarkerClosed
    Every close, and the first initialisation, max-merges its heads into closedAt, so it never decreases within an incarnation of the marker CloseHeadMonotone H, WalHandOffFence Close and MarkInit write Max2(hoClosedAt, h); the purge discards the marker, so Recreate resets hoClosedAt ReadPositionHonestAssumeCloseReplacesHeads
    A straddler is allocated only below the heads the re-created incarnation's first initialisation records StraddlerBelowInit R, WalRoutingFloor StraddlerAlloc requires ~reinit ReadPositionHonestAssumeStraddlerAfterInit (the allocation) and ReadPositionHonestAssumeInitHeadsMissing (the initialisation)
    The first initialisation records a head above every offset allocated before it, whoever allocated it InitHeadCoversPriorAllocations R, WalRoutingFloor MarkInit records any head up to next above every foreign and straddler offset ReadPositionHonestAssumeInitHeadBelowForeign
    A bulk-born leaf's birth position is at or below every record of its range it does not hold at birth BulkHintBound B, WalBulkSwitch Create picks any read position up to the allocator head, and holds every record allocated at or below it: B's guarantee itself, not B's protocol, which starts at or below the hint minus one (#5752's cap, a timed-out or partial relocation) but does not state it ReadPositionHonestAssumeBulkHintAboveUnheld
    Under the lazy arm (#5833), a bulk switch's close head is above every record allocated before it SwitchCloseCoversPriorAllocations B, WalBulkSwitch Close with WithPreArm and WithBulk records a head above every foreign and pre-existing record (CloseCovers) ReadPositionHonestAssumeBulkCloseBelowPriorAllocations
    A re-claim of a routing generation at the partition only raises the loaded value the WAL's loaded entry is max-merged (R's cold load, C7; E's claim) R, WalRoutingFloor OtherReceiverArm and ResolveDeferred raise gL by max ReadPositionHonestAssumeLaterReclaimLowersGeneration
    Every unstamped append is reported the stamp census the core itself (the watermark) OldAlloc and OwnAllocUnstamped raise lastU; a stamped append's response reports it; an own unstamped append reports itself ReadPositionHonestAssumeUnstampedUnreported

    Four readings of the contract are worth stating. RaisedEpochUnique and StaleEpochNeverAppends are modelled together as "only the current activation allocates a stamped append". BulkHintBound's "birth read position" is the first offset the leaf reads, one above its checkpoint; every record below it is held. And a write a purged incarnation's initiator allocated before the purge, in a window the purge left open, is covered as a straddler: StraddlerBelowInit bounds every append by an initiator of the purged incarnation by the first initialisation's heads, which is why ReadPositionHonestAssumeInitHeadsMissing and ReadPositionHonestAssumeUninitialisedMarkerClosed both find a counterexample through such a write as well as through a straddler. The environment is exactly each guarantee as its owning module checks it, not the protocol behind it: member 6c's composite check, which copies each producer's guarantees and each of these steps, found five edges where this module had assumed more, and each was widened or the producer's guarantee stated. A never-claimed activation may outlive the purge (E); a foreign append and a close are unconstrained while L's marker is not initialised (H, whose guarantee is conditioned on the marker reading closed); the first initialisation's head covers every earlier allocation (R, InitHeadCoversPriorAllocations, stated for this); and a bulk-born leaf may start at any read position that holds every record at or below it (B; a second composite pass found the hint bound is B's protocol, not its guarantee). Finally, a close and the first initialisation record the weakest head their guarantee allows - any head up to next above the offsets it bounds - rather than next itself. Recording next would make closedAt monotone incidentally, as the allocator only grows, so the model would never depend on CloseHeadMonotone and could not show it load-bearing: with heads chosen this way and overwritten, a window opened before the re-created incarnation's first initialisation and closed after it lowers the initialisation's heads below the straddler (ReadPositionHonestAssumeCloseReplacesHeads, red in Recreate).

  • Guarantees. Four, each a checked invariant of the base and every variant, consumed by no other module: ReadPositionHonest, SnapshotHonest, NoTrimPastAcked and OldNeverRejected; two cost witnesses of the lazy arm (#5833), checked where their environment allows them, PreArmCostWitness and ReclaimCostBound; and the liveness property, checked on the base and in the variants listed above, NewbornPinEventuallyUsable, the armed newborn's pin becoming usable without a replay from -1.

  • The graph. E <- H, E <- R, and {E, H, R, B} <- C, where E is WalAppendEpoch, H WalHandOffFence, R WalRoutingFloor and B WalBulkSwitch; an arrow points from the module that assumes to the module that guarantees. C assumes every other module and is assumed by none, so it closes no cycle.