Skip to content

Commit 19bd060

Browse files
authored
Merge branch 'main' into subrata-ms/AQEIntegration
2 parents d3fd82d + 527c37f commit 19bd060

10 files changed

Lines changed: 680 additions & 5 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE.MD‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ REFACTOR: (short-description)
4141
> For performance improvements
4242
PERF: (short-description)
4343
44+
> For AI tooling, agents, skills, prompts, or AI-assisted development workflows
45+
AI: (short-description)
46+
4447
> For release related changes, without any feature changes
4548
RELEASE: #<RELEASE_VERSION> (short-description)
4649
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Perf Police
3+
description: "Evidence-led performance review for mssql-python. Use for native binding, parameter detection, fetch, streaming, allocation, caching, or profiler-related pull requests. Identify correctness risks, costly patterns, and unnecessary machinery without changing production code."
4+
tools: [read, search, execute]
5+
argument-hint: "PR number, branch, or local diff to review"
6+
---
7+
8+
You are **Perf Police**, the performance reviewer for `microsoft/mssql-python`.
9+
Your job is to challenge a change's correctness, performance evidence, and
10+
maintainability, not to implement or merge it.
11+
12+
Before reviewing, read and apply the
13+
[performance code-review skill](../skills/performance-code-review/SKILL.md).
14+
That file is the single source of the review procedure, patterns, evidence
15+
requirements, and reporting rules. Do not maintain a second checklist here.
16+
17+
Use the supplied review checkout and the tools available in the current host.
18+
Keep production files and Git refs unchanged. Isolated scratch repros, builds,
19+
and test outputs are allowed when execution is permitted. Review requests do
20+
not authorize pushes, additional PR comments, thread resolution, or merges.
21+
22+
Return concise findings with current file/line anchors and evidence. Separate
23+
confirmed defects, unverified concerns, performance observations, and structural
24+
suggestions. Missing runtime access is a stated limitation, not permission to
25+
invent measurements or declare the change safe.

‎.github/agents/release-manager.agent.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Classify each PR — **show user both lists**:
8787
| Prefix | Include? |
8888
|--------|----------|
8989
| `FIX:`, `PERF:`, `FEAT:`, `DOC:` | ✅ Yes — customer-facing |
90-
| `CHORE:`, `REFACTOR:`, `STYLE:`, `RELEASE:` | ❌ No — unless title clearly describes a user-visible change |
90+
| `CHORE:`, `REFACTOR:`, `STYLE:`, `RELEASE:`, `AI:` | ❌ No — unless title clearly describes a user-visible change |
9191

9292
#### 2c — Rust changes (see Rust Dependency section above)
9393

‎.github/copilot-instructions.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ black --check --line-length=100 mssql_python/ tests/ # BLOCKING in CI
4242
python -m pytest -v # 'stress' marker excluded by default
4343
```
4444

45-
- **`pr-format-check` (BLOCKING):** PR title must start with one of `FEAT: FIX: DOC: CHORE: STYLE: REFACTOR: RELEASE:`; the body must link a work item/issue and have a `### Summary` of at least 10 characters.
45+
- **`pr-format-check` (BLOCKING):** PR title must start with one of `FEAT: FIX: DOC: CHORE: STYLE: REFACTOR: PERF: RELEASE: AI:`; the body must link a work item/issue and have a `### Summary` of at least 10 characters.
46+
- Use `AI:` for AI tooling, agents, skills, prompts, and AI-assisted development workflows, not merely because AI helped write an ordinary fix or feature.
4647
- `flake8`, `pylint`, `mypy`, `clang-format`, and `cpplint` run but are **informational**, not blocking.
4748
- The authoritative cross-platform validation runs on **Azure DevOps** (broader OS / Python / arch coverage than the GitHub checks); consult the specific pipeline in `eng/pipelines/` for the exact matrix rather than assuming full coverage. A coverage bot posts a report comment on the PR.
4849

‎.github/prompts/create-pr.prompt.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ The PR title **MUST** start with one of these prefixes (enforced by CI):
218218
| `CHORE:` | Maintenance tasks |
219219
| `STYLE:` | Code style/formatting |
220220
| `REFACTOR:` | Code refactoring |
221+
| `PERF:` | Performance improvements |
222+
| `AI:` | AI tooling, agents, skills, prompts, or AI-assisted development workflows |
221223
| `RELEASE:` | Release-related changes |
222224

223225
> ⚠️ **CONFIRM #1 - PR Title:** Suggest 3-5 title options to the developer and ask them to pick or modify one.
@@ -414,7 +416,7 @@ Before submitting, verify:
414416

415417
**Cause:** PR title doesn't match required format
416418

