Auto-generated templates had no lag_days on edges → effective_lag_days=0 →
_drift_metrics used exact-date daily bar (often empty) → actual_json='{}' →
comprehensionScore returned null even after prediction_json was populated.
- Default effective_lag_days=5 when computed as 0 in _run_auto_analysis
- Add lag_days:3 to all auto-generated template edges in _build_graph_json_from_spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Events with surprise_pct=NULL (bootstrap or older events) got inputs={} → evaluate_graph
returned {} → prediction_json='{}' → all scores showed 'En attente'.
Three-step fallback in _run_auto_analysis:
1. Use event.surprise_pct if set (existing behaviour)
2. Compute from actual_value / expected_value stored in market_events
3. Look up most recent ff_calendar release by currency + date
Frontend diagnostic now shows surprise_pct per event and exposes actual/expected
in the refresh result panel to make the source visible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- TabLibrary: bouton Supprimer (templates user uniquement)
- TabEditor: inputMapping dans EditorState, panneau mapping visible quand noeud observable selectionne
- TabEditor: edition d aretes (cliquer sur arête pour modifier style/force/signe/label)
- Backend: GET /api/causal-lab/data-sources (prices/macro_series/ff_events)
- analyze: auto-fetch market_watchlist+economic_events+ff_calendar depuis input_mapping
- TabAnalyze: affiche inputs auto-recuperes vs manuels dans les resultats
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- TabEditor: updateExisting() + bouton bleu visible si templateId set
- Bouton Creer renomme en copie pour clarifier
- PATCH /api/causal-lab/template/{id} pour graph_json + metadonnees
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>