From 1a1cb0e006e18673cc7889e9f45076d77ba05b8f Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Mon, 18 Aug 2025 22:22:06 -0400 Subject: [PATCH 1/6] add copilot instructions --- .github/copilot-instructions.md | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000000..baf3eae7cd7b --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,44 @@ +# Copilot Instructions for Pull Request Review + +## Purpose +These instructions guide Copilot and contributors in reviewing pull requests for the AWS .NET SDK library. The goal is to maintain high code quality, ensure backward compatibility, and follow best practices for library development. + +## Review Checklist + +### 1. API Compatibility +- Ensure **no breaking changes** are introduced in public APIs. +- All public methods, classes, and interfaces must remain backward compatible unless a major version bump is justified. + +### 2. Behavioral Changes +- Check for **changes in behavior** (e.g., logic, side effects, error handling). +- If behavior changes, ensure it is documented and justified in the PR description. + +### 3. Dev Config and Versioning +- Every PR must include a **dev config file** with the correct patch, minor, or major notation. +- The dev config should accurately reflect the scope of the change: + - **Patch**: Bug fixes, no API or behavior change. + - **Minor**: New features, backward compatible. + - **Major**: Breaking changes (should be rare). + +### 4. Platform Compatibility +- Ensure changes do not break support for the following .NET versions: + - .NET Standard 2.0 + - .NET Core 3.1 + - .NET 8.0 + - .NET Framework 4.7.2 + +### 6. General Best Practices +- Follow .NET and AWS SDK coding standards. +- Avoid introducing unused code, dependencies, or files. +- Ensure all code is properly formatted and linted. + +### 7. Generator Changes +- When replacing handwritten code with generated code, ensure the generated code is functionally equivalent to the original. +- Document any differences, edge cases, or limitations in the PR description. +- If possible, provide a comparison or summary of key behaviors between the old and new implementations. + +## Automated Checks +- Copilot should flag PRs that: + - Introduce breaking changes without a major version bump. + - Lack a dev config file or changelog update. + - Change public APIs without documentation or tests. From 91a13b84c0fb8ec0c6c56d5a0425a5354ceea139 Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Mon, 18 Aug 2025 22:25:29 -0400 Subject: [PATCH 2/6] fix numbering --- .github/copilot-instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index baf3eae7cd7b..6e449b6c4c37 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -27,12 +27,12 @@ These instructions guide Copilot and contributors in reviewing pull requests for - .NET 8.0 - .NET Framework 4.7.2 -### 6. General Best Practices +### 5. General Best Practices - Follow .NET and AWS SDK coding standards. - Avoid introducing unused code, dependencies, or files. - Ensure all code is properly formatted and linted. -### 7. Generator Changes +### 6. Generator Changes - When replacing handwritten code with generated code, ensure the generated code is functionally equivalent to the original. - Document any differences, edge cases, or limitations in the PR description. - If possible, provide a comparison or summary of key behaviors between the old and new implementations. From 9ea14187b39574aec6424fe7033eabc961dd4a6d Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Mon, 18 Aug 2025 22:33:40 -0400 Subject: [PATCH 3/6] update instructions --- .github/copilot-instructions.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6e449b6c4c37..c131b22d1dfd 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -37,8 +37,21 @@ These instructions guide Copilot and contributors in reviewing pull requests for - Document any differences, edge cases, or limitations in the PR description. - If possible, provide a comparison or summary of key behaviors between the old and new implementations. + ### 7. General Review Practices + - Review code for bugs, flaws in logic, and potential edge cases. + - Check for correct error handling and input validation. + - Ensure code is maintainable, readable, and follows best practices. + - Look for opportunities to simplify or optimize code where appropriate. + ## Automated Checks - Copilot should flag PRs that: - - Introduce breaking changes without a major version bump. - - Lack a dev config file or changelog update. - - Change public APIs without documentation or tests. + - Introduce breaking changes without a major version bump. + - Lack a dev config file or changelog update. + - Change public APIs without documentation or tests. + - Have failing unit or integration tests. + - Reduce test coverage for affected code. + - Introduce unhandled exceptions, missing error handling, or poor input validation. + - Increase code complexity or reduce maintainability. + - Do not document or justify changes in logic, edge cases, or optimizations. + - For generator changes, do not provide evidence of equivalence (e.g., missing test results, behavioral comparison, or documentation). + From 0fb37c91887d89960d00d1ea8259a72db43be575 Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Tue, 19 Aug 2025 16:50:03 -0400 Subject: [PATCH 4/6] Update copilot-instructions.md --- .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 c131b22d1dfd..47172e429fd2 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -53,5 +53,5 @@ These instructions guide Copilot and contributors in reviewing pull requests for - Introduce unhandled exceptions, missing error handling, or poor input validation. - Increase code complexity or reduce maintainability. - Do not document or justify changes in logic, edge cases, or optimizations. - - For generator changes, do not provide evidence of equivalence (e.g., missing test results, behavioral comparison, or documentation). + - For changes related to migrating custom code to generated code, where evidence of equivalence (e.g., missing test results, behavioral comparison, or documentation) is not provided. From 6ace8a1c91b913e3fa1e2eded1119b3f999f3fbb Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Fri, 22 Aug 2025 11:40:59 -0400 Subject: [PATCH 5/6] Update contributing guidelines reference in instructions --- .github/copilot-instructions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 47172e429fd2..6f0d0f9e7f89 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -19,6 +19,7 @@ These instructions guide Copilot and contributors in reviewing pull requests for - **Patch**: Bug fixes, no API or behavior change. - **Minor**: New features, backward compatible. - **Major**: Breaking changes (should be rare). + - Please reference https://github.com/aws/aws-sdk-net/blob/main/CONTRIBUTING.md for details on dev configs. ### 4. Platform Compatibility - Ensure changes do not break support for the following .NET versions: From 5619ea021f0a208b11eee7e0d21ec6c27bcb1d0b Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Fri, 22 Aug 2025 11:42:02 -0400 Subject: [PATCH 6/6] Include security vulnerability checks in review process --- .github/copilot-instructions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6f0d0f9e7f89..d11357393a0b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -43,11 +43,12 @@ These instructions guide Copilot and contributors in reviewing pull requests for - Check for correct error handling and input validation. - Ensure code is maintainable, readable, and follows best practices. - Look for opportunities to simplify or optimize code where appropriate. + - Look for security vulnerabilities. ## Automated Checks - Copilot should flag PRs that: - Introduce breaking changes without a major version bump. - - Lack a dev config file or changelog update. + - Lack a dev config file when its required (see https://github.com/aws/aws-sdk-net/blob/main/CONTRIBUTING.md) - Change public APIs without documentation or tests. - Have failing unit or integration tests. - Reduce test coverage for affected code.