Skip to content

Prevent AI making short unit test helper functions - #5206

Open
CharlieL7 wants to merge 1 commit into
developfrom
agents_prevent_short_test_helpers
Open

Prevent AI making short unit test helper functions#5206
CharlieL7 wants to merge 1 commit into
developfrom
agents_prevent_short_test_helpers

Conversation

@CharlieL7

Copy link
Copy Markdown
Collaborator

Motivation

  • Make it so AI tools try to keep unit tests self contained rather than having many short helper functions.

Technical Details

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Follow the LLVM AI Tool Use Policy for contributions using AI.

@CharlieL7
CharlieL7 requested a review from a team as a code owner August 27, 2026 21:32
Copilot AI lite review requested due to automatic review settings August 27, 2026 21:32
@CharlieL7 CharlieL7 added simple small or simple changes skip bot checks Skips the Performance and Accuracy CI tests labels Aug 27, 2026
@CharlieL7 CharlieL7 changed the title Prevent making short unit test helper functions Prevent AI making short unit test helper functions Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s agent/contributor guidance to discourage introducing small, low-value helper functions inside unit test files, keeping tests more readable and self-contained.

Changes:

  • Adds an explicit “Keep tests self-contained” policy for unit tests, including concrete do/don’t examples.
  • Clarifies that the only acceptable local helper in a test file is a single run_pass(...) wrapper, with stricter guidance against layering more helpers on top.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@TedThemistokleous TedThemistokleous left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simple small or simple changes skip bot checks Skips the Performance and Accuracy CI tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants