Phoenix Blue Flame Protocol

Self-healing system architecture — automatic process resurrection, zombie exorcism, disk state persistence, and continuous health monitoring.

Phoenix Blue Flame Protocol

Overview

The Phoenix Protocol is Alpha Draconis's self-healing system — a watchdog layer that ensures your Risk Firewall remains operational 24/7 without human intervention.

When you see the 🔵🔥 icon in your Dashboard, it means the system has detected and recovered from an anomaly in milliseconds. No action required on your part.


How It Works

1. Heartbeat Monitor

Every Sovereign Node (Sentinel Pro and Hydra Core) sends a heartbeat signal to the Cloud Dashboard at regular intervals:

[Sovereign Node] → Heartbeat (every 15s) → [Cloud Dashboard] → Status: ALIVE

If a heartbeat is missed, the system escalates through three levels:

| Level | Trigger | Response | |-------|---------|----------| | YELLOW | 1 missed heartbeat | Log warning, continue monitoring | | ORANGE | 3 consecutive misses | Initiate process restart | | RED | Node unresponsive > 60s | Full process resurrection + alert |

2. Automatic Process Resurrection

When a process crashes or hangs:

  1. Detection — The watchdog identifies the terminated/frozen process within 5 seconds.
  2. Cleanup — Any orphaned resources (file locks, network sockets) are released.
  3. Restart — A fresh instance is spawned with the last known good configuration persisted to disk.
  4. Verification — The system confirms the new process is healthy before resuming operations.

The entire cycle completes in under 10 seconds. Your Risk Firewall is never down for more than a heartbeat.

3. Zombie Process Exorcism

What is a Zombie Process?

A zombie process is a task that appears to be running but is actually stuck — consuming resources without producing results. Think of it as a "ghost" in the machine.

How Phoenix handles it:

  • Continuously scans for processes consuming CPU/memory without producing output
  • Identifies orphaned child processes that lost their parent
  • Terminates zombies immediately and reclaims all system resources
  • Logs every exorcism event for audit trail

4. Eternal Memory (Disk State Persistence)

🐉 Node crash ≠ Data loss

All critical state is persisted to disk in real-time by state_manager.py. When a Node restarts, Phoenix reads back the state file and resurrects the full operational memory — including Loss Streak, lock status, session history, and the active risk configuration.

Data preserved across crashes:

| State | Description | Consequence If Lost | |-------|-------------|---------------------| | Loss Streak | Current consecutive loss count | System wouldn't know the trader is losing → dangerous new entries | | Risk Lock | Trading lock status | Locked node would reopen trading — violating Daily Limit | | Session History | Intraday trading session log | Loss of trade count and total risk exposure tracking | | Config Snapshot | Latest risk config from Dashboard | Node falls back to defaults instead of live config |

All state is encrypted and stored locally on the Sovereign Node. Phoenix reads → restores → resumes — not a single byte lost.


Dashboard Integration

Your Alpha Draconis Dashboard shows real-time Phoenix status:

  • 🟢 Healthy — All processes running normally
  • 🔵🔥 Phoenix Active — Self-healing event detected and resolved
  • 🟡 Warning — Minor anomaly under investigation
  • 🔴 Critical — Manual intervention required (extremely rare)

Key Benefits

  • Zero-downtime guarantee — Automated recovery before you even notice
  • Eternal memory — State persisted to disk → Node crash preserves Loss Streak & config
  • Resource optimization — Zombie Exorcism prevents memory leaks
  • Full audit trail — Every event logged to your Activity Log
  • Zero configuration — Phoenix is always active on your Sovereign Node