mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
debug: add comprehensive diagnostic logging for ContextInjector flow
Add instrumentation at component boundaries to trace where ContextInjector values become None: - ModelDayExecutor: Log ContextInjector creation and set_context() invocation - BaseAgent.set_context(): Log entry, client creation, tool reload, completion - Includes object IDs to verify instance identity across boundaries Part of systematic debugging investigation for issue #TBD.
This commit is contained in:
@@ -140,7 +140,10 @@ class ModelDayExecutor:
|
||||
job_id=self.job_id,
|
||||
session_id=session_id
|
||||
)
|
||||
logger.info(f"[DEBUG] ModelDayExecutor: Created ContextInjector with signature={self.model_sig}, date={self.date}, job_id={self.job_id}, session_id={session_id}")
|
||||
logger.info(f"[DEBUG] ModelDayExecutor: Calling await agent.set_context()")
|
||||
await agent.set_context(context_injector)
|
||||
logger.info(f"[DEBUG] ModelDayExecutor: set_context() completed")
|
||||
|
||||
# Run trading session
|
||||
logger.info(f"Running trading session for {self.model_sig} on {self.date}")
|
||||
|
||||
Reference in New Issue
Block a user