symfonic.services.switching.registry¶
registry ¶
CUT-AIR — the generation-indexed active-invocation registry.
The registry exists to answer one question that nothing else can answer honestly: is any live invocation still running under the old generation? Log absence does not answer it. Traffic graphs do not answer it. An open record with an admitted epoch does.
ActiveInvocationRegistry ¶
Append-only from the data plane; indexed by bundle and by generation.
Source code in src/symfonic/services/switching/registry.py
admission_lock
property
¶
Held across bind-and-register so the pair is one atomic admission.
expire_lease ¶
EFX-L-5 — a crashed worker's record is closed by lease expiry.
invalidate ¶
CUT-AIR-4 — only the control plane, and only via SCP-REV-4.
Source code in src/symfonic/services/switching/registry.py
quiescent_below ¶
CUT-AIR-3 — no open record on this bundle below epoch.
InvocationRecord
dataclass
¶
InvocationRecord(invocation_id: str, tenant_scope_hash: str, bundle_id: str, admitted_epoch: int, generation_vector_hash: str, admitted_at: float, stale_binding: bool = False, completed_at: float | None = None, closed_reason: str | None = None, invalidated_by: str | None = None)
One admitted invocation. Carries a scope hash, never tenant content.
QuiescenceBarrier ¶
CUT-BR-6 — the worker-acknowledged half of the drain proof.
A freeze is only propagated when every worker says so. Waiting out
T_stale + T_outage and hoping is the alternative this replaces: it
cannot distinguish "every worker saw the freeze" from "every worker is
wedged", and those two states need opposite responses.