Skip to content

Case Behavior Trees

Auto-generated reference documentation for case management and case state (CS) behavior trees in vultron/core/behaviors/case/ and vultron/core/behaviors/sync/.

Requirements

The behavioral requirements for these trees are specified in the Architecture Specifications:

  • CM — Case Management: governs case proposal, accept/reject, invite, and participant lifecycle
  • CLP — Case Ledger Processing: governs commit and announce log entry semantics

Note

These behaviors are not directly governed by the protocol-level RMB, EMB, or CSB spec groups. They implement case management and ledger replication semantics defined in the architecture specs.

Accept Case Proposal Tree

Handles acceptance of an incoming case proposal, acted on only when the sender is the actor the proposal was addressed to. Constructed from vultron.core.behaviors.case.accept_case_proposal_received_tree.create_accept_case_proposal_received_tree.

[-] AcceptCaseProposalReceivedBT
    --> ActivityAddressedToReceiverNode
    --> ActivityNotSeenBeforeNode
    --> ReceivedPathNode
    --> CaseOpenToExternalWrites
    -^- SenderIsProposalAddresseeNode
        --> SenderIsProposalAddresseeNode
    --> IntakeReceivedActivityNode
    --> RecordCaseActorAcceptanceNode

Reject Case Proposal Tree

Handles rejection of an incoming case proposal, acted on only when the sender is the actor the proposal was addressed to. Constructed from vultron.core.behaviors.case.reject_case_proposal_received_tree.create_reject_case_proposal_received_tree.

[-] RejectCaseProposalReceivedBT
    --> ActivityAddressedToReceiverNode
    --> ActivityNotSeenBeforeNode
    --> ReceivedPathNode
    --> CaseOpenToExternalWrites
    -^- SenderIsProposalAddresseeNode
        --> SenderIsProposalAddresseeNode
    --> IntakeReceivedActivityNode
    --> RecordCaseProposalRejectionNode

Accept Invite Tree

Handles acceptance of a case invitation. Constructed from vultron.core.behaviors.case.accept_invite_tree.create_accept_invite_actor_to_case_tree.

