Skip to content

Commit db4db92

Browse files
JibolaCopilot
andauthored
PYTHON-5401: Add AI Generated Contributions Policy (#2696)
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
1 parent ee851ba commit db4db92

File tree

2 files changed

+35
-31
lines changed

2 files changed

+35
-31
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ If you are an external contributor and there is no JIRA ticket associated with y
66
for the PR title. A MongoDB employee will create a JIRA ticket and edit the name and links as appropriate.
77
88
Note on AI Contributions:
9-
We do not accept pull requests that are primarily or substantially generated by AI tools (ChatGPT, Copilot, etc.).
10-
All contributions must be written and understood by human contributors.
9+
We only accept pull requests that are authored and submitted by human contributors who fully understand the changes they are proposing.
10+
All contributions must be written and understood by human contributors. Please read about our policy in our contributing guide.
1111
-->
1212
[JIRA TICKET]
1313

CONTRIBUTING.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,49 +85,53 @@ likelihood for getting review sooner shoots up.
8585
- `versionadded:: 3.11`
8686
- `versionchanged:: 3.5`
8787

88-
**Pull Request Template Breakdown**
88+
### AI-Generated Contributions Policy
8989

90-
- **Github PR Title**
90+
#### Our Stance
9191

92-
- The PR Title format should always be
93-
`[JIRA-ID] : Jira Title or Blurb Summary`.
92+
We only accept pull requests that are authored and submitted by human contributors who fully understand the changes they are proposing. Pull requests that are not clearly owned and understood by a human contributor may be closed. **All contributions must be submitted, reviewed, and understood by human contributors.**
9493

95-
- **JIRA LINK**
94+
##### Why This Policy Exists
9695

97-
- Convenient link to the associated JIRA ticket.
96+
At MongoDB, we understand the power and prevalence of AI tools in software development. With that being said, many MongoDB libraries are foundational tools used in production systems worldwide. The nature of these libraries requires:
9897

99-
- **Summary**
98+
- **Deep domain expertise**: MongoDB's wire protocol, BSON specification, connection pooling, authentication mechanisms, and concurrency patterns require an understanding that AI alone cannot substantiate.
10099

101-
- Small blurb on why this is needed. The JIRA task should have
102-
the more in-depth description, but this should still, at a
103-
high level, give anyone looking an understanding of why the
104-
PR has been checked in.
100+
- **Long-term maintainability**: Contributors need to be able to explain *why* code is written a certain way, explain design decisions, and be available to iterate on their contributions.
105101

106-
- **Changes in this PR**
102+
- **Security responsibility**: Authentication, credential handling, and TLS implementation cannot be left to probabilistic code generation.
107103

108-
- The explicit code changes that this PR is introducing. This
109-
should be more specific than just the task name. (Unless the
110-
task name is very clear).
104+
##### What This Means for Contributors
111105

112-
- **Test Plan**
106+
**Required:**
113107

114-
- Everything needs a test description. Describe what you did
115-
to validate your changes actually worked; if you did
116-
nothing, then document you did not test it. Aim to make
117-
these steps reproducible by other engineers, specifically
118-
with your primary reviewer in mind.
108+
- Full understanding of every line of code you submit
109+
- Ability to explain and defend your implementation choices
110+
- Willingness to iterate and maintain your contributions
119111

120-
- **Screenshots**
112+
**Encouraged:**
121113

122-
- Any images that provide more context to the PR. Usually,
123-
these just coincide with the test plan.
114+
- Using AI assistants as learning tools to understand concepts
115+
- IDE autocomplete features that suggest standard patterns
116+
- AI help for brainstorming approaches (but write the code yourself)
117+
- Writing code using AI tools, reviewing each line and revising code as necessary.
124118

125-
- **Callouts or follow-up items**
119+
**Not allowed:**
126120

127-
- This is a good place for identifying "to-dos" that you've
128-
placed in the code (Must have an accompanying JIRA Ticket).
129-
- Potential bugs that you are unsure how to test in the code.
130-
- Opinions you want to receive about your code.
121+
- Submitting PRs generated solely by AI tools
122+
- Copy-pasting AI-generated code without full understanding
123+
124+
##### Disclosure
125+
126+
If you used AI assistance in any way during your contribution, please disclose what the AI assistant was used for in your PR description. We would love to know what tools developers have found useful in iterating in their day to day.
127+
128+
##### Questions?
129+
130+
If you're unsure whether your contribution complies with this policy, please ask for guidance within the scope of the PR and clarify any uncertainty. We're happy to guide contributors toward successful contributions.
131+
132+
---
133+
134+
*This policy helps us maintain the reliability, security, and trustworthiness that production applications depend on. Thank you for understanding and for contributing thoughtfully to PyMongo.*
131135

132136
## Running Linters
133137

0 commit comments

Comments
 (0)