Skip to content

symfonic.services.effects.values

values

EFX value types: leases, tickets, and the vocabulary the fence decides in.

Nothing here reaches a store or a clock. These are the facts the rest of the package moves around, which is why they are frozen: a lease whose epoch could be edited after acquisition would make "admitted under this generation" unfalsifiable.

CommitDecision

Bases: StrEnum

EFX-F-3 — what the commit-time conditional check decided.

SUPPRESSED deliberately does not say "cancelled" or "undone". The write did not land; whether an external effect already left the process is a separate question the exposure ledger answers.

EffectLease dataclass

EffectLease(lease_id: str, invocation_id: str, bundle_id: str, admitted_epoch: int, generation_vector_hash: str, tenant_scope_hash: str, acquired_at: float, expires_at: float, stale_binding: bool = False, revoked_reason: str | None = None, parent_lease_id: str | None = None)

EFX-L-1 — the revocable authorization to perform effects.

generation_vector_hash is what a revert keys on, and it is captured at acquisition rather than read at use time: an invocation must be judged on the generation it was admitted under, not on whatever is current when it happens to call.

EffectReversibility

Bases: StrEnum

EFX-F-2 — can the framework undo this port's effect after it landed?

IRREVERSIBLE is the mandatory fence-check set: external side effects, durable deletes, outbound notifications. For those, cancellation is never a remedy, so a revert must compensate and account rather than claim.

EffectTicket dataclass

EffectTicket(ticket_id: str, lease_id: str, invocation_id: str, port_id: str, operation: str, admitted_at: float, irreversible: bool)

One admitted effect attempt against one port under one lease.

FencedPort dataclass

FencedPort(port_id: str, family: EffectFamily, reversibility: EffectReversibility, externally_visible: bool, rationale: str)

One classified effect port, plus the verdict the fence needs from it.

TicketState

Bases: StrEnum

Where one effect attempt got to. The drain reads these and only these.