[-] AcceptInviteActorToCaseBT
    --> ActivityAddressedToReceiverNode
    --> ActivityNotSeenBeforeNode
    -^- ReceivedPathNode
        --> ReceivedPathNode
    -^- CaseOpenToExternalWrites
        --> CaseOpenToExternalWrites
    -^- SenderClosureNotRecordedNode
        --> SenderClosureNotRecordedNode
    -^- SenderIsInviteeNode
        --> SenderIsInviteeNode
    --> IntakeReceivedActivityNode
    [o] LedgerPositionIfCaseManager
        [-] SkipIfNotCaseManager
            -^- InvertIsNotCaseManager
                -^- CheckIsCaseManagerNode
                    --> CheckIsCaseManagerNode
        -^- LedgerPositionAnswer
            [-] AnswerLedgerPosition
                -^- ClassifyLedgerPosition
                    --> ClassifyLedgerPosition
                [o] AnswerByStanding
                    --> LedgerPositionIs[none]
                    [-] AnswerHeldPosition
                        --> LedgerPositionIs[lag|tail]
                        -^- ResendOwedInvites
                            --> ResendOwedInvites
                        [o] RecordAndReplayIfActive
                            -^- PeerNotActiveParticipant
                                --> PeerNotActiveParticipant
                            [-] RecordAndReplay
                                -^- PeerActiveParticipant
                                    --> PeerActiveParticipant
                                -^- UpdateReplicationState
                                    --> UpdateReplicationState
                                [o] ReplayIfLagging
                                    --> LedgerPositionIs[tail]
                                    [-] Replay
                                        -^- FindCaseActor
                                            --> FindCaseActor
                                        -^- ReplayMissingEntries
                                            [-] ReplayMissingEntries
                                                --> CollectAndSortCaseLedgerEntries
                                                --> FindDivergenceIndex
                                                --> SendMissingEntries
                    [-] RepairSplitPosition
                        --> LedgerPositionIs[split]
                        -^- ReseedPeer
                            --> ReseedPeer
    [o] SenderSequenceIfCaseManager
        [-] SkipIfNotCaseManager
            -^- InvertIsNotCaseManager
                -^- CheckIsCaseManagerNode
                    --> CheckIsCaseManagerNode
        [-] SenderSequenceOrder
            -^- ClassifySenderSequence
                --> ClassifySenderSequence
            [o] AnswerBySenderSequence
                --> SequenceStandingIs[held-repeat|judged-repeat|not-numbered|repeat-refused]
                [-] AdmitInOrder
                    --> SequenceStandingIs[next|past-skip]
                    --> AdmitInOrderNode
                [-] HoldPastGap
                    --> SequenceStandingIs[ahead]
                    --> HoldPastGapNode
                [-] RefuseNumber
                    --> SequenceStandingIs[late|missing|reused]
                    [-] SenderSequenceRefusal
                        -^- EmitSenderSequenceRefusalNotice
                            --> EmitSenderSequenceRefusalNotice
            --> SenderSequenceAdmits
    [o] ClockDecisionsIfCaseManager
        [-] SkipIfNotCaseManager
            -^- InvertIsNotCaseManager
                -^- CheckIsCaseManagerNode
                    --> CheckIsCaseManagerNode
        [-] ClockDecisions
            -^- ClockDecision[EmbargoEndTimeDecision]
                [o] EmbargoEndTimeDecision
                    -^- EndTimeNotPassed
                        -^- EmbargoEndTimePassedNode
                            --> EmbargoEndTimePassedNode
                    [-] EndEmbargoOnAFreshLedger
                        -^- EndTimeLedgerFresh
                            --> EndTimeLedgerFresh
                        [o] EndEmbargoAtEndTimeBT
                            -^- EmbargoAlreadyEndedNode
                                --> EmbargoAlreadyEndedNode
                            {-} TerminateEmbargoBT
                                --> HasActiveEmbargoNode
                                --> ReadEmbargoIdNode
                                --> ResolveCaseManagerNode
                                [o] TerminateEmbargoAsCaseManager
                                    [-] SkipIfNotCaseManager
                                        -^- InvertIsNotCaseManager
                                            -^- CheckIsCaseManagerNode
                                                --> CheckIsCaseManagerNode
                                    [-] TerminateEmbargoAsCaseManagerBody
                                        -^- CaptureActiveEmbargoNode
                                            --> CaptureActiveEmbargoNode
                                        -^- CommitAndApplyEmbargoTerminationNode
                                            --> CommitAndApplyEmbargoTerminationNode
                                        --> EmitCaseStatusUpdate
                                        -^- SendEmbargoEndingNoticesNode
                                            --> SendEmbargoEndingNoticesNode
                                        --> ReissueStubInvitesNode
                                [o] TerminateEmbargoAskCaseManager
                                    -^- SkipIfCaseManager
                                        --> SkipIfCaseManager
                                    [o] AskCaseManagerToTerminateOnce
                                        -^- TeardownAskPendingNode
                                            --> TeardownAskPendingNode
                                        -^- SendTerminateEmbargoActivityNode
                                            --> SendTerminateEmbargoActivityNode
    --> PreconditionGuardStage
        [-] PreconditionGuards
            --> CheckInviteeNotAlreadyParticipantNode
            --> InviteeHasParticipantRecordNode
            --> StubInviteAnswerableNode
        --> PreconditionGuardStageFirstRun
        -^- RefusalEffects
            [o] AcceptInviteActorToCaseBTRefusalIfCaseManager
                [-] SkipIfNotCaseManager
                    -^- InvertIsNotCaseManager
                        -^- CheckIsCaseManagerNode
                            --> CheckIsCaseManagerNode
                -^- EmitRefusalNoticeBestEffort
                    -^- EmitRefusalNotice
                        --> EmitRefusalNotice
    [-] AcceptInviteActorToCaseBTAct
        [o] GuardedCommitCaseLedgerEntryBT
            [-] SkipIfNotCaseManager
                -^- InvertIsNotCaseManager
                    -^- CheckIsCaseManagerNode
                        --> CheckIsCaseManagerNode
            -^- CommitCaseLedgerEntryNode
                --> CommitCaseLedgerEntryNode
        [o] AcceptInviteIfCaseManager
            [-] SkipIfNotCaseManager
                -^- InvertIsNotCaseManager
                    -^- CheckIsCaseManagerNode
                        --> CheckIsCaseManagerNode
            [-] AcceptInviteEffects
                [o] MaybeSignEmbargoConsentNode
                    [-] _TrySignEmbargoConsent
                        --> _CheckEmbargoActiveStateNode
                        --> _SignEmbargoConsentLeafNode
                    --> _AlwaysSucceed
                --> ActivateInviteeParticipantNode
                --> AdvanceInviteeVFToVendorAwareNode
                --> EmitAnnounceCaseToInviteeNode
                --> BackfillCanonicalLedgerToInviteeNode
                --> CommitInviteeAcceptEntriesNode
                --> EmitInviteActorToFullCaseNode
                --> RelayOpenProposalsToJoinerNode

