symfonic.services.effects.admission¶
admission ¶
EFX-L / EFX-F-3 — atomic effect admission at every classified port.
Three checkpoints, all conditional, all against the same lock the revert takes:
admit— before an effect attempt exists at all;dispatch— the last check before the effect leaves the process;commit— the check at commit time, which is the one EFX-F-3 actually requires, because a gap between "no fence observed" and "effect executed" has to be closed by the atomic operation rather than by ordering.
The fence is consulted before the lease at every checkpoint. Both are true
after a revert (a revert revokes the leases it fences), and callers need to be
able to tell "a fence stopped this" from "this lease simply aged out" —
FencedEffectError subclasses LeaseInvalidError so a caller that only
cares about denial still catches both.
EffectAdmissionController ¶
EffectAdmissionController(*, store: InMemoryLeaseStore, fences: FenceLedger, ports: FencedPortRegistry, tracker: InFlightTracker, quarantine: ResultQuarantine, clock: Callable[[], float] = time.time)
One admission path for every classified effect port.
Source code in src/symfonic/services/effects/admission.py
admit
async
¶
EFX-L-1 — no effect attempt exists without a live, unfenced lease.
Source code in src/symfonic/services/effects/admission.py
commit
async
¶
EFX-F-3 — the conditional check that decides whether the write lands.
Source code in src/symfonic/services/effects/admission.py
commit_or_raise
async
¶
The raising variant, for callers that treat suppression as fatal.
Source code in src/symfonic/services/effects/admission.py
deliver_result
async
¶
Hand back a port's answer, or quarantine it if the fence has landed.
Source code in src/symfonic/services/effects/admission.py
dispatch
async
¶
The last check before the effect leaves. Raising here costs nothing.