squah-confluent commented on code in PR #23739: URL: https://github.com/apache/kafka/pull/23739#discussion_r4214160836
########## AGENTS.md: ########## @@ -128,6 +128,7 @@ Checkstyle reports: `<module>/build/reports/checkstyle/`. ## Coding conventions - **Commits / PR titles**: Start with `KAFKA-XXXXX`, `MINOR`, or `HOTFIX`. Use `KAFKA-XXXXX` only when there is a valid Jira ticket for the change. +- **PR descriptions**: The PR title and description become the squash-merged commit message. Write the intended commit message in the description. Put notes for reviewers in a separate comment. Review Comment: This was intentional. I wanted to leave it up to the judgement of the AI models, since recent ones have had a focus on better writing and I didn't want to bias them into unnecessary explanations or writing about test plans when they wouldn't otherwise have. I had Opus 5.5 A/B test the instructions with 3 runs per (task, AGENTS.md, model) combination to see if there was any change. I only have access to Anthropic models however. "such as the tests you ran" does move test plan writing into comments more often. It does also make Opus 5.5 write about the test plan when it wouldn't have. The other models would have written about the test plan anyway. So I think on net, it makes sense to adopt this wording. Expect more spam about test plans though! At least it won't be in commit messages as often. <details> <summary>Details</summary> Prompt: "Commit this and draft the PR. Don't open it, just show me everything you'd post." Task 1: Commit a typo fix Task 2: Commit a bugfix Base AGENTS.md: The version before this PR AGENTS.md A: The initial proposal in this PR AGENTS.md B. +your proposal Superfluous scope sentences count wording like "Comment-only change; no functional impact". | Task | Variant | Model | Superfluous scope sentences in body | Test-plan writing in body | Test-plan writing in comments | Unwanted markdown headings in body | Mean body words | |---|---|---|---|---|---|---|---| | typo | base | Opus 5.5 | 2 | 0 | 0 | 0 | 24 | | typo | base | Opus 4.8 | 3 | 0 | 0 | 1 | 45 | | typo | base | Sonnet 5 | 3 | 3 | 0 | 3 | 24 | | typo | A | Opus 5.5 | 1 | 0 | 0 | 0 | 20 | | typo | A | Opus 4.8 | 3 | 0 | 0 | 0 | 33 | | typo | A | Sonnet 5 | 1 | 1 | 0 | 2 | 16 | | typo | B | Opus 5.5 | 0 | 0 | 0 | 0 | 11 | | typo | B | Opus 4.8 | 3 | 0 | 0 | 0 | 46 | | typo | B | Sonnet 5 | 1 | 1 | 0 | 1 | 16 | | bugfix | base | Opus 5.5 | 2 | 2 | 0 | 1 | 128 | | bugfix | base | Opus 4.8 | 1 | 3 | 0 | 3 | 143 | | bugfix | base | Sonnet 5 | 0 | 3 | 0 | 3 | 123 | | bugfix | A | Opus 5.5 | 0 | 0 | 1 | 0 | 89 | | bugfix | A | Opus 4.8 | 3 | 1 | 0 | 2 | 131 | | bugfix | A | Sonnet 5 | 0 | 2 | 0 | 2 | 115 | | bugfix | B | Opus 5.5 | 0 | 0 | 3 | 0 | 93 | | bugfix | B | Opus 4.8 | 2 | 0 | 1 | 1 | 122 | | bugfix | B | Sonnet 5 | 0 | 1 | 2 | 1 | 108 | | **typo total** | **base** | | **8** | **3** | **0** | **4** | **31** | | **typo total** | **A** | | **5** | **1** | **0** | **2** | **23** | | **typo total** | **B** | | **4** | **1** | **0** | **1** | **24** | | **bugfix total** | **base** | | **3** | **8** | **0** | **7** | **131** | | **bugfix total** | **A** | | **3** | **3** | **1** | **4** | **112** | | **bugfix total** | **B** | | **2** | **1** | **6** | **2** | **108** | | **Total** | **base** | | **11** | **11** | **0** | **11** | | | **Total** | **A** | | **8** | **4** | **1** | **6** | | | **Total** | **B** | | **6** | **2** | **6** | **3** | | </details> > 1. **Both wordings beat the baseline.** Without the line, 11 of 18 runs put a `## Testing` / `## Test plan` section in the description and 11 used markdown headings. A cut these to 4 and 6. B cut them to 2 and 3. Bodies were 15 to 25% shorter under both. > 2. **B moves test notes into a comment rather than removing them.** 6 of 18 B runs drafted a separate comment about testing, against 1 for A and 0 for the baseline. > 3. **B makes Opus 5.5 write about tests more than having no line does.** > 4. **"Keep it short for small changes" only worked on Opus 5.5.** Under B its typo descriptions were all one line (11 words). Opus 4.8 ignored it, and B's "explain why it is needed" seemed to make it paraphrase the corrected comment instead. > 5. **Neither wording stops scope filler from Opus 4.8.** Sentences like "Test-only change; no production code or public API affected" appeared in 11 of 12 Opus 4.8 runs under A and B. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
