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 ClaimHeadCoversPriorAppendsE, WalAppendEpochClaim(a)setsclaimHead[a]tonextin the step that makesacurrentReadPositionHonestAssumeClaimHeadBelowAllocatorA superseded activation never allocates again; no two activations share a raised epoch StaleEpochNeverAppends,RaisedEpochUniqueE, WalAppendEpochOwnAlloc(a)requirescur = a; aClaimmakes the previous current activation stale, and a stale one never claims; the purge retires every raised epoch (Recreateleaves no activation current), but an activation that never claimed may claim afterwards, because E's clear finds no row of itReadPositionHonestAssumeSupersededAllocatesA foreign append is allocated only while L's marker is open, or below the closedAtits close recordedHandOffBoundH, WalHandOffFenceForeignAllocrequireshoOpen, or the marker not initialised, where H's guarantee is conditioned away;Closerecords any head up tonextabove every foreign offset once the marker is initialised, and any head up tonextbeforeReadPositionHonestAssumeForeignAfterClose(the allocation) andReadPositionHonestAssumeCloseHeadUnderstated(the close)An absent or uninitialised marker holds L AbsentMarkerHoldsH, WalHandOffFencethe purge deletes the marker: mInitisFALSEuntil the first initialisationReadPositionHonestAssumeUninitialisedMarkerClosedEvery close, and the first initialisation, max-merges its heads into closedAt, so it never decreases within an incarnation of the markerCloseHeadMonotoneH, WalHandOffFenceCloseandMarkInitwriteMax2(hoClosedAt, h); the purge discards the marker, soRecreateresetshoClosedAtReadPositionHonestAssumeCloseReplacesHeadsA straddler is allocated only below the heads the re-created incarnation's first initialisation records StraddlerBelowInitR, WalRoutingFloorStraddlerAllocrequires~reinitReadPositionHonestAssumeStraddlerAfterInit(the allocation) andReadPositionHonestAssumeInitHeadsMissing(the initialisation)The first initialisation records a head above every offset allocated before it, whoever allocated it InitHeadCoversPriorAllocationsR, WalRoutingFloorMarkInitrecords any head up tonextabove every foreign and straddler offsetReadPositionHonestAssumeInitHeadBelowForeignA bulk-born leaf's birth position is at or below every record of its range it does not hold at birth BulkHintBoundB, WalBulkSwitchCreatepicks 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 itReadPositionHonestAssumeBulkHintAboveUnheldUnder the lazy arm (#5833), a bulk switch's close head is above every record allocated before it SwitchCloseCoversPriorAllocationsB, WalBulkSwitchClosewithWithPreArmandWithBulkrecords a head above every foreign and pre-existing record (CloseCovers)ReadPositionHonestAssumeBulkCloseBelowPriorAllocationsA 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, WalRoutingFloorOtherReceiverArmandResolveDeferredraisegLby maxReadPositionHonestAssumeLaterReclaimLowersGenerationEvery unstamped append is reported the stamp census the core itself (the watermark) OldAllocandOwnAllocUnstampedraiselastU; a stamped append's response reports it; an own unstamped append reports itselfReadPositionHonestAssumeUnstampedUnreportedFour readings of the contract are worth stating.
RaisedEpochUniqueandStaleEpochNeverAppendsare 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:StraddlerBelowInitbounds every append by an initiator of the purged incarnation by the first initialisation's heads, which is whyReadPositionHonestAssumeInitHeadsMissingandReadPositionHonestAssumeUninitialisedMarkerClosedboth 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 tonextabove the offsets it bounds - rather thannextitself. Recordingnextwould makeclosedAtmonotone incidentally, as the allocator only grows, so the model would never depend onCloseHeadMonotoneand 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 inRecreate).Guarantees. Four, each a checked invariant of the base and every variant, consumed by no other module:
ReadPositionHonest,SnapshotHonest,NoTrimPastAckedandOldNeverRejected; two cost witnesses of the lazy arm (#5833), checked where their environment allows them,PreArmCostWitnessandReclaimCostBound; 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, HWalHandOffFence, RWalRoutingFloorand BWalBulkSwitch; 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.