Skip to content

Case State Behavior Trees

Auto-generated reference documentation for the Case State (CS) receive-side behavior trees in vultron/core/behaviors/status/.

Requirements

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

  • RSH-01 — StatusAdoptionGate (participant status adoption)
  • RSH-02 — EmbargoTeardownAuthorizationGate
  • RSH-03 — ThreatTerminationBranchNode (embargo teardown)
  • RSH-04 — CaseStatus emission authority and outbound emit invariant
  • RSH-09 — Whole accept or reject of a received status
  • CSB-17 — CS compound state and history validity
  • CSB-18 — Cross-machine state entailments

Add Case Status Tree

Handles receipt of an Add(CaseStatus, VulnerabilityCase) activity, which a participant replica admits from the case's CASE_MANAGER alone (RSH-04-005). It runs the idempotency check, ephemeral-state guard, history-prefix guard and a whole accept-or-reject check of EM and P/X/A, and writes nothing: the replica takes the status from the ledger. Constructed from vultron.core.behaviors.status.add_case_status_tree.add_case_status_tree.

[-] AddCaseStatusToCaseBT
    --> IntakeReceivedActivityNode
    --> CaseOpenToExternalWrites
    --> ActivityAddressedToReceiverNode
    --> NoSenderAdmittedNode
    --> CheckCaseStatusIdempotencyNode
    --> CheckCsEphemeralStateNode
    --> CheckCsHistoryPrefixNode
    --> CheckCaseStatusAcceptableNode

Add Participant Status Tree

Handles receipt of an Add(ParticipantStatus, CaseParticipant) activity. Implements the StatusAdoptionGate workflow (ADR-0046, RSH-01): verifies the sender is a participant, appends the raw peer status, then gates adoption and optional embargo teardown through authorization call-outs. An adopted P, X or A reaches the case status here, and nowhere else on the received side (RSH-01-003). Constructed from vultron.core.behaviors.status.add_participant_status_tree.add_participant_status_tree.