417-
**Valid prefixes:** `FEAT:`, `FIX:`, `DOC:`, `CHORE:`, `STYLE:`, `REFACTOR:`, `RELEASE:`
419+
**Valid prefixes:** `FEAT:`, `FIX:`, `DOC:`, `CHORE:`, `STYLE:`, `REFACTOR:`, `PERF:`, `AI:`, `RELEASE:`
418420

419421
**Fix:** Edit PR title in GitHub to start with a valid prefix
420422

@@ -541,6 +543,8 @@ git push --force-with-lease
541543
| `CHORE:` | Maintenance |
542544
| `STYLE:` | Formatting |
543545
| `REFACTOR:` | Refactoring |
546+
| `PERF:` | Performance improvements |
547+
| `AI:` | AI tooling, agents, skills, prompts, or AI-assisted development workflows |
544548
| `RELEASE:` | Releases |
545549

546550
### Common Git Commands for PRs
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: code-review
3+
description: "General repository code review for microsoft/mssql-python, based solely on .github/copilot-instructions.md. Use when reviewing pull requests or diffs across the Python API, native bindings, packaging, tests, CI, or documentation. Apply the repository's existing architecture, correctness, compatibility, testing, and credential-handling expectations without replacing normal Copilot review."
4+
---
5+
6+
# Repository code review
7+
8+
The sole source of repository-specific rules for this skill is
9+
[copilot-instructions.md](../../copilot-instructions.md).
10+
Read that file before reviewing. The checklist below organizes its guidance
11+
for review; it does not introduce policies beyond the repository instructions or a performance-only review methodology.
12+
review methodology. If this summary drifts, use the source instructions.
13+
14+
## Apply the instructions to the changed area
15+
16+
1. **Architecture:** Identify the affected layer before judging the change:
17+
Python API, extension loader, C++/ODBC bindings, or Rust-backed bulk copy.
18+
Bulk copy uses `mssql_py_core` and TDS rather than the ODBC path.
19+
2. **Python API:** Preserve DB API 2.0 semantics, specific exception handling,
20+
and connection/cursor context-manager behavior. For public API changes,
21+
check that `__all__` and the `mssql_python.pyi` stubs stay consistent.
22+
3. **Native safety:** Inspect Python-reference shutdown ordering, initialization
23+
failures, and error translation. A failed initialization must not expose a
24+
half-built object. For hot paths, follow the source's raw-CPython guidance
25+
with correct refcounts and error checks.
26+
4. **Platforms and packaging:** Check all affected shipped architectures, not
27+
just the build host. In particular, universal2 dylib/rpath changes must cover
28+
arm64 and x86_64. Review wheel/platform tagging where it changes, and do not
29+
hand-edit bundled ODBC binaries.
30+
5. **Tests:** Check that fixes have regression coverage. Assert promised
31+
operation counts as well as returned values when the change claims fewer
32+
calls. Global type-mapping changes need the typed-NULL cases identified in
33+
the source instructions. Keep crash-prone and global-state cases in isolated
34+
subprocesses.
35+
6. **Credentials and examples:** Reject committed real credentials. Connection
36+
examples with `UID`/`PWD` use localhost and dummy values. Do not add `Driver=`;
37+
the bundled driver is selected automatically. Treat
38+
`TrustServerCertificate=yes` as local-development only.
39+
7. **Scope and contribution requirements:** Keep changes surgical and avoid
40+
unrelated edits, build artifacts, or virtual environments. Apply the source
41+
instructions' title-prefix, issue-reference, and summary requirements.
42+
8. **Evidence and context:** Understand the linked issue and existing review
43+
threads. Reproduce before asserting a driver bug or fix. Follow the source's
44+
no-duplicate-PR and no-unsolicited-comment rules; a review is not an instruction
45+
to create or publish changes.
46+
47+
## Validation guidance
48+
49+
Use the setup, native-build, test, and PR guides identified in
50+
[Development workflow](../../copilot-instructions.md#development-workflow).
51+
Build the native extension before running Python tests. Most tests need a live
52+
SQL Server through `DB_CONNECTION_STRING`; the dependency checks do not.
53+
54+
Consult the actual pipeline matrix for supported combinations rather than
55+
inferring cross-platform coverage from a local run. Preserve the distinction
56+
between blocking checks and informational tools documented in
57+
[Validation gate](../../copilot-instructions.md#validation-gate-run-before-you-finish--this-mirrors-ci).
58+
A formatting recommendation from an informational tool is not automatically
59+
a failing merge requirement.
60+
61+
Apply only the relevant repository checks alongside normal Copilot review.
62+
Do not force every change into a native-code or performance investigation.

0 commit comments

Comments
 (0)