revert(backend): remove unnecessary DB fallback from AgentExecutorBlock

The DB fallback was added based on wrong analysis. The actual fix is
passing dry_run=True to add_graph_execution (previous commit) so
credential validation is skipped during dry-run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zamil Majdy
2026-03-29 02:02:20 +00:00
parent 56090f870c
commit ff05b5b8d5

View File

@@ -164,30 +164,6 @@ class AgentExecutorBlock(Block):
extra_steps=event.stats.node_exec_count if event.stats else 0,
)
)
# Fallback for dry-run: if no outputs were yielded via events
# (common in simulation where events may arrive before listener),
# query the sub-agent's output nodes directly from the DB.
if not yielded_node_exec_ids:
from backend.data.execution import get_node_executions
results = await get_node_executions(
graph_exec_id=graph_exec_id,
statuses=[ExecutionStatus.COMPLETED],
)
for result in results:
r_block = get_block(result.block_id)
if not r_block or r_block.block_type != BlockType.OUTPUT:
continue
r_name = (result.input_data or {}).get("name")
if not r_name:
continue
for r_data in (result.output_data or {}).get("output", []):
logger.debug(
f"Execution {log_id} fallback output {r_name}: {r_data}"
)
yield r_name, r_data
break
logger.debug(