Action mapping

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

Part of Refinement note: WAL durability lifecycle to production.

Spec action Protocol step Code counterpart Detector
Append Offset allocation WalShardGrain.AppendAsync assigns the next offset through WalOffsetAllocationCore.Assign under the shard's state gate. Over-approximation: the model appends whenever an offset remains; production appends only on a client write, a subset. Yes: WalShardGrainTests.AppendAsync_assigns_monotonically_increasing_sequence_numbers and WalOffsetContiguityCoyoteTests.Atomic_assign_keeps_every_offset_unique_and_dense.
FlushAck(o) Flush lands, write acknowledged, owner folds it in; or the store refuses an occupied offset WalShardGrain.FlushAsync completes the append's acknowledgement only after the provider flush; flushes of different appends complete in any order. The owning leaf applies its own write to its cache on the foreground path without advancing its checkpoint. A flush finding its offset occupied is refused by the store's create-only rows and overlap guard, unacknowledged, and fails the shard into its resync; under the re-seed below it is unreachable (see the redundancy checks). Cross-silo, the commit is a conditional TAIL write on the instance's fence (WalShardCommitFence.TryGetCondition, AzureTableWalStorageProvider.PhaseTwoWorker.CommitBatchAsync): refused while the instance's view of TAIL is stale, and otherwise raising TAIL and making every other instance's view stale (WalShardCommitFence.Advance). A commit that landed but whose response was lost, proven by its replay (AzureTableWalStorageProvider.ProvePhaseTwoReplayAsync), is the same landed commit: the proof's TAIL read keeps the instance's view current only when the row is still the one it wrote, its value and its commit nonce (AzureTableWalEntity.CommitNonce), so no write of TAIL has intervened; any other row, a successor's same-value re-stamp (AzureTableWalStorageProvider.RestampTailAsync) included, leaves it stale (#5605 W7). A refusal reaches the caller as a retryable timeout, the batch's outcome decided by the resync. A write may continue the batch before it (ackedMid). Abstraction: a commit whose acknowledgement was lost and is later proven by replay is the model's one landed step. Over-approximation: the model also acknowledges a write whose owner is not active, without the apply; production routes a write through an active leaf, so the model's set of acknowledged-but-unapplied writes is a superset. Yes: WalShardGrainTests.AppendAsync_hung_provider_flush_faults_with_timeout_when_deadline_elapses - an append whose flush never lands does not complete; the refusal by WalShardGrainTests.Two_activations_issuing_the_same_offset_never_displace_the_acknowledged_write and AzureTableWalStorageProviderOverlapIntegrationTests.A_second_writer_reissuing_an_acknowledged_batchs_offsets_is_refused_and_changes_no_row (red when phase-1 entry rows are upserted rather than inserted); the fence by PhaseTwoWorkerTests.A_refused_tail_write_invalidates_the_fence_and_refuses_the_claims_made_under_it, AzureTableWalStorageProviderPhaseTwoReplayTests.A_batch_claimed_while_an_earlier_commit_is_resent_commits_once_that_commit_is_proven_durable, AzureTableWalStorageProviderPhaseTwoReplayTests.A_batch_claimed_during_a_resend_is_refused_when_a_successor_restamped_TAIL_at_the_same_value and AzureTableWalStorageProviderOverlapIntegrationTests.A_steady_run_of_appends_commits_under_the_fence_with_no_extra_round_trip.
ShardCrash WAL shard process lost Unflushed appends are lost with the process; the next activation recovers the allocator from the provider's highest stored offset through WalOffsetAllocationCore.RecoveredNextOffset. An abandoned provider call does not survive to land below a reader: the in-memory and file providers' writes die with the process, and the Azure Table provider rolls a late phase-1 row forward in order or back (ReconcileAsync). A call a predecessor abandoned on another silo runs in a process this crash does not kill, so it stays in motion, still hidden. Cross-silo, recovery reads the TAIL row (ct), fills the new instance's fence from it, and re-stamps it through AzureTableWalStorageProvider.ReconcileAsync, as ShardRecover does. A grain activation lost on a silo that keeps running is ActivationLoss. Over-approximation: the crash may happen between any two actions. Yes: WalOffsetAllocationCoreTests.A_recovered_allocator_resumes_one_past_the_highest_stored_offset and WalShardGrainTests.AppendAsync_recovers_offset_counter_from_provider_on_initialization, which drives the same core through the grain's test seam.
ActivationLoss WAL shard grain activation lost on a running silo A deactivation, or a reactivation elsewhere: the activation's provider calls keep running, so every in-flight flush loses its acknowledgement and stays in motion (WalAbandonedFlushRegistry records it), and the next activation recovers the allocator (ShardRecover) before it allocates. A successor on the same silo sees those calls; one on another silo cannot (hidden, the CrossSilo variant), and the predecessor's provider instance keeps the view of TAIL it had (prevFresh). Costs a fault. Yes: WalShardGrainTests.A_reactivated_shard_never_reissues_an_offset_beneath_its_predecessors_abandoned_flush and WalShardGrainTests.A_reactivated_shard_is_held_below_its_predecessors_abandoned_flush_until_it_settles; for a successor on another silo, AzureTableWalStorageProviderOverlapIntegrationTests.A_second_writer_reissuing_the_offsets_of_a_batch_still_in_motion_is_refused.
Resync The post-failure resync re-seeds the allocator WalShardGrain.HandleFlushFailureAsync waits for the later slots' flushes, reconciles the store and re-seeds the next offset to WalShardGrain.RecoveredNextOffsetPastAbandoned: one past the highest stored offset, raised past the end of every abandoned window still in motion (WalAbandonedFlushRegistry), read both before and after the tail read. It does not wait for those calls; a call that never lands leaves a hole readers settle past (#4621). Cross-silo, the store's highest offset is the TAIL row, and the reconcile re-stamps it (AzureTableWalStorageProvider.RestampTailAsync), as ShardRecover does, and refills the instance's fence: a refused conditional write first invalidated it, moving its generation on, so nothing claimed under the old generation is committed (WalShardCommitFence.Invalidate, WalShardCommitFence.Reset). Abstraction: the model re-seeds atomically, so the window snapshot taken before the tail read is not expressed (see the gaps); the generation is abstracted by Resync waiting for the in-flight flushes, each refused while the view is stale. Yes: WalShardGrainTests.A_resync_never_reissues_an_offset_beneath_a_successor_flush_still_in_motion and WalShardGrainTests.A_window_that_settles_during_the_tail_read_is_still_skipped; the refilled fence by PhaseTwoWorkerTests.A_commit_claimed_under_an_older_generation_is_refused_without_a_submit and WalShardCommitFenceTests.A_fill_raises_a_bounded_guard_to_the_observed_tail.
ShardRecover A new activation recovers the allocator WalShardGrain.OnActivateAsync reconciles the store and re-seeds through the same WalShardGrain.RecoveredNextOffsetPastAbandoned, past every window its predecessor abandoned on this silo. Cross-silo, the reconcile (AzureTableWalStorageProvider.ReconcileAsync, through AzureTableWalStorageProvider.ReconcileOnceAsync and AzureTableWalStorageProvider.RestampTailAsync) re-stamps TAIL before the activation serves a read: a conditional write of the value it read, under the ETag it read, re-planned on a refusal. The new ETag puts every other instance's view of TAIL out of date, so a predecessor's late commit is refused by the fence (issue #5825). Abstraction: the re-stamp and its retries are one step; a roll-forward's own conditional TAIL writes, which change the ETag the same way, take its place in production. Yes: WalShardGrainTests.A_reactivated_shard_never_reissues_an_offset_beneath_its_predecessors_abandoned_flush; the re-stamp by AzureTableWalStorageProviderRecoveryRestampIntegrationTests.A_predecessors_late_lower_commit_is_refused_once_a_successor_has_recovered, AzureTableWalStorageProviderRecoveryRestampIntegrationTests.A_recovery_changes_tails_etag_and_keeps_its_value and AzureTableWalStorageProviderTrimReconcileTests.ReconcileAsync_restamps_tail_so_a_commit_under_the_etag_it_read_is_refused.
ScheduleReplay(l) Schedule bounded replay independently of a prior checkpoint BPlusLeafGrain.EnsureCoverageLagTimerAsync registers the existing timer after durable identity seeding in BPlusLeafGrain.SetTreeIdAsync and BPlusLeafGrain.InitializeSiblingAsync, as well as on seeded activation and checkpoint persist. The callback BPlusLeafGrain.OnCoverageLagTimerTickAsync routes never-checkpointed leaves, and leaves whose checkpoint is stalled behind the WAL head whether or not they hold rows, through BPlusLeafGrain.DriveStarvedCheckpointFromTimerAsync; BPlusLeafGrain.OnCheckpointStallFastTickAsync dispatches the same drive sooner on process-local append evidence, and empty floor holders also use the GC starvation drive. No foreground append offset is treated as a processed prefix. Yes: WarmLeafCheckpointProgressIntegrationTests.Foreground_only_warm_leaf_banks_loadable_coverage_and_reclaims_its_wal and WarmLeafCheckpointProgressIntegrationTests.Sibling_birth_arms_progress_before_any_checkpoint (actual runtime timer and accepted snapshot load, with real GC on the root-leaf arm; both red without their birth-time registration).
ReadStep(l) Read the next entry of the shared stream Activation replay and the starvation drive, both through BPlusLeafGrain.ReplayPartitionAsync: shown only offsets below the durable-contiguous watermark (WalShippingWatermark.IsOffsetExposable), which is also bounded by every unsettled abandoned call and by one past the highest stored offset (WalShardGrain.GetReadableHeadAsync, issue #4621), and served only once a new WAL shard activation has recovered (WalShardGrain.OnActivateAsync completes before the grain takes a call), folding owned entries and advancing the read position over every entry read (#2270). A read below the tail returns the surviving suffix. Yes: BPlusLeafGrainTests.ProjectionCheckpointOffset_advances_over_entries_the_leaf_skips, WalShippingWatermarkCoyoteTests.Watermark_never_ships_an_offset_above_a_prefix_hole and WalShippingWatermarkTests.The_first_in_flight_offset_is_never_exposable_and_the_one_below_it_is; the head bound by WalShardGrainTests.A_trailing_hole_is_not_exposed_when_the_post_failure_resync_fails (red only when the _highestStored clamp is removed: the failure handler's resync rewinds the allocator before the call settles, so the clamp carries the bound only when that resync fails, and this test fails it), and the reader's use of that head by WalShardGrainTests.A_head_a_reader_resumes_from_never_passes_an_offset_a_recovered_allocator_can_reissue.
Abandon(o) A flush misses its deadline, or the drain budget expires under it, or the provider surfaces a fault whose outcome is unknown WalShardGrain faults the append's acknowledgement (an unknown outcome to its caller) and registers the still-running provider call in WalAbandonedFlushRegistry, process-wide and keyed by provider, tree and shard, so a reactivation in the same process sees it too. Until the call settles, WalShardGrain.DurableContiguousTailOffset exposes nothing at or above it (issue #4621). A provider fault is not proof that nothing landed: the Azure Table provider marks a phase-1 fault after any attempt that may still commit (a client-side timeout or cancellation, a transient status, a transport failure, or any in-place retry) through WalAppendOutcomeUnknown, with a settle signal that completes once the batch's first entry row is present or a bounded horizon has passed (AzureTableWalStorageProvider.SettleUnknownPhaseOneOutcomeAsync), and the shard registers that signal as the window's call (issue #6116). A call the flush deadline abandons is cancelled with it and can surface that cancellation, marked unknown, while its request may still commit, so the window is held until the call completes and any unknown outcome it carries settles, never on the call's completion alone; retiring it earlier is a SettleHole while the orphan can still LateLand, which the model forbids (issue #6146). Abstraction: a landing after the horizon is outside the model; it sits below every offset allocated since, so it collides with none, and the failed-batch record reclaims its rows. Costs a fault. Yes: WalShardGrainTests.ReadAsync_never_exposes_an_offset_above_an_abandoned_flush_that_can_still_land and WalShardGrainTests.A_reactivated_shard_is_held_below_its_predecessors_abandoned_flush_until_it_settles, red when the watermark ignores an abandoned window or the registry is per activation; for an unknown-outcome fault, WalShardGrainTests.A_fault_whose_outcome_is_unknown_is_fenced_until_its_late_landing_settles (red when the shard treats the fault as a plain failure), WalShardGrainTests.A_deadline_abandoned_call_is_fenced_until_its_unknown_outcome_settles_not_until_it_returns (red when a deadline-abandoned window is retired on the call's completion), AzureTableWalStorageProviderPhaseOneUnknownOutcomeTests.An_exhausted_timeout_is_an_unknown_outcome_that_settles_when_the_batch_lands and AzureTableWalStorageProviderUnknownOutcomeIntegrationTests.A_phase_one_attempt_that_lands_after_its_fault_is_fenced_and_then_reclaimed (red when the provider reports it as failed).
LateLand(o) An abandoned call lands The provider writes the entry. Every provider refuses a write at an occupied offset and at or below its trim watermark (InMemoryWalStorageProvider, FileWalShard, the Azure Table provider's transactional Add), so it lands only in a gap no reader has passed. A call a predecessor abandoned on another silo (hidden) lands through its own provider instance: in any order, possibly below a row of its own (each instance commits phase 2 in arrival order, AzureTableWalStorageProvider.PhaseTwoWorker, issue #5825), at an empty offset or one another batch holds mid-batch (create-only per batch start), and only while its instance's view of TAIL is current (the TAIL commit fence, issue #5810). Yes: AzureTableWalStorageProviderOverlapIntegrationTests.A_stale_writers_later_batch_never_lands_over_a_successors_acknowledged_batch (the fence refuses the predecessor's later batch), WalShardGrainTests.ReadAsync_never_exposes_an_offset_above_an_abandoned_flush_that_can_still_land (the entry is shown in order once it lands), InMemoryWalStorageProviderTrimWatermarkTests.An_append_at_or_below_the_watermark_is_refused_and_allocation_stays_above_it and AzureTableWalStorageProviderOverlapIntegrationTests.A_late_manifest_row_from_an_abandoned_submit_never_displaces_an_acknowledged_batch.
SettleHole(o) An abandoned call settles without landing The registry retires the window and the offset is a permanent hole; readers pass it, and the provider's trim watermark (IWalStorageProvider.GetLowestOffsetAsync, raised durably before any delete) tells it from a trim. A hole above every stored entry stays trailing until a later write lands above it: the watermark is bounded by RecoveredNext, so no reader passes an offset a recovered allocator could reissue. Yes: WalShardGrainTests.ReadAsync_releases_a_hole_once_the_abandoned_flush_settles_without_landing, WalShardGrainTests.A_hole_directly_above_the_trim_watermark_is_not_a_fall_off_for_the_leaf_or_the_subscriber and CrossClusterAtomicVisibilityTests.Shipper_tells_a_hole_above_the_trim_point_from_a_trim (a hole is not a trim), WalShardGrainTests.A_trim_past_a_readers_position_is_still_a_fall_off_with_the_trim_watermark (a trim still is), and WalShardGrainTests.Without_a_trusted_trim_watermark_a_reader_treats_the_hole_above_a_trim_point_as_trimmed (until every silo writes the watermark).
PersistCheckpoint(l) Persist the pending read position BPlusLeafGrain.FlushPendingCheckpointAsync commits the pending advance through BPlusLeafGrain.ApplyPendingCheckpointAdvance and persists it. The coalescing thresholds only delay this step; the model persists any pending advance (the #3608 residual tick makes that eventual). Yes: BPlusLeafGrainTests.Failed_checkpoint_persist_retains_the_pending_advance_for_the_next_flush.
PersistFail(l) A checkpoint persist that fails The persist throws and BPlusLeafGrain.RollbackCheckpointCommit restores state.State and keeps the advance pending (#4017). Yes: BPlusLeafGrainTests.Failed_checkpoint_persist_publishes_no_durable_pin_past_the_last_durably_written_checkpoint and BPlusLeafGrainTests.Failed_deactivation_checkpoint_persist_publishes_no_durable_pin_past_the_last_durably_written_checkpoint.
Capture(l) Capture a snapshot BPlusLeafGrain.CaptureSnapshotCoreAsync: proceeds once any partition is proven checkpointed, declines a claim covering nothing (#2725), writes through ILeafSnapshotStorageGrain.SaveAsync, and records coverage only from a kept capture. The store's LeafSnapshotStorageGrain.MergeMonotone never lowers stored coverage; where production MERGES a regressing claim that carries every stored key, the model keeps the old snapshot outright - the same coverage over a subset of the rows - so every property that holds over the model's snapshot holds over production's. The claim refines the model's read position: while the cache is unanchored (a cold rebuild, or a rehydrate in flight) BPlusLeafGrain.BuildUnanchoredCoverage claims per partition only what the rebuild has provably re-read, and BPlusLeafGrain.UnanchoredCoverageIsCapturable declines a claim that covers nothing or regresses durable coverage (issue #4451, fixed); an anchored cache claims BPlusLeafGrain.BuildCheckpointCoverage. Yes: BPlusLeafGrainTests.Inline_capture_the_store_merges_still_advances_durable_coverage (coverage recorded from a kept capture). For the #4451 claim, BPlusLeafGrainTests.Capture_part_way_through_a_cold_rebuild_banks_only_the_re_read_frontier pins the claim itself (BuildUnanchoredCoverage): it is the one detector red when only the claim reverts to the checkpoint. BPlusLeafGrainTests.Capture_during_a_cold_rebuild_never_claims_coverage_its_rows_lack, BPlusLeafGrainTests.Deactivation_capture_during_a_cold_rebuild_never_claims_coverage_its_rows_lack and BPlusLeafGrainTests.Capture_while_the_snapshot_rehydrate_is_in_flight_never_claims_coverage_its_rows_lack go red only when the claim AND the decline gate (UnanchoredCoverageIsCapturable) revert together. Removing only the gate is undetected by design: with the claim correct, the gate only skips a claim that covers nothing or regresses stored coverage, which the store's monotone merge would never record as a coverage regression anyway. With the claim reverted, the gate still declines the captures those three tests make, which is why only the frontier test reports a claim-only revert.
CaptureFail(l) A capture that fails or is declined The store declines or the write fails; the leaf records no coverage (#3440). Yes: BPlusLeafGrainTests.Inline_capture_declined_by_the_store_does_not_advance_durable_coverage and BPlusLeafGrainTests.Staged_capture_whose_commit_is_declined_does_not_advance_durable_coverage.
PublishPin(l) Publish the durable materialiser pin BPlusLeafGrain.ResolveDurablePinForPartition resolves the pin through LeafDurablePinCore.Resolve and the pin store merges it (WalMaterialiserPinGrain.Merge). Over-approximation: the model may publish between any two steps; production publishes from the flush tail, the deactivation barrier, the starvation drive and the Zero-clock seed. Because the store merges by monotone max, a publication at any step yields an entitlement at least as high as any production schedule's. The never-written release is bounded by the snapshot coverage the leaf holds (issue #4456), and fires only when the leaf holds durable coverage at all: with no snapshot the block stands until a capture records coverage (issue #4523). The empty release of a leaf with a live clock (the (clock, -1) arm) is withheld for every partition until the replay barrier latches (BPlusLeafGrain.WithUnreplayedPartitionsLive, issue #4669); the model's single partition cannot reach that arm (see the gaps), and WalPartitionReleaseModel checks it. Yes: LeafEmptyReleaseBeforeReplayTests.A_cold_leaf_never_releases_a_partition_its_replay_has_not_read (the replay barrier, real grains), LeafDurablePinCoreTests.A_pending_checkpoint_never_reaches_the_pin_issue_3476 and BPlusLeafGrainTests.Batched_pin_flush_over_an_unpersisted_advance_publishes_no_pin_past_the_persisted_checkpoint (the covered arm), and LeafDurablePinCoreTests.The_never_written_release_is_bounded_by_snapshot_coverage_issue_4456, LeafDurablePinCoreTests.The_never_written_release_needs_durable_snapshot_coverage_issue_4523, BPlusLeafGrainTests.Never_written_leaf_holding_a_snapshot_releases_no_further_than_its_coverage, BPlusLeafGrainTests.Never_written_leaf_without_a_snapshot_keeps_its_block_pin and BPlusLeafGrainTests.Never_written_leaf_releases_once_a_kept_capture_covers_its_persisted_checkpoint (the never-written arm).
GcTrim Trim the stream's prefix LatticeWalGc.ApplyDurableMaterialiserFloorAsync computes the offset floor and marks the partition of a standing block pin blocked, which withholds both the cursor predicate and the offset admission there; LatticeWalGc.TrimShardAsync trims the prefix whose every entry WalGcTrimCore.IsEntryEligible admits under WalGcOffsetAdmission.Admits, and its scan stops at the durable offset floor itself. A block pin whose leaf reports no durable offset at all is held more widely still: it leaves the offset census incomplete, which holds the whole tree before any scan. A consumer holding an override hold whose offset is still -1 is read as a block pin too (issue #4641): LatticeWalGc reads each partition's head bound, then the holds, then the offset census, and that order is what keeps a hold raised mid-pass from being missed by a trim that reaches its write. The model has no stamps, so it cannot express the hold; WalPartitionReleaseModel checks it. The model never trims past an append still in flight: implied while any pin holds the floor, and once a purge or a row loss has retired every pin, production's provider refuses such an append below its trim watermark (#4621), which is safe and not explored. Over-approximation: the model trims to the durable offset floor alone; production additionally bounds the trim by uncovered consumers' cursors, causal frontiers and buffer pins, and a configured retention TTL is a retention event the model does not take, whose overtaken consumers detect and recover (see "Retention TTL"). Yes: LatticeWalGcOffsetEntitlementTests.RunOnceAsync_offset_admission_still_stops_at_the_floor_and_attributes_it (the scan stops at the durable offset floor), LatticeWalGcOffsetEntitlementTests.RunOnceAsync_a_block_pin_holds_its_own_partition_while_the_pass_trims_the_others (a block pin that abstains from the offset floor holds its own partition on a pass that does reach the scan) and WalGcTrimFloorCoyoteTests.Min_cursor_floor_never_trims_past_the_slowest_consumer (the trim core never passes the slowest consumer); the override hold by WalOverrideHoldTests.A_trim_keeps_a_replicated_write_stamped_below_an_empty_release_frontier (red when the GC ignores holds) and WalMaterialiserPinGrainOverrideHoldTests.A_hold_stands_until_a_real_offset_lands.
LeafStop(l) Leaf activation ends A crash, a silo restart or a deactivation: the entry cache, the pending checkpoint map and the recorded coverage are per activation and lost; grain state and the snapshot survive. The next activation sees an empty cache and takes the -1 cold override unless a snapshot rehydrates. Yes: LeafReplayStartPolicyTests.An_absent_snapshot_over_an_empty_cache_replays_cold and BPlusLeafGrainTests.Cold_rebuild_over_a_lost_prefix_throws_and_never_captures.
Activate(l) Activation and its replay start BPlusLeafGrain.ExecuteActivationReplayAsync: BPlusLeafGrain.TryRehydrateFromSnapshotAsync loads the snapshot, records its coverage and lowers the checkpoint to it; otherwise LeafReplayStartPolicy.Decide takes the cold override and replays the whole readable WAL, or fails closed when a snapshot that exists failed to load. A leaf with no state row activates only under a create intent its surviving evidence does not refuse (ActivateRowless, issue #4654). Both fall-off checks - LatticeFallOffLogDetector.ClassifyAsync on the warm path and the cold-replay guard - route through WalFallOffCore.IsPrefixLost. A warm activation replay does not ask the detector about a partition whose probed head is at or below its checkpoint (issue #6166): it reads nothing there, and IsPrefixLost would need the tail past a head it has just probed, which no trim below this leaf's pin reaches; the replay that next reads the partition classifies it. Yes: BPlusLeafGrainTests.Activation_rehydrates_cache_from_snapshot_when_offset_exceeds_checkpoint, BPlusLeafGrainTests.Activation_hydrates_empty_cache_from_snapshot_older_than_persisted_checkpoint, WalFallOffCoreTests.The_first_needed_offset_is_the_one_after_the_checkpoint, and for a checkpoint of 0 (FallsOff's cp >= 0, issue #4433) WalFallOffCoreTests.A_zero_checkpoint_still_needs_offset_one_issue_4433, LatticeFallOffLogDetectorTests.ClassifyAsync_with_zero_checkpoint_and_offset_one_trimmed_triggers_WAL_trim and BPlusLeafGrainTests.Cold_rebuild_over_a_durable_zero_checkpoint_whose_next_offset_was_trimmed_throws.
ActivateLoadFail(l) A snapshot that exists fails to load, or one that existed has vanished A stutter: the activation fails closed and is retried. Production has matched this since issue #4450 was fixed: LeafReplayStartPolicy.Decide answers FailClosed for a failed load over an empty cache, the activation throws LeafSnapshotUnavailableException rather than cold-replaying a WAL trimmed under that snapshot, and ILattice.RebuildLeafProjectionAsync is the operator's recovery path. A storage fault on a leaf with no snapshot also fails closed; nothing changes, which the spec admits as a stutter. Since issue #4634 an ABSENT snapshot on a leaf whose row records held snapshot coverage (LeafNodeState.SnapshotCoveredPartitions) fails closed the same way, whatever the WAL's tail reads: the pin store keeps the entitlement the vanished snapshot licensed, so a cold rebuild started while the tail still reads 0 can have its prefix trimmed under it. Yes: LeafReplayStartPolicyTests.A_failed_load_over_an_empty_cache_fails_closed, BPlusLeafGrainTests.Failed_snapshot_load_over_a_trimmed_wal_prefix_fails_the_replay_instead_of_coming_up_from_the_suffix and BPlusLeafGrainTests.Failed_snapshot_load_over_an_intact_wal_fails_the_replay_closed_too; for a vanished snapshot VanishedSnapshotColdStartIntegrationTests.A_cold_start_over_a_vanished_snapshot_does_not_silently_lose_the_prefix_it_covered (real grains), BPlusLeafGrainTests.Vanished_snapshot_over_a_wal_trimmed_under_it_fails_the_replay_instead_of_coming_up_from_the_suffix, BPlusLeafGrainTests.Vanished_snapshot_at_checkpoint_zero_over_a_trimmed_wal_fails_the_replay, BPlusLeafGrainTests.Vanished_snapshot_over_an_untrimmed_wal_still_fails_the_replay_closed and VanishedSnapshotColdStartIntegrationTests.A_cold_start_over_a_vanished_snapshot_fails_closed_even_when_the_tail_is_untrimmed_at_activation (real grains: the tail reads 0 at activation and the GC trims under the would-be rebuild); the record reaching the leaf row before the pin by BPlusLeafGrainTests.Kept_snapshot_record_is_durable_in_the_leaf_row_before_any_pin_is_published and BPlusLeafGrainTests.Failed_record_write_publishes_no_pin_and_the_next_flush_retries_it; the operator rebuild accepting the loss by BPlusLeafGrainTests.Rebuild_over_a_vanished_snapshot_drops_the_record_and_the_leaf_comes_back_accepting_the_loss.
SnapshotVanish(l) The environment destroys a leaf's snapshot Storage loss or an operator deleting the blob ILeafSnapshotStorageGrain keeps (issue #4634). Enabled only under SnapshotLoss, the SnapshotLoss variant configuration. Nothing tells the leaf: its live coverage and its published pin, which may license a trim behind the snapshot, are untouched. An environment fault, not a protocol step: the leaf row survives it, and the row's own loss is LeafRowVanish, which composes with it at two faults. Yes, for what the step means to the leaf: VanishedSnapshotColdStartIntegrationTests.A_cold_start_over_a_vanished_snapshot_does_not_silently_lose_the_prefix_it_covered destroys the blob of a real leaf and asserts its next activation fails closed rather than silently.
ActivateRowless(l) A leaf whose row is gone activates with no create intent A stutter: the activation fails closed (issue #4654). BPlusLeafGrain refuses every data operation of a rowless, unbound activation not admitted by a create intent (LeafStateRowLostException, an ILatticeLeafUnavailable) and writes no row. The intent comes only from a create path - shard bootstrap, a split's sibling, a bulk load or append. An existing leaf is re-created only if a purge marked it, by recovery or by a create path that re-uses its id, both of which are Recover. Otherwise an intent is refused while the leaf's snapshot or row record survives. The #1744 write-path re-bind passes none. Yes: VanishedLeafRowIntegrationTests.Vanished_leaf_row (real grains: the row alone, the row with its snapshot, and the row with its record, all fail closed rather than reporting acknowledged keys absent), VanishedLeafRowIntegrationTests.A_binding_without_a_create_intent_is_refused_on_a_leaf_whose_row_was_lost, VanishedLeafRowIntegrationTests.The_write_path_self_heal_does_not_re_create_a_leaf_whose_row_was_lost, UnboundLeafSelfHealIntegrationTests.CrdtWrite_to_a_routed_leaf_with_no_row_fails_closed (a double guard: red only when both the rowless-activation gate and the intent's identity check are removed, since either alone refuses the write), TreeDeletionIntegrationTests.RecoverTree_does_not_re_create_a_rowless_leaf_no_purge_cleared, BPlusLeafGrainTests.Rowless_activation_without_a_create_intent_fails_every_data_operation_closed, BPlusLeafGrainTests.Create_intent_for_a_leaf_whose_snapshot_survives_is_refused and BPlusLeafGrainTests.Create_intent_for_a_leaf_whose_row_record_survives_is_refused, BPlusLeafGrainTests.Recovery_refuses_a_rowless_leaf_no_purge_cleared and PurgeRecoveryIntegrationTests.A_leaf_the_purge_never_reached_is_not_re_created_empty_by_recovery; the intended re-create by TreeDeletionIntegrationTests.RecoverTree_rebinds_a_root_leaf_left_unseeded_by_an_interrupted_purge and TreeDeletionIntegrationTests.RecoverTree_rebinds_a_non_root_leaf_left_unseeded_by_an_interrupted_purge.
LeafRowVanish(l) The environment destroys a leaf's state row Storage loss or a row deleted outside the lattice while routing and the pin store still name the leaf (issue #4654). The row's checkpoint, clock and snapshot record go with it; the snapshot does not. The step also ends the activation, since a live one would rewrite the row from memory on its next write. Enabled only under SnapshotLoss. An environment fault, not a protocol step. Yes, for what the step means to the leaf: VanishedLeafRowIntegrationTests.Vanished_leaf_row deletes the row of a real leaf, with and without its snapshot and its record, and asserts its next activation fails closed.
PinRetire(l) The GC retires a rowless leaf's pin LatticeWalGcScheduler retires the pin of a blocking consumer whose leaf reports no tree id (#3101), and its orphan sweep does the same. Not a fault, and reachable only after a LeafRowVanish: it is why evidence from the pin store cannot stand in for a create intent, since a retired entry reads exactly like a leaf never created. Yes: LatticeWalGcSchedulerCadenceTests.ExecuteAsync_retires_the_pin_of_a_leaf_that_reports_no_tree_id and LatticeWalGcSchedulerCadenceTests.The_sweep_never_retires_a_pin_whose_leaf_is_still_live.
MarkPurge(l) A purge reaches a leaf and marks it IBPlusLeafGrain.ClearGrainStateForPurgeAsync first makes LeafRowRecordState.PurgeCleared durable on the leaf's row record: the commit point after which the leaf's writes are deleted. Enabled only under SnapshotLoss; one purge per behaviour, charged once to the fault budget. Yes: BPlusLeafGrainTests.Purge_clear_marks_the_row_record_before_the_row_is_cleared_and_keeps_it, LeafRowRecordGrainTests.MarkPurgeClearedAsync_that_fails_to_write_leaves_the_record_unmarked, and PurgeRecoveryIntegrationTests.A_leaf_the_purge_never_reached_is_not_re_created_empty_by_recovery (the mark is per leaf, so a leaf the purge never reached is not re-created: red when any rowless leaf is re-created, the depth-15 trace of ReadPositionHonestShardWidePurgeMarker).
PurgeClear(l) The purge clears a marked leaf IBPlusLeafGrain.ClearGrainStateForPurgeAsync, after the mark: it drains the replay barrier and any capture, clears the row, the snapshot and the witness, and retires the pin last, keeping the marker. Retiring the pin first would let the GC trim past a marked leaf whose row survives an interruption, which recovery keeps and which then latches stale (RecoveryNeverFallsOffLogPurgeRetiresPinFirst). A purge stopped between the row clear and the pin retirement leaves a rowless leaf's pin, which PinRetire covers. Yes: BPlusLeafGrainTests.ClearGrainStateForPurge_retires_the_pin_only_after_the_row_is_cleared and BPlusLeafGrainTests.ClearGrainStateForPurge_interrupted_at_the_row_clear_keeps_the_pin (the detectors of the pin order: both red when the pins are retired first), ShardRootGrainPurgeTests.PurgeAsync_purge_clears_routed_leaves_and_deletes_their_marked_records_once_purged and BPlusLeafGrainTests.Purge_clear_marks_the_row_record_before_the_row_is_cleared_and_keeps_it. PurgeRecoveryIntegrationTests.A_marked_leaf_whose_purge_was_interrupted_before_its_row_clear_recovers_without_latching_stale (real grains, the GC trimming past the leaf's checkpoint) is supporting evidence only, not a detector of the order: it stays green when the pins are retired first, because in process the interrupted activation's deactivation flush and the leaf's covering snapshot close the window, which only a silo crash between the two steps reopens.
Recover(l) Recovery after a purge visits a marked leaf IBPlusLeafGrain.RecoverBindingAsync, from the reseed of RecoverTreeAsync, which is paged so every routed leaf is visited: a marked leaf whose row survived is re-bound and its marker reset; a marked rowless leaf has any remnant snapshot and witness deleted and its row re-created empty, and only then its marker reset; an unmarked rowless leaf is refused (ActivateRowless). A create path that re-uses a marked leaf's id (a shard re-seeding the deterministic root leaf of a purged copy, or a bulk load re-using a leaf id) takes the same step: BPlusLeafGrain.AdmitCreateIntentAsync admits it as purge-cleared, deleting any remnant snapshot and witness and resetting the marker only after its first row write. The re-create binds a leaf with no tree id through the leaf's SetTreeIdAsync, whose birth seam seeds a fresh Zero block pin, as the model's re-create does (RecoveryNeverFallsOffLogRecreateSeedsNoBlockPin). Yes: BPlusLeafGrainTests.Recovery_re_creates_a_purge_cleared_leaf_finishing_its_interrupted_clear and PurgeRecoveryIntegrationTests.A_leaf_whose_purge_clear_was_interrupted_part_way_is_re_created_by_recovery (a remnant snapshot does not block the re-create), BPlusLeafGrainTests.Recovery_of_a_leaf_that_kept_its_row_resets_a_stale_purge_mark, BPlusLeafGrainTests.Recovery_refuses_a_rowless_leaf_no_purge_cleared, the create path's step by BPlusLeafGrainTests.Create_intent_re_creates_a_purge_cleared_leaf and BPlusLeafGrainTests.Create_intent_re_creates_a_purge_cleared_leaf_finishing_its_interrupted_clear (both red when that admission refuses a marked leaf; the second also red when it re-creates a marked leaf as a plain create, which leaves the remnant snapshot and resets the marker before the row write), ShardRootGrainReseedNodeBindingsTests.ReseedNodeBindingsAsync_pages_the_leaf_work_and_reaches_every_leaf and PurgeRecoveryIntegrationTests.Every_leaf_a_purge_cleared_is_re_created_even_beyond_one_recovery_pass (no leaf is skipped past the walk budget), TreeDeletionIntegrationTests.RecoverTree_does_not_re_create_a_rowless_leaf_no_purge_cleared, and the seeded block pin by BPlusLeafGrainTests.SetTreeId_birth_seeds_block_pin_so_wal_gc_does_not_trim_past_root_leaf_frontier.
PurgeSettled A behaviour that took its one purge has nothing left to do Not applicable: a modelling device. The one-purge bound can exhaust the instance after recovery, which is quiescence, not a protocol deadlock; the stutter keeps TLC's deadlock check meaningful elsewhere.
OffsetsExhausted The bounded instance's offsets are spent with nothing in motion and nothing stored Not applicable: a modelling device. With every offset a settled hole there is no write above them, so the watermark rightly never passes them; production's next write lifts it, and the bounded instance has none. The stutter keeps TLC's deadlock check meaningful elsewhere.
ReplayFaultRearm(l) A cold rebuild faults and re-arms in one activation A stutter: the re-armed replay stays cold from its re-read frontier. Production has matched this since issue #4467 was fixed: LeafReplayStartPolicy.Decide treats a cache whose cold rebuild is still pending as unanchored, so BPlusLeafGrain.ExecuteActivationReplayAsync retries a faulted cold rebuild cold rather than resuming warm from the persisted checkpoint. Yes: BPlusLeafGrainTests.A_cold_rebuild_that_faults_part_way_is_retried_cold_not_resumed_warm (within one activation) and BPlusLeafGrainTests.Cancelled_cold_replay_lets_the_next_activation_resume_above_the_banked_frontier (across activations).