mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend): apply simulation_context to execution_context when resuming dry-run
When resuming a graph execution with an already-provided execution_context, the computed safe_simulation_context was never applied to it, causing simulation hints to be silently ignored for resumed dry-run executions.
This commit is contained in:
@@ -923,6 +923,11 @@ async def add_graph_execution(
|
||||
# For resumed executions, simulation_context comes from the existing
|
||||
# execution_context (if any) or is gated behind dry_run.
|
||||
safe_simulation_context = simulation_context if dry_run else None
|
||||
|
||||
# Apply simulation_context to an already-provided execution_context
|
||||
# so that resumed dry-run executions propagate hints to simulated blocks.
|
||||
if execution_context is not None and safe_simulation_context is not None:
|
||||
execution_context.simulation_context = safe_simulation_context
|
||||
else:
|
||||
parent_exec_id = (
|
||||
execution_context.parent_execution_id if execution_context else None
|
||||
|
||||
Reference in New Issue
Block a user