fix: auto_cycle — NameError 'meaningful' + Super Contexte bloqué par gate rapport
- Fix NameError: len(meaningful) → len(meaningful_mature) (ligne 624) - _auto_synthesize_knowledge() appelé même si pas assez de trades matures, pour que le Super Contexte se mette à jour à chaque cycle (gate 6h suffit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -535,6 +535,8 @@ def _auto_portfolio_snapshot(ai_key: str) -> None:
|
||||
f"with meaningful P&L (need ≥ 2). "
|
||||
f"Immatures={len(trop_tot)}, en cours={len(en_cours)}, matures={len(matures)}"
|
||||
)
|
||||
# Still try to refresh Super Contexte (independent of portfolio report)
|
||||
_auto_synthesize_knowledge(ai_key)
|
||||
return
|
||||
|
||||
# Sort matures by P&L for the report
|
||||
@@ -622,7 +624,7 @@ Génère un rapport JSON basé UNIQUEMENT sur les trades matures :
|
||||
)
|
||||
logger.info(
|
||||
f"[AutoSnapshot] Portfolio report #{report_id} saved automatically "
|
||||
f"({len(meaningful)} meaningful trades, avg P&L {avg_str})"
|
||||
f"({len(meaningful_mature)} meaningful mature trades, avg P&L {avg_str})"
|
||||
)
|
||||
|
||||
# ── Auto-synthesize Super Contexte if stale (>6h or never generated) ──
|
||||
|
||||
Reference in New Issue
Block a user