aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/flow/patching/patching.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-30 20:25:26 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-31 16:07:13 +0000
commit3576455960ee88cefa43cad0bdfd1458549569b9 (patch)
treeb0943ccce2feb664e2a30dd2462d99cf13fc4bf7 /pkg/aflow/flow/patching/patching.go
parentafcca7fa917427568d76a8295ff9f1e88824c1fe (diff)
pkg/aflow/flow/patching: use recent commit subjects
Give LLM the recent commit subjects when it generates description, so that it can use the same style. Add infrastrcuture to write end-to-end action tests to test it.
Diffstat (limited to 'pkg/aflow/flow/patching/patching.go')
-rw-r--r--pkg/aflow/flow/patching/patching.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/aflow/flow/patching/patching.go b/pkg/aflow/flow/patching/patching.go
index 1906204ec..f8ee75a31 100644
--- a/pkg/aflow/flow/patching/patching.go
+++ b/pkg/aflow/flow/patching/patching.go
@@ -75,6 +75,7 @@ func createPatchingFlow(name string, summaryWindow int) *aflow.Flow {
MaxIterations: 10,
},
getMaintainers,
+ getRecentCommits,
&aflow.LLMAgent{
Name: "description-generator",
Model: aflow.BestExpensiveModel,
@@ -222,6 +223,12 @@ Additional description of the patch:
{{.PatchExplanation}}
+Here are summaries of recent commits that touched the same files.
+Format the summary line consistently with these, look how prefixes
+are specified, letter capitalization, style, etc.
+
+{{.RecentCommits}}
+
{{if titleIsWarning .BugTitle}}
If the patch removes the WARN_ON macro, refer to the fact that WARN_ON
must not be used for conditions that can legitimately happen, and that pr_err