Skip to content

symfonic.platform.fallback_journal

fallback_journal

Host-owned fallback evidence attributed to an explicit deployment.

This opt-in JSONL journal is separate from execution-event SQL: attribution is not a counter or invented turn identity. POSIX advisory locks coordinate hosts that intentionally share one local file. Remote filesystems are not attested.

DispatchOutcomeJournal

DispatchOutcomeJournal(path: str | Path, *, release_version: str, deployment_id: str)

Bases: FallbackJournal

Fsynced, deployment-labelled observations of actual dispatch only.

The host passes this callback explicitly to the agent. It has no route policy and makes no denominator or zero-fallback assertion.

Source code in src/symfonic/platform/fallback_journal.py
def __init__(
    self,
    path: str | Path,
    *,
    release_version: str,
    deployment_id: str,
) -> None:
    if _label(release_version) == "unknown" or _label(deployment_id) == "unknown":
        raise ValueError("attribution requires bounded non-sensitive version/deployment labels")
    try:
        import fcntl
    except ImportError as exc:
        raise RuntimeError("FallbackJournal requires POSIX local file locking") from exc
    self._locking = fcntl
    self._path = Path(path)
    self._release_version = release_version
    self._deployment_id = deployment_id

FallbackJournal

FallbackJournal(path: str | Path, *, release_version: str, deployment_id: str)

A synchronous, fsynced metadata callback for a composition root.

Labels must be non-sensitive operator identifiers, not secrets or user input. The caller chooses the local path and provisions its directory. Each call opens/closes its own descriptor; there is no shutdown resource. Each event incurs synchronous fsync; operators own capacity and rotation. Journal failures propagate to the caller (the cutover board retains its existing telemetry-failure behavior). No admission/population claim is made.

Source code in src/symfonic/platform/fallback_journal.py
def __init__(
    self,
    path: str | Path,
    *,
    release_version: str,
    deployment_id: str,
) -> None:
    if _label(release_version) == "unknown" or _label(deployment_id) == "unknown":
        raise ValueError("attribution requires bounded non-sensitive version/deployment labels")
    try:
        import fcntl
    except ImportError as exc:
        raise RuntimeError("FallbackJournal requires POSIX local file locking") from exc
    self._locking = fcntl
    self._path = Path(path)
    self._release_version = release_version
    self._deployment_id = deployment_id