Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for the PR title. A MongoDB employee will create a JIRA ticket and edit the name

Note on AI Contributions:
We do not accept pull requests that are primarily or substantially generated by AI tools (ChatGPT, Copilot, etc.).
All contributions must be written and understood by human contributors.
All contributions must be written and understood by human contributors. Please read about our policy in our contributing guide.
-->
[JIRA TICKET]

Expand Down
63 changes: 34 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,49 +85,54 @@ likelihood for getting review sooner shoots up.
- `versionadded:: 3.11`
- `versionchanged:: 3.5`

**Pull Request Template Breakdown**
### AI-Generated Contributions Policy

- **Github PR Title**
#### Our Stance

- The PR Title format should always be
`[JIRA-ID] : Jira Title or Blurb Summary`.
**We do not accept pull requests that are primarily or substantially generated by AI tools** (ChatGPT, Copilot, etc.). All contributions must be written and understood by human contributors.

- **JIRA LINK**
##### Why This Policy Exists

- Convenient link to the associated JIRA ticket.
Many MongoDB libraries are foundational tools used in production systems worldwide. The nature of these libraries requires:

- **Summary**
- **Absolute correctness**: We have no margin for "generally right" code. Subtle bugs can cause data corruption, security vulnerabilities, or silent failures that only appear under specific conditions.

- Small blurb on why this is needed. The JIRA task should have
the more in-depth description, but this should still, at a
high level, give anyone looking an understanding of why the
PR has been checked in.
- **Deep domain expertise**: MongoDB's wire protocol, BSON specification, connection pooling, authentication mechanisms, and concurrency patterns require an understanding that AI cannot reliably provide.

- **Changes in this PR**
- **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.

- The explicit code changes that this PR is introducing. This
should be more specific than just the task name. (Unless the
task name is very clear).
- **Security responsibility**: Authentication, credential handling, and TLS implementation cannot be left to probabilistic code generation.

- **Test Plan**
##### What This Means for Contributors

- Everything needs a test description. Describe what you did
to validate your changes actually worked; if you did
nothing, then document you did not test it. Aim to make
these steps reproducible by other engineers, specifically
with your primary reviewer in mind.
**Required:**

- **Screenshots**
- Full understanding of every line of code you submit
- Ability to explain and defend your implementation choices
- Willingness to iterate and maintain your contributions

- Any images that provide more context to the PR. Usually,
these just coincide with the test plan.
**Encouraged:**

- **Callouts or follow-up items**
- Using AI assistants as learning tools to understand concepts
- IDE autocomplete features that suggest standard patterns
- AI help for brainstorming approaches (but write the code yourself)

- This is a good place for identifying "to-dos" that you've
placed in the code (Must have an accompanying JIRA Ticket).
- Potential bugs that you are unsure how to test in the code.
- Opinions you want to receive about your code.
**Not allowed:**

- Submitting PRs generated solely by AI tools
- Copy-pasting AI-generated code without full understanding

##### Disclosure

If you used AI assistance in any way during your contribution, please disclose what the AI assistant was used for in your PR description. When in doubt, mention it.

##### Questions?

If you're unsure whether your contribution complies with this policy, please ask in an issue before submitting a PR. We're happy to guide contributors toward successful contributions.
Copy link
Contributor

Choose a reason for hiding this comment

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

err i don't think users can open issues against pymongo...?


---

*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.*

## Running Linters

Expand Down