M14: add n8n execution health telemetry

This commit is contained in:
NuklearRabbit
2026-08-10 03:41:06 +02:00
parent 218599af7d
commit 58fb515337
17 changed files with 368 additions and 22 deletions
+27
View File
@@ -2329,3 +2329,30 @@ evidence yet."
**210 passed, 1 warning**.
- Exact next action: add authenticated n8n workflow heartbeats and execution results,
surface stale/healthy workflow state, then update generated contracts and E2E coverage.
## n8n execution health telemetry (2026-08-10)
- Added an authenticated, canonical-workflow-only, idempotent heartbeat contract. Status
now records each workflow's last execution ID/result and classifies it as healthy,
stale, failed or without evidence. Scheduled scan evidence expires after 2h30 and the
daily RAGcore sync after 30h; event-driven workflows are not falsely marked stale just
because no business event arrived.
- Registered target-workflow failures override older success evidence until a newer
successful execution arrives. The Automation UI renders these explicit states and
execution IDs instead of treating any historical timestamp as permanently healthy.
- All four versioned n8n definitions now report a successful execution heartbeat with
bounded retries; the central error handler continues to register failed target runs.
- Evidence: JSON validation for all four definitions, frontend lint, ruff and mypy passed;
focused integration tests **26 passed** and full Unraid suite **212 passed, 1 warning**.
- Live deployment: API/web deployed at `c9a8609`; all five pre-existing n8n workflows
were exported to the recoverable appdata backup
`backups/mobilityops-pre-heartbeat-20260810.json` before the four definitions were
imported and published. The import initially exposed n8n CLI's unsafe name-only
credential resolution (both Header Auth nodes resolved to the service credential);
credential IDs were restored from the backup before republishing. A real return then
completed through outbox → server n8n → callback → heartbeat as execution `337`;
its first 403 delivery remained safely retryable and succeeded after the credential
correction. Live n8n state is operational and Vehicle Return is `healthy` with its
execution ID visible.
- Exact next action: regenerate the checked-in OpenAPI contract, add E2E coverage for the
new operator workflows, document credential-safe n8n upgrades and run acceptance.