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
Workflow Step Status
✅ validate-and-test: success
❌ execute-trading: failure
- All steps pass UNTIL "Execute daily trading"
- The script runs: autonomous_trader.py
Root Cause Hypothesis
One of these likely caused the regression:
-
manage_positions.pyintroduced - may have import error or API issue -
position_manager.pyimport failing in CI environment - 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
- View workflow logs to see exact Python error
- Roll back commit 17904f7 if that's the cause
- Test manage_positions.py locally
- Add better error handling to fail gracefully
Prevention
- Always run workflow after merging trading-related PRs
- Add integration tests for new trading scripts
- 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)