Skip to content

AI assisted contribution guides - #14848

Open
DaanHoogland wants to merge 2 commits into
mainfrom
ai-assisted-contributions
Open

DaanHoogland wants to merge 2 commits into
mainfrom
ai-assisted-contributions

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Description

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.92%. Comparing base (85ca17a) to head (b515eab).

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #14848   +/-   ##
=========================================
  Coverage     20.92%   20.92%           
- Complexity    21142    21146    +4     
=========================================
  Files          6057     6057           
  Lines        549556   549556           
  Branches      73477    73477           
=========================================
+ Hits         114991   115003   +12     
+ Misses       421116   421104   -12     
  Partials      13449    13449           
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.37% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.87%
Branch coverage 21.09%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

@bernardodemarco bernardodemarco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland, thanks for the PR, we were really needing something like this...

I just left some minor suggestions, but all good from my side

Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md

If you use AI to submit an issue of any kind (bug report, improvement, feature idea, documentation report, security finding) or a pull request, you are expected to spend the extra tokens and include the work that makes it actionable:

- **Documentation**: a clear description of the problem or change, the affected versions and components, and, for new or changed behaviour, the documentation or PendingReleaseNotes text that goes with it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland, maybe an example or description about what PendingReleaseNotes is would be helpful here

Suggested change
- **Documentation**: a clear description of the problem or change, the affected versions and components, and, for new or changed behaviour, the documentation or PendingReleaseNotes text that goes with it.
- **Documentation**: a clear and straightforward description of the problem or change, the affected versions and components, and, for new or changed behaviour, the documentation or PendingReleaseNotes text that goes with it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PendingReleaseNotes to me is nothing but things that should go in the next release notes. not my forte :/ can you suggest a text?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland, maybe something like this? I don't know if it's worth it mentioning about content for release notes

Suggested change
- **Documentation**: a clear description of the problem or change, the affected versions and components, and, for new or changed behaviour, the documentation or PendingReleaseNotes text that goes with it.
- **Documentation**: a clear and straightforward description of the problem or change, the affected versions and components, and, for new or changed behaviour, the corresponding documentation. Documentation content, including user guides, should be submitted as a separate PR to the https://github.com/apache/cloudstack-documentation/ repository, and linked from the code PR.

Comment thread CONTRIBUTING.md Resolved
Comment thread CONTRIBUTING.md

Review and verify AI output before you submit it. You are responsible for the accuracy of what you submit, and for making sure it compiles, passes the tests and actually addresses the issue. Please mention in the issue or pull request that AI tools were used.

Issues or pull requests that are clearly AI-generated but lack these elements may be closed or put on hold until they are completed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland, maybe a note highlighting the importance of manual testing AI patches and ensuring they actually work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
Issues or pull requests that are clearly AI-generated but lack these elements may be closed or put on hold until they are completed.
Issues or pull requests that are clearly AI-generated but lack these elements may be closed or put on hold until they are completed. It helps if you describe how you "manually" tested the AI's output.

how about that @bernardodemarco ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland, what about something like this?

Suggested change
Issues or pull requests that are clearly AI-generated but lack these elements may be closed or put on hold until they are completed.
Issues or pull requests that are clearly AI-generated but lack these elements may be closed or put on hold until they are completed. **Note:** Submitting AI-generated code does not replace testing it. Before opening a PR, you must manually test your changes and confirm they work as intended. Do not rely on the AI's output, or on a passing CI run alone, as proof of correctness. In the PR description, state what you tested and how (environment, steps, and results), so reviewers can see that a human has verified the change. As the author, you are responsible for every line you submit, whether or not an AI tool wrote it.

@bhouse-nexthop bhouse-nexthop 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.

I agree this is a good direction to advertise that AI assistance was used in generation of the PR. I also agree that if a contributor is using AI they should be generating test coverage as well, that is something AI excels at.

That said, I think you should go a step further in this PR (or a follow-up) and provide a detailed AGENTS.md to provide some guardrails to ensure PRs are still reviewable by humans for common problems:

  • language forms for commit messages, code comments, and pr descriptions that aren't in plain simple english, or state things that simply don't need to be said or don't add clarity.
  • code comments just stating what the code below does that is already obvious.
  • minimize code for review-ability. Often AI will go down a rabbit hole on handling code paths that are impossible making PRs 10x larger than they need to be.

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

I agree this is a good direction to advertise that AI assistance was used in generation of the PR. I also agree that if a contributor is using AI they should be generating test coverage as well, that is something AI excels at.

That said, I think you should go a step further in this PR (or a follow-up) and provide a detailed AGENTS.md to provide some guardrails to ensure PRs are still reviewable by humans for common problems:

  • language forms for commit messages, code comments, and pr descriptions that aren't in plain simple english, or state things that simply don't need to be said or don't add clarity.
    I have very extremist ideas about these:
  • only one line commit messages
  • no inline code comments (these should always lead to a top-of-method comment and a factored out bit of code)
  • (not an english speaker so I don't care about french or italian in the code)
    and
  • no references in comments or code to PRs or to issues
  • code comments just stating what the code below does that is already obvious.
    as in no..., right?
  • minimize code for review-ability. Often AI will go down a rabbit hole on handling code paths that are impossible making PRs 10x larger than they need to be.
    AI is also very good at reducing code, so we should incite people to spend the extra few tokens on that as well. It is a simple prompt: "deduplicate and reduce this code without sacrificing readability." This should be a standard step in AI coding.

very good idea (for a separate/parallel PR), will you start that @bhouse-nexthop ?

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

very good idea (for a separate/parallel PR), will you start that @bhouse-nexthop ?

I got impatient, so I generated one from my own dev-env, but need to really look again. I guess some habits and mix of project/work/hobby is due addressing. We do have a very terse AGENTS.md, which only refers to the security model so far.

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

please discuss #14872

@DaanHoogland DaanHoogland added this to the 24.0 milestone Nov 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants