DEV Community

Igor Ganapolsky
Igor Ganapolsky

Posted on • Originally published at github.com

AI Trading: Lesson Learned #095: Trading Workflow Regression - Jan 7, 2026

Lesson Learned #095: Trading Workflow Regression - Jan 7, 2026

Date: January 7, 2026
Severity: CRITICAL
Category: Automation, Regression

What Happened

The Daily Trading workflow passes all pre-checks but fails at the "Execute daily trading" step.

Evidence

Timeline

  • Jan 6, 18:45 UTC - Last successful trade
  • Jan 7 - ALL runs fail at same step (4 failures)

What Changed

Commit 17904f7 (Jan 7, 14:49 UTC):
- Added scripts/manage_positions.py
- Modified daily-trading.yml to call it
Enter fullscreen mode Exit fullscreen mode

Workflow Step Status

✅ validate-and-test: success
❌ execute-trading: failure
   - All steps pass UNTIL "Execute daily trading"
   - The script runs: autonomous_trader.py
Enter fullscreen mode Exit fullscreen mode

Root Cause Hypothesis

One of these likely caused the regression:

  1. manage_positions.py introduced - may have import error or API issue
  2. position_manager.py import failing in CI environment
  3. Some state file issue from previous commits

What We Know

  • Yesterday's trades succeeded
  • Today's fail at same step
  • Pre-checks ALL pass (secrets, tests, health checks)
  • The failure is in the Python execution, not configuration

Immediate Actions Needed

  1. View workflow logs to see exact Python error
  2. Roll back commit 17904f7 if that's the cause
  3. Test manage_positions.py locally
  4. Add better error handling to fail gracefully

Prevention

  1. Always run workflow after merging trading-related PRs
  2. Add integration tests for new trading scripts
  3. Make new scripts optional (feature flag) initially

Tags

regression, daily-trading, automation, critical


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

More lessons: rag_knowledge/lessons_learned

Top comments (0)