DEV Community

Igor Ganapolsky
Igor Ganapolsky

Posted on • Originally published at github.com

AI Trading: Lesson Learned #093: Automation Metadata Stale - No Trades Executed Jan 7

Lesson Learned #093: Automation Metadata Stale - No Trades Executed Jan 7

Date: January 7, 2026
Severity: CRITICAL
Category: Automation, Trading System, Verification

Incident Summary

CEO asked why paper trading didn't execute today. Investigation revealed:

  • No trades_2026-01-07.json file exists
  • automation.last_execution_attempt shows 2025-12-16 (3+ weeks stale)
  • Jan 6 trades were from MANUAL triggers, not scheduled automation

Evidence

File: trades_2026-01-07.json → DOES NOT EXIST
automation.last_execution_attempt: 2025-12-16 (STALE)
automation.next_scheduled_execution: 2025-12-17 (IN THE PAST)
paper_account.last_sync: 2026-01-06T17:27:00 (CEO screenshot, manual)
Jan 6 trades source: immediate-trade workflow + test_sync (MANUAL)
Enter fullscreen mode Exit fullscreen mode

Root Cause

The automation metadata in system_state.json is NOT being updated by the daily-trading GitHub Actions workflow. This created a false sense of automation being operational.

What Went Wrong

  1. Assumption: Assumed scheduled workflow was executing and recording trades
  2. Reality: The workflow may run, but isn't updating system_state.json or creating trade files
  3. Verification Gap: Did not verify trade file existence AFTER workflow supposedly ran

Corrective Actions

  1. Daily-trading workflow MUST:

    • Create trades_YYYY-MM-DD.json file
    • Update automation.last_execution_attempt timestamp
    • Update automation.next_scheduled_execution timestamp
  2. Session start verification MUST check:

    • Trade file exists for previous trading day
    • automation.last_execution_attempt is recent (< 2 trading days)
  3. Never claim automation is working without:

    • Trade file evidence from today/yesterday
    • Fresh automation timestamps

Never Again

  • NEVER assume scheduled automation ran without checking trade files
  • NEVER claim "system ready" when automation metadata is 3+ weeks old
  • ALWAYS verify trade file creation, not just workflow trigger

Related Lessons

  • LL-092: Compounding strategy mandatory
  • LL-074: ChromaDB must be verified

Tags

automation, stale_data, verification, trading_system, incident_jan07


This lesson was auto-published from our AI Trading repository.

More lessons: rag_knowledge/lessons_learned

Top comments (0)