diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-22 14:36:25 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-23 09:36:05 +0000 |
| commit | 1aa92270bc0672eed4beb2d8d4556e9ee61d2cf2 (patch) | |
| tree | 5b0f20ccf1b57dc9acaefa1eedb3e660ddb13c40 /pkg/aflow/flow/patching/patching.go | |
| parent | 8fb0f8fb04f74e0c849fb8e2ae236419ceae6fcf (diff) | |
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.
Diffstat (limited to 'pkg/aflow/flow/patching/patching.go')
| -rw-r--r-- | pkg/aflow/flow/patching/patching.go | 68 |
1 files changed, 33 insertions, 35 deletions
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, + }, + ), }, ) } |
