Rename journal, steps and recovery: rename.json (RENAME_JOURNAL_FILE) records each step, documents are written whole and committed alone (FlowStore.replace_documents, identity.write_documents) and rolled back before the journal goes forward; history per run scoped by flow id, alert ledger, alerts.json, state and queue steps idempotent and checkpointed; audit row once per op; recover_documents before assign_ids and recover_runtime before the engine is built, retried until done; repeated requests get the stored result, stale ones 409; plan refuses rename_in_progress; alerts.json written atomically; completeness scanner in the test utilities

This commit is contained in:
2026-11-02 21:30:01 +01:00
parent fa2a213631
commit 2d65118d82
9 changed files with 1420 additions and 25 deletions
+4 -2
View File
@@ -15,6 +15,7 @@ from fluksio.api.deps import (
from fluksio.core.config import settings
from fluksio.flow import telegram, webpush
from fluksio.flow.alerts import Alert, AlertsConfig
from fluksio.flow.identity import _replace
from fluksio.flow.secrets import SECRET_REF, SecretNotFound, resolve_params
from fluksio.models import Message
@@ -48,10 +49,11 @@ def read_config() -> AlertsConfig:
def write_config(config: AlertsConfig) -> None:
"""Blocking."""
"""Blocking. Whole or not at all: a file cut short would read as no
configuration, which is alerting turned off."""
path = _path()
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(config.model_dump_json(indent=2))
_replace(path, config.model_dump_json(indent=2))
@router.get("/config", response_model=AlertsConfig, dependencies=SUPERUSER)