Skip to content

SignalPrecondition

Source code in docs_src/capo_continuum/types/signal_precondition.py
class SignalPrecondition(TypedDict, closed=True):
    value: NotRequired["bool"]
    """The producer's determination. A Boolean rather than an enum, against the Common Terms preference for enums on extensibility grounds. The question each precondition answers is closed — is the code reachable, is configuration required, must a user other than the attacker interact — and the only third state, "not determined", is already expressed by omitting this member, which the projection does whenever the stored value is not a bool. An enum would give two ways to say the same thing, while `basis` and `missingInfo` already qualify how firm the answer is."""
    basis: NotRequired["capo_continuum.types.signal_basis.SignalBasis"]
    """Where the producer's determination came from."""
    reason: NotRequired["capo_continuum.types.artifact_text.ArtifactText"]
    """The producer's explanation."""
    missing_info: NotRequired["capo_continuum.types.artifact_text.ArtifactText"]
    """What the producer could not determine, when anything was missing."""

basis instance-attribute

basis: NotRequired[SignalBasis]

Where the producer's determination came from.

missing_info instance-attribute

missing_info: NotRequired[ArtifactText]

What the producer could not determine, when anything was missing.

reason instance-attribute

reason: NotRequired[ArtifactText]

The producer's explanation.

value instance-attribute

value: NotRequired[bool]

The producer's determination. A Boolean rather than an enum, against the Common Terms preference for enums on extensibility grounds. The question each precondition answers is closed — is the code reachable, is configuration required, must a user other than the attacker interact — and the only third state, "not determined", is already expressed by omitting this member, which the projection does whenever the stored value is not a bool. An enum would give two ways to say the same thing, while basis and missingInfo already qualify how firm the answer is.