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
+6
View File
@@ -23,6 +23,7 @@ DERIVED_PATHS = {
"FLOWS_DIR": "flows",
"SECRETS_FILE": "secrets.enc",
"ALERTS_FILE": "alerts.json",
"RENAME_JOURNAL_FILE": "rename.json",
"WEBPUSH_FILE": "webpush.json",
"PANELS_FILE": "panels.json",
"DEVICES_FILE": "devices.json",
@@ -85,6 +86,11 @@ class Settings(BaseSettings):
# Which failures reach which channel. Beside the flows, not in them:
# alerting is the deployment's concern, not any one flow's.
ALERTS_FILE: Path = Path("flow-data/alerts.json")
# The last key rename, step by step, so one a crash interrupted is
# finished or undone on the next start. Outside the flows, whose git
# history it must not enter, and kept once done so a repeated request is
# recognised.
RENAME_JOURNAL_FILE: Path = Path("flow-data/rename.json")
# This instance's web push keypair and the browsers subscribed to it.
# Beside the alerts it serves; deleting it makes every device subscribe
# again.