Commit Log Entry Tree

Commits a new entry to the case ledger and fans it out to participants. Constructed from vultron.core.behaviors.sync.commit_tree.create_commit_log_entry_tree.

[-] CommitLogEntryBT
    --> DeclineForeignLedgerCommit
    [-] MintAndFanOutLogEntry
        --> RequireSyncPort
        -^- CheckLedgerFreshness
            --> CheckLedgerFreshness
        -^- ReconstructChainTail
            --> ReconstructChainTail
        -^- CreateLogEntry
            --> CreateLogEntry
        --> PersistLogEntry
        -^- FanOutLogEntry
            [o] FanOutLogEntry
                --> LogEntryCommittedBefore
                [-] AddLogEntry
                    --> CollectLogEntryRecipients
                    --> SendLogEntryToEach

Add Log Entry Tree

Processes an incoming ledger entry the CASE_MANAGER added to the case's ledger. Constructed from vultron.core.behaviors.sync.add_log_entry_tree.create_add_log_entry_tree.

[-] AddLogEntryReceivedBT
    --> ActivityAddressedToReceiverNode
    --> ActivityNotSeenBeforeNode
    --> ReceivedPathNode
    --> CaseOpenToExternalWrites
    --> SenderIsCaseManagerNode
    --> IntakeReceivedActivityNode
    [o] ConfirmOwnEchoedAdd
        [-] SkipOffConfirmOwnEchoedAdd
            -^- NotOnConfirmOwnEchoedAddPath
                --> OnPathCaseManager
        --> LogDeliveryConfirmation
    [o] ProcessAddedEntry
        [-] SkipOffProcessAddedEntry
            -^- NotOnProcessAddedEntryPath
                [o] OnAnyOfPaths
                    --> OnPathParticipantReplica
                    --> OnPathNoCase
        [-] ProcessAddedEntryBody
            --> AddedEntryIsNotOwnEcho
            [o] HashIntactOrFault
                --> CheckEntryHashIntact
                --> EmitHashMismatchFault
            [o] EntryProcessing
                --> CheckLogEntryAlreadyStored
                [-] ProcessAndStore
                    [o] ReconstructOrRejectOnMissingCase
                        --> ReconstructChainTail
                        [-] BufferAndRejectOnMissingCase
                            -^- BufferIfPreGenesis
                                --> BufferPreGenesisEntry
                            --> RejectOnMissingCase
                    [o] CheckHashOrRejectOnMismatch
                        --> CheckHashMatches
                        [-] BufferAndReject
                            -^- BufferIfForwardGap
                                --> BufferOutOfOrderEntry
                            --> SendRejectLogEntry
                    --> CheckEntryAgreesWithCasePosition
                    [o] ApplyEffectsUnlessReflected
                        [-] StoreReflectedEntry
                            --> EntryReflectedByCaseCopy
                            --> StoreRecordsReflectedEntryCarries
                        [-] ApplyUnreflectedEntry
                            -^- EntryNotReflectedByCaseCopy
                                --> CheckEntryReflectedByCaseCopy
                            [-] LogEntryEventEffects
                                [o] EmbargoTeardownEffects
                                    [-] ApplyEmbargoTeardownEffectsSeq
                                        --> IsEmbargoTeardownEvent
                                        --> ApplyEmbargoTeardownFromLedger
                                    -^- SkipIfNotEmbargoTeardownEvent
                                        --> CheckNotEmbargoTeardownEvent
                                [o] EmbargoActivationEffects
                                    [-] ApplyEmbargoActivationEffectsSeq
                                        --> IsEmbargoActivationEvent
                                        --> ApplyEmbargoActivationFromLedger
                                    -^- SkipIfNotEmbargoActivationEvent
                                        --> CheckNotEmbargoActivationEvent
                                [o] EmbargoProposalRejectionEffects
                                    [-] ApplyEmbargoProposalRejectionEffectsSeq
                                        --> IsEmbargoProposalRejectionEvent
                                        --> ApplyEmbargoProposalRejectionFromLedger
                                    -^- SkipIfNotEmbargoProposalRejectionEvent
                                        --> CheckNotEmbargoProposalRejectionEvent
                                [o] CaseStatusEffects
                                    [-] ApplyCaseStatusEffectsSeq
                                        --> IsCaseStatusEvent
                                        --> ApplyCaseStatusFromLedger
                                    -^- SkipIfNotCaseStatusEvent
                                        --> CheckNotCaseStatusEvent
                                [o] ParticipantStatusEffects
                                    [-] ApplyParticipantStatusEffectsSeq
                                        --> IsParticipantStatusEvent
                                        [o] ApplyOrFault
                                            --> ApplyParticipantStatusFromLedger
                                            --> EmitImpossibleStateFault
                                    -^- SkipIfNotParticipantStatusEvent
                                        --> CheckNotParticipantStatusEvent
                                [o] NoteEffects
                                    [-] ApplyNoteEffectsSeq
                                        --> IsNoteEvent
                                        --> ApplyNoteFromLedger
                                    -^- SkipIfNotNoteEvent
                                        --> CheckNotNoteEvent
                                [o] VulnerabilityItemEffects
                                    [-] ApplyVulnerabilityItemEffectsSeq
                                        --> IsVulnerabilityItemEvent
                                        --> ApplyVulnerabilityItemFromLedger
                                    -^- SkipIfNotVulnerabilityItemEvent
                                        --> CheckNotVulnerabilityItemEvent
                                [o] CaseReferenceEffects
                                    [-] ApplyCaseReferenceEffectsSeq
                                        --> IsCaseReferenceEvent
                                        --> ApplyCaseReferenceFromLedger
                                    -^- SkipIfNotCaseReferenceEvent
                                        --> CheckNotCaseReferenceEvent
                                [o] RemoveNoteEffects
                                    [-] ApplyRemoveNoteEffectsSeq
                                        --> IsRemoveNoteEvent
                                        --> ApplyRemoveNoteFromLedger
                                    -^- SkipIfNotRemoveNoteEvent
                                        --> CheckNotRemoveNoteEvent
                                [o] CreateCaseParticipantEffects
                                    [-] ApplyCreateCaseParticipantEffectsSeq
                                        --> IsCreateCaseParticipantEvent
                                        --> ApplyCreateCaseParticipantFromLedger
                                    -^- SkipIfNotCreateCaseParticipantEvent
                                        --> CheckNotCreateCaseParticipantEvent
                                [o] InviteAcceptEffects
                                    [-] ApplyInviteAcceptEffectsSeq
                                        --> IsInviteAcceptEvent
                                        --> ApplyInviteAcceptFromLedger
                                    -^- SkipIfNotInviteAcceptEvent
                                        --> CheckNotInviteAcceptEvent
                                [o] InviteRejectEffects
                                    [-] ApplyInviteRejectEffectsSeq
                                        --> IsInviteRejectEvent
                                        --> ApplyInviteRejectFromLedger
                                    -^- SkipIfNotInviteRejectEvent
                                        --> CheckNotInviteRejectEvent
                                [o] RemoveCaseParticipantEffects
                                    [-] ApplyRemoveCaseParticipantEffectsSeq
                                        --> IsRemoveCaseParticipantEvent
                                        --> ApplyRemoveCaseParticipantFromLedger
                                    -^- SkipIfNotRemoveCaseParticipantEvent
                                        --> CheckNotRemoveCaseParticipantEvent
                                [o] ReinstateCaseParticipantEffects
                                    [-] ApplyReinstateCaseParticipantEffectsSeq
                                        --> IsReinstateCaseParticipantEvent
                                        --> ApplyReinstateCaseParticipantFromLedger
                                    -^- SkipIfNotReinstateCaseParticipantEvent
                                        --> CheckNotReinstateCaseParticipantEvent
                                [o] OfferReportEffects
                                    [-] ApplyOfferReportEffectsSeq
                                        --> IsOfferReportEvent
                                        --> ApplyOfferReportFromLedger
                                    -^- SkipIfNotOfferReportEvent
                                        --> CheckNotOfferReportEvent
                                [o] UpdateCaseParticipantEffects
                                    [-] ApplyUpdateCaseParticipantEffectsSeq
                                        --> IsUpdateCaseParticipantEvent
                                        --> ApplyUpdateCaseParticipantFromLedger
                                    -^- SkipIfNotUpdateCaseParticipantEvent
                                        --> CheckNotUpdateCaseParticipantEvent
                                [o] OwnershipTransferEffects
                                    [-] ApplyOwnershipTransferEffectsSeq
                                        --> IsOwnershipTransferEvent
                                        --> ApplyOwnershipTransferFromLedger
                                    -^- SkipIfNotOwnershipTransferEvent
                                        --> CheckNotOwnershipTransferEvent
                                [o] RoleGrantEffects
                                    [-] ApplyRoleGrantEffectsSeq
                                        --> IsRoleGrantEvent
                                        --> ApplyRoleGrantFromLedger
                                    -^- SkipIfNotRoleGrantEvent
                                        --> CheckNotRoleGrantEvent
                                [o] CreatedEmbargoEffects
                                    [-] ApplyCreatedEmbargoEffectsSeq
                                        --> IsCreatedEmbargoEvent
                                        --> ApplyCreatedEmbargoFromLedger
                                    -^- SkipIfNotCreatedEmbargoEvent
                                        --> CheckNotCreatedEmbargoEvent
                                [o] EmbargoProposalEffects
                                    [-] ApplyEmbargoProposalEffectsSeq
                                        --> IsEmbargoProposalEvent
                                        --> ApplyEmbargoProposalFromLedger
                                    -^- SkipIfNotEmbargoProposalEvent
                                        --> CheckNotEmbargoProposalEvent
                                [o] EmbargoInviteRelayEffects
                                    [-] ApplyEmbargoInviteRelayEffectsSeq
                                        --> IsEmbargoInviteRelayEvent
                                        --> ApplyEmbargoInviteRelayFromLedger
                                    -^- SkipIfNotEmbargoInviteRelayEvent
                                        --> CheckNotEmbargoInviteRelayEvent
                                [o] EmbargoAcceptanceEffects
                                    [-] ApplyEmbargoAcceptanceEffectsSeq
                                        --> IsEmbargoAcceptanceEvent
                                        --> ApplyEmbargoAcceptanceFromLedger
                                    -^- SkipIfNotEmbargoAcceptanceEvent
                                        --> CheckNotEmbargoAcceptanceEvent
                                [o] EmbargoRejectionEffects
                                    [-] ApplyEmbargoRejectionEffectsSeq
                                        --> IsEmbargoRejectionEvent
                                        --> ApplyEmbargoRejectionFromLedger
                                    -^- SkipIfNotEmbargoRejectionEvent
                                        --> CheckNotEmbargoRejectionEvent
                                [o] EmbargoWithdrawalEffects
                                    [-] ApplyEmbargoWithdrawalEffectsSeq
                                        --> IsEmbargoWithdrawalEvent
                                        --> ApplyEmbargoWithdrawalFromLedger
                                    -^- SkipIfNotEmbargoWithdrawalEvent
                                        --> CheckNotEmbargoWithdrawalEvent
                                [o] EmbargoAbandonmentEffects
                                    [-] ApplyEmbargoAbandonmentEffectsSeq
                                        --> IsEmbargoAbandonmentEvent
                                        --> ApplyEmbargoAbandonmentFromLedger
                                    -^- SkipIfNotEmbargoAbandonmentEvent
                                        --> CheckNotEmbargoAbandonmentEvent
                                [o] EmbargoInviteWithdrawalEffects
                                    [-] ApplyEmbargoInviteWithdrawalEffectsSeq
                                        --> IsEmbargoInviteWithdrawalEvent
                                        --> ApplyEmbargoInviteWithdrawalFromLedger
                                    -^- SkipIfNotEmbargoInviteWithdrawalEvent
                                        --> CheckNotEmbargoInviteWithdrawalEvent
                                [o] EmbargoConsentEffects
                                    [-] ApplyEmbargoConsentEffectsSeq
                                        --> IsEmbargoConsentEvent
                                        --> ApplyEmbargoConsentFromLedger
                                    -^- SkipIfNotEmbargoConsentEvent
                                        --> CheckNotEmbargoConsentEvent
                    --> PersistReceivedLogEntry
            --> ReplayHeldSuccessor