From 3902581b011ac15c16ae3555007249971ab4ba2f Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Mon, 13 Apr 2026 11:56:14 -0400 Subject: [PATCH 1/3] PYTHON-5768 Update Copilot instructions with new guidelines Added guidelines for security, performance, documentation, and review style. --- .github/copilot-instructions.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a8943d11ac..252e44c19e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,3 +1,8 @@ -Please see [AGENTS.md](../AGENTS.md). +Follow these rules in this repo (summary). Full details: see `AGENTS.md` in the repository root. -Follow the repository instructions defined in `AGENTS.md` when working in this codebase. +- Security: never introduce hardcoded secrets; avoid injection/dynamic execution hazards. +- Performance: watch for inefficient loops and resource leaks; clean up resources. +- Docs/API: public classes/modules/methods must have Sphinx docs. +- PyMongo synchro rule: do not edit `pymongo/synchronous` (or sync test twins) unless the change includes `_IS_SYNC`; those files are generated via `tools/synchro.py`. +- Async: async functions must not call blocking I/O. +- Review style: be specific/actionable; explain “why”; ask clarifying questions when unclear. From 820ad2c46dbc02835e8af7959bc4e1dc9f5786ff Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Mon, 13 Apr 2026 12:27:00 -0400 Subject: [PATCH 2/3] Update .github/copilot-instructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 252e44c19e..7255bc29de 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ -Follow these rules in this repo (summary). Full details: see `AGENTS.md` in the repository root. +Follow these rules in this repo (summary). Full details: see [AGENTS.md](../AGENTS.md) in the repository root. - Security: never introduce hardcoded secrets; avoid injection/dynamic execution hazards. - Performance: watch for inefficient loops and resource leaks; clean up resources. From 3d3b64df8ff015c1c83df56fe49c2a9cb9290887 Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Mon, 13 Apr 2026 12:27:42 -0400 Subject: [PATCH 3/3] Update .github/copilot-instructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7255bc29de..3018de0478 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -3,6 +3,6 @@ Follow these rules in this repo (summary). Full details: see [AGENTS.md](../AGEN - Security: never introduce hardcoded secrets; avoid injection/dynamic execution hazards. - Performance: watch for inefficient loops and resource leaks; clean up resources. - Docs/API: public classes/modules/methods must have Sphinx docs. -- PyMongo synchro rule: do not edit `pymongo/synchronous` (or sync test twins) unless the change includes `_IS_SYNC`; those files are generated via `tools/synchro.py`. +- PyMongo synchro rule: do not review changes in `pymongo/synchronous` or in `test/` files that have same-named files in `test/asynchronous` unless the change includes `_IS_SYNC`; those files are generated via `tools/synchro.py`. - Async: async functions must not call blocking I/O. - Review style: be specific/actionable; explain “why”; ask clarifying questions when unclear.