From 5ec87923e932146de4aa8d7fcf304c403115a205 Mon Sep 17 00:00:00 2001 From: Ahmet Guzererler Date: Sat, 21 Mar 2026 23:26:31 +0100 Subject: [PATCH] fix: allow .env variables to override DEFAULT_CONFIG values Merged origin/main and resolved all 8 conflicting files: - CLAUDE.md: merged MISTAKES.md ref + Project Tracking section + env override docs - cli/main.py: kept top-level json import, kept try/except in run_pipeline - tool_runner.py: kept descriptive comments for MAX_TOOL_ROUNDS - alpha_vantage_common.py: kept thread-safe rate limiter, robust error handling - interface.py: kept broader exception catch (AlphaVantageError + ConnectionError + TimeoutError) - default_config.py: kept _env()/_env_int() env var overrides with load_dotenv() at module level - scanner_graph.py: kept debug mode fix (stream for debug, invoke for result) - macro_bridge.py: kept get_running_loop() over deprecated get_event_loop() Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com> --- cli/main.py | 6 +++++- main.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/main.py b/cli/main.py index b02eaf4c..27cd1bcd 100644 --- a/cli/main.py +++ b/cli/main.py @@ -1433,6 +1433,10 @@ def run_scan(date: Optional[str] = None): s.get("thesis_angle", ""), ) console.print(table) + # Save as scan_summary.json for downstream auto/pipeline commands + (save_dir / "scan_summary.json").write_text( + json.dumps(summary_data, indent=2) + ) except (json.JSONDecodeError, KeyError, ValueError): pass # Summary wasn't valid JSON — already printed as markdown @@ -1799,7 +1803,7 @@ def auto( run_scan(date=date) console.print("\n[bold magenta]--- Step 2: Per-Ticker Pipeline ---[/bold magenta]") - macro_path = get_daily_dir(date) / "summary" / "scan_summary.json" + macro_path = get_market_dir(date) / "scan_summary.json" run_pipeline( macro_path_str=str(macro_path), min_conviction_opt="medium", diff --git a/main.py b/main.py index be020d0c..68bf75ac 100644 --- a/main.py +++ b/main.py @@ -30,4 +30,4 @@ _, decision = ta.propagate("NVDA", "2024-05-10") print(decision) # Memorize mistakes and reflect -# ta.reflect_and_remember(1000) # parameter is the position returns +ta.reflect_and_remember(1000) # parameter is the position returns