Skip to content

Commit 1477d73

Browse files
committed
fix(pipeline): Merge multiple instruction sets for AI test generation
1 parent ce9f4c9 commit 1477d73

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/secnodeapi/services/pipeline.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,17 @@ async def build_pipeline_artifacts(
479479
logger.warning("Deep recon phase failed, continuing without parameter enrichment", error=str(e))
480480

481481
understanding = await understand_api_with_ai(api_structure, tool_context=tool_context)
482+
483+
# Merge all user instructions into a single variables dictionary for the AI
484+
combined_instructions = {}
485+
if pipeline_input.instructions:
486+
for instr in pipeline_input.instructions:
487+
combined_instructions.update(instr.variables)
488+
482489
tests = await generate_test_cases(
483490
understanding,
484491
api_structure,
485-
instructions=pipeline_input.instructions[0].model_dump() if pipeline_input.instructions else None,
492+
instructions={"variables": combined_instructions} if combined_instructions else None,
486493
tool_context=tool_context,
487494
)
488495
return api_structure, tests, orch_result

0 commit comments

Comments
 (0)