[-] AddParticipantStatusBT
    --> IntakeReceivedActivityNode
    --> CaseOpenToExternalWrites
    --> ActivityAddressedToReceiverNode
    [-] SenderRuleGuard
        [o] AtCaseManager
            -^- NotAtCaseManager
                --> CheckIsCaseManagerNode
            [o] AnyOfSenderKinds
                --> SenderIsCaseManagerNode
                [-] OpenCaseOwner
                    --> SenderClosureNotRecordedNode
                    --> SenderIsCaseOwnerNode
                --> SenderIsParticipantRecordSubjectNode
                --> SenderHoldsNoneOfNode
        [o] AtParticipant
            --> CheckIsCaseManagerNode
            --> SenderIsCaseManagerNode
    [o] ClockDecisionsIfCaseManager
        [-] SkipIfNotCaseManager
            -^- InvertIsNotCaseManager
                --> CheckIsCaseManagerNode
        [-] ClockDecisions
            -^- ClockDecision[EmbargoEndTimeDecision]
                [o] EmbargoEndTimeDecision
                    -^- EndTimeNotPassed
                        --> EmbargoEndTimePassedNode
                    [-] EndEmbargoOnAFreshLedger
                        --> EndTimeLedgerFresh
                        [o] EndEmbargoAtEndTimeBT
                            --> EmbargoAlreadyEndedNode
                            {-} TerminateEmbargoBT
                                --> HasActiveEmbargoNode
                                --> ReadEmbargoIdNode
                                --> ResolveCaseManagerNode
                                [o] TerminateEmbargoAsCaseManager
                                    [-] SkipIfNotCaseManager
                                        -^- InvertIsNotCaseManager
                                            --> CheckIsCaseManagerNode
                                    [-] TerminateEmbargoAsCaseManagerBody
                                        --> CaptureActiveEmbargoNode
                                        --> CommitAndApplyEmbargoTerminationNode
                                        --> EmitCaseStatusUpdate
                                        --> SendEmbargoEndingNoticesNode
                                        --> ReissueStubInvitesNode
                                [o] TerminateEmbargoAskCaseManager
                                    --> SkipIfCaseManager
                                    [o] AskCaseManagerToTerminateOnce
                                        --> TeardownAskPendingNode
                                        --> SendTerminateEmbargoActivityNode
    --> PreconditionGuardStage
        [-] PreconditionGuards
            --> CarriedObjectInTargetCaseNode
            --> CheckParticipantStatusAcceptableNode
        -^- RefusalEffects
            [o] AddParticipantStatusBTRefusalIfCaseManager
                [-] SkipIfNotCaseManager
                    -^- InvertIsNotCaseManager
                        --> CheckIsCaseManagerNode
                [-] AddParticipantStatusBTRefusalIfCaseManagerBody
                    -^- EmitRefusalNoticeBestEffort
                        --> EmitRefusalNotice
                    -^- EmitRMGapNoteBestEffort
                        --> EmitRMGapNote
    [-] AddParticipantStatusBTAct
        [o] GuardedCommitCaseLedgerEntryBT
            [-] SkipIfNotCaseManager
                -^- InvertIsNotCaseManager
                    --> CheckIsCaseManagerNode
            --> CommitCaseLedgerEntryNode
        [o] AdoptParticipantStatusIfCaseManager
            [-] SkipIfNotCaseManager
                -^- InvertIsNotCaseManager
                    --> CheckIsCaseManagerNode
            [-] AdoptParticipantStatusIfCaseManagerBody
                [-] AppendParticipantStatusBT
                    --> LoadParticipantNode
                    [o] IdempotencyCheckSelector
                        --> SkipIfIdempotentNode
                        [-] AppendParticipantStatusProcessNode
                            --> ResolveAndPersistStatusObjectNode
                            --> AppendStatusAndSaveParticipantNode
                [o] AdoptOrWithhold
                    -^- AdoptionWithheld
                        [o] StatusAdoptionGate
                            --> SenderIsCaseOwner
                            -^- CaseOwnerApprovesStatusUpdate
                                --> CaseOwnerApprovesStatusUpdate
                    [-] AdoptStatus
                        --> EmitCaseStatusUpdate
                        -^- TeardownEffectsOrSkip
                            [-] TeardownEffects
                                -^- EmbargoTeardownAuthorizationGate
                                    --> EmbargoTeardownAuthorizationGate
                                [o] ThreatTerminationBranch
                                    --> SkipCondition
                                    [o] TeardownSelector
                                        {-} TerminateEmbargoBT
                                            --> HasActiveEmbargoNode
                                            --> ReadEmbargoIdNode
                                            --> ResolveCaseManagerNode
                                            [o] TerminateEmbargoAsCaseManager
                                                [-] SkipIfNotCaseManager
                                                    -^- InvertIsNotCaseManager
                                                        --> CheckIsCaseManagerNode
                                                [-] TerminateEmbargoAsCaseManagerBody
                                                    --> CaptureActiveEmbargoNode
                                                    --> CommitAndApplyEmbargoTerminationNode
                                                    --> EmitCaseStatusUpdate
                                                    --> SendEmbargoEndingNoticesNode
                                                    --> ReissueStubInvitesNode
                                            [o] TerminateEmbargoAskCaseManager
                                                --> SkipIfCaseManager
                                                [o] AskCaseManagerToTerminateOnce
                                                    --> TeardownAskPendingNode
                                                    --> SendTerminateEmbargoActivityNode
                                        {-} RejectProposedEmbargoBT
                                            --> ReadEmStateNode
                                            --> IsProposedEmbargoNode
                                            --> ResolveCaseManagerNode
                                            [o] AbandonProposedEmbargoAsCaseManager
                                                [-] SkipIfNotCaseManager
                                                    -^- InvertIsNotCaseManager
                                                        --> CheckIsCaseManagerNode
                                                [-] AbandonProposedEmbargoAsCaseManagerBody
                                                    --> ReadOpenEmbargoProposalsNode
                                                    --> AbandonEmbargoProposalsLifecycleNode
                                                    --> EmitCaseStatusUpdate
                                            [o] AbandonProposedEmbargoLeaveToCaseManager
                                                --> SkipIfCaseManager
                                                --> LeaveAbandonmentToCaseManagerNode
                        --> PxaEmInvariantDiagnostic
                        --> EmitRMGapNote