Models / Effects

Effect

class teksi_hooks.models.effects.Effect[source]

Base effect model.

EffectDocument

class teksi_hooks.models.effects.EffectDocument(source: 'EffectSource', effects: 'tuple[Effect, ...]'=<factory>, created_at: 'datetime' = <factory>, version: 'int' = 1)[source]
Parameters:

Fields

source

Type: EffectSource

Source object from which the effects were generated.

effects

Type: tuple[Effect, ...]

Effects generated from the source object.

created_at

Type: datetime

Timestamp when the effect document was created.

version

Type: int

Version of the effect-document contract.

EffectEvaluationResult

class teksi_hooks.models.effects.EffectEvaluationResult(effect_index, status, findings=<factory>, metadata=<factory>)[source]

Evaluation result for one desired-state effect.

The result refers to an effect by its zero-based index in the corresponding effect document. It records whether the effect is already satisfied, requires an accepted persistence action, or is blocked.

Evaluation results do not indicate that persistence has occurred. A remediable result means that the effect may be reconciled later by a persistence implementation.

Blocking findings should explain why the effect cannot safely be applied. Remediable findings may explain which discrepancy will be resolved during persistence. Satisfied effects normally have no findings.

Parameters:
  • effect_index (int)

  • status (EffectEvaluationStatus)

  • findings (tuple[ValidationFinding, ...])

  • metadata (dict[str, Any])

Fields

effect_index

Type: int

Zero-based index of the evaluated effect in the corresponding EffectDocument.effects sequence.

status

Type: EffectEvaluationStatus

Evaluation status describing whether the desired-state effect is satisfied, remediable through persistence, or blocked.

findings

Type: tuple[ValidationFinding, ...]

Ordered validation findings produced while evaluating the effect. Remediable findings describe discrepancies that may be reconciled during persistence. Blocking findings explain why the effect cannot safely be applied.

metadata

Type: dict[str, Any]

Optional implementation-specific evaluation metadata. This may include observed canonical values, resolved identities, mapping provenance, target classifications or diagnostic context. Generic consumers must not assign semantics to these entries.

EffectSource

class teksi_hooks.models.effects.EffectSource(model: 'str', class_id: 'str', object_id: 'str')[source]
Parameters:
  • model (str)

  • class_id (str)

  • object_id (str)

Fields

model

Type: str

Source model identifier.

class_id

Type: str

Source class identifier.

object_id

Type: str

Source object identifier.

EnforceExistsEffect

class teksi_hooks.models.effects.EnforceExistsEffect(identity: 'CanonicalObjectIdentity')[source]
Parameters:

identity (CanonicalObjectIdentity)

Base class: Effect

Fields

kind

Type: EffectKind

Effect kind discriminator.

identity

Type: CanonicalObjectIdentity

Canonical object identity used to locate the target object.

EnforceNotExistsEffect

class teksi_hooks.models.effects.EnforceNotExistsEffect(identity: 'CanonicalObjectIdentity')[source]
Parameters:

identity (CanonicalObjectIdentity)

Base class: Effect

Fields

kind

Type: EffectKind

Effect kind discriminator.

identity

Type: CanonicalObjectIdentity

Canonical object identity used to locate the target object.

UpdateAttributeEffect

class teksi_hooks.models.effects.UpdateAttributeEffect(identity: 'CanonicalObjectIdentity', attribute_id: 'str', value: 'Any')[source]
Parameters:

Base class: Effect

Fields

kind

Type: EffectKind

Effect kind discriminator.

identity

Type: CanonicalObjectIdentity

Canonical object identity used to locate the target object.

attribute_id

Type: str

Canonical attribute identifier being updated.

value

Type: Any

New value that should be assigned to the target attribute.