mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-02 01:27:24 -04:00
Root Cause: The get_db_path() function was being called multiple times in the initialization chain, causing recursive suffix addition: data/jobs.db -> data/jobs_dev.db -> data/jobs_dev_dev.db This resulted in tables being created in data/jobs_dev_dev.db while the application tried to access data/jobs_dev.db (empty database). Fix: Added idempotency check in get_db_path() to detect and skip transformation if path already contains "_dev.db" suffix. Evidence from Diagnostics: - alpha.20 logs showed: Input='data/jobs_dev.db', Resolved='data/jobs_dev_dev.db' - Tables were created in jobs_dev_dev.db but accessed from jobs_dev.db - This caused "no such table: jobs" errors despite successful initialization All 28 integration tests pass with this fix. Fixes #6