Document pool rate limiting in Copilot instructions#4397
Draft
mdaigle wants to merge 1 commit into
Draft
Conversation
Document the connection-pool rate-limiting feature and related testing guidance (TimeProvider/FakeTimeProvider usage, blocking-period and rate-limiter test patterns) in the repository Copilot instruction files.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s contributor/agent guidance documents under .github/, adding stricter conventions for writing tests and adding a required workflow for discovering applicable instruction files via applyTo patterns.
Changes:
- Expanded the testing guide’s expectations for what test comments should explain and added “Implementation Guidance” emphasizing AAA.
- Reworked the “Test Structure” section into an explicit Arrange–Act–Assert (AAA) pattern description with a canonical example.
- Added a required “Instruction File Lookup” workflow to
.github/copilot-instructions.mddirecting agents to consult.github/instructions/before making changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/instructions/testing.instructions.md |
Adds/strengthens guidance for test documentation and AAA structure, including a canonical pattern example. |
.github/copilot-instructions.md |
Adds a required workflow telling agents to locate and apply matching instruction files via applyTo patterns before editing/creating files. |
Comment on lines
+227
to
242
| [Fact] | ||
| public void MethodName_Scenario_ExpectedResult() | ||
| { | ||
| [Fact] | ||
| public void MethodName_Scenario_ExpectedResult() | ||
| { | ||
| // Arrange | ||
| var sut = new SystemUnderTest(); | ||
|
|
||
| // Act | ||
| var result = sut.PerformAction(); | ||
|
|
||
| // Assert | ||
| Assert.Equal(expected, result); | ||
| } | ||
| // Arrange | ||
| // Set up test fixtures, initial state, dependencies, and test data | ||
| var sut = new SystemUnderTest(); | ||
| var input = new TestData(); | ||
|
|
||
| // Act | ||
| // Execute the code under test | ||
| var result = sut.PerformAction(input); | ||
|
|
||
| // Assert | ||
| // Validate outcomes and expectations | ||
| Assert.Equal(expected, result); | ||
| } |
Comment on lines
214
to
217
| public void AppRunWithMalformedConnectionStringReturnsOneAndWritesParseError() | ||
| { | ||
| // Arrange / Act / Assert | ||
| } |
Comment on lines
+155
to
+160
| ## Instruction File Lookup (Required Workflow) | ||
|
|
||
| Before creating or modifying any file, check if matching instruction files exist: | ||
|
|
||
| 1. Scan `.github/instructions/` for files with `applyTo` patterns that match your file path | ||
| 2. Read **all** matching instruction files completely before writing code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is Part 3 of 3 splitting #4376 ("Dev/mdaigle/pool rate limit") into stacked, reviewable PRs. It stacks on #4396 (Part 2) — review/merge that first.
This PR updates the repository's Copilot/agent instruction files to document the connection-pool rate-limiting feature and the associated testing guidance (e.g.
TimeProvider/FakeTimeProviderusage and blocking-period / rate-limiter test patterns).Changes
.github/copilot-instructions.md.github/instructions/testing.instructions.mdStacking
mainChecklist