Skip to content

symfonic.services.effects.quarantine

quarantine

Late-result quarantine.

A provider or tool call that was dispatched before the fence landed will still come back. Delivering that answer to the invocation would let a rejected generation influence a response after the revert, so the result is held instead — and held visibly. Silently dropping it would leave an operator unable to tell "no late results arrived" from "we threw them away".

QuarantinedResult dataclass

QuarantinedResult(ticket_id: str, invocation_id: str, port_id: str, reason: str, quarantined_at: float)

One held result. The payload is deliberately not stored.

Keeping the payload would create a second copy of tenant data outside the invocation that earned it, on a path nobody has classified for retention. The record proves a result arrived and was withheld; that is what an incident needs.

ResultQuarantine

ResultQuarantine(*, clock: Callable[[], float] = time.time)

Holds late results. Nothing here ever releases one.

Source code in src/symfonic/services/effects/quarantine.py
def __init__(self, *, clock: Callable[[], float] = time.time) -> None:
    self._records: dict[str, QuarantinedResult] = {}
    self._clock = clock

deliverable

deliverable(ticket_id: str) -> bool

A quarantined result is never deliverable. There is no release path.

Source code in src/symfonic/services/effects/quarantine.py
def deliverable(self, ticket_id: str) -> bool:
    """A quarantined result is never deliverable. There is no release path."""
    return ticket_id not in self._records