From 1aa92270bc0672eed4beb2d8d4556e9ee61d2cf2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 22 Jan 2026 14:36:25 +0100 Subject: pkg/aflow: unexport Pipeline type I've added NewPipeline constructor for a bit nicer syntax, but failed to use it in actual workflows. Unexport Pipeline and rename NewPipeline to Pipeline. This slightly improves workflows definition syntax. --- pkg/aflow/flow/patching/patching.go | 68 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) (limited to 'pkg/aflow/flow/patching') diff --git a/pkg/aflow/flow/patching/patching.go b/pkg/aflow/flow/patching/patching.go index a0b8d4a6c..9959e0bdb 100644 --- a/pkg/aflow/flow/patching/patching.go +++ b/pkg/aflow/flow/patching/patching.go @@ -45,42 +45,40 @@ func init() { ai.WorkflowPatching, "generate a kernel patch fixing a provided bug reproducer", &aflow.Flow{ - Root: &aflow.Pipeline{ - Actions: []aflow.Action{ - baseCommitPicker, - kernel.Checkout, - kernel.Build, - // Ensure we can reproduce the crash (and the build boots). - crash.Reproduce, - codesearcher.PrepareIndex, - &aflow.LLMAgent{ - Name: "debugger", - Model: aflow.BestExpensiveModel, - Reply: "BugExplanation", - Temperature: 1, - Instruction: debuggingInstruction, - Prompt: debuggingPrompt, - Tools: tools, - }, - &aflow.LLMAgent{ - Name: "diff-generator", - Model: aflow.BestExpensiveModel, - Reply: "PatchDiff", - Temperature: 1, - Instruction: diffInstruction, - Prompt: diffPrompt, - Tools: tools, - }, - &aflow.LLMAgent{ - Name: "description-generator", - Model: aflow.BestExpensiveModel, - Reply: "PatchDescription", - Temperature: 1, - Instruction: descriptionInstruction, - Prompt: descriptionPrompt, - }, + Root: aflow.Pipeline( + baseCommitPicker, + kernel.Checkout, + kernel.Build, + // Ensure we can reproduce the crash (and the build boots). + crash.Reproduce, + codesearcher.PrepareIndex, + &aflow.LLMAgent{ + Name: "debugger", + Model: aflow.BestExpensiveModel, + Reply: "BugExplanation", + Temperature: 1, + Instruction: debuggingInstruction, + Prompt: debuggingPrompt, + Tools: tools, }, - }, + &aflow.LLMAgent{ + Name: "diff-generator", + Model: aflow.BestExpensiveModel, + Reply: "PatchDiff", + Temperature: 1, + Instruction: diffInstruction, + Prompt: diffPrompt, + Tools: tools, + }, + &aflow.LLMAgent{ + Name: "description-generator", + Model: aflow.BestExpensiveModel, + Reply: "PatchDescription", + Temperature: 1, + Instruction: descriptionInstruction, + Prompt: descriptionPrompt, + }, + ), }, ) } -- cgit mrf-deployment