Repository navigation
Fix components-key validation timeouts under load - #3108
Merged
Vincent Biret (baywet) merged 5 commits intoOct 9, 2026
Merged
Conversation
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix components-key validation timeout issue during LoadAsync
Fix components-key validation timeouts under load
Oct 9, 2026
Vincent Biret (baywet)
requested changes
Oct 9, 2026
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall line coverage in commit 0a241bd in the Show a line coverage summary of the most impacted files.
Updated |
Vincent Biret (baywet)
marked this pull request as ready for review
October 9, 2026 13:26
Vincent Biret (baywet)
enabled auto-merge (squash)
October 9, 2026 13:26
Vincent Biret (baywet)
approved these changes
Oct 9, 2026
There was a problem hiding this comment.
🟡 Changes recommended
The supported netstandard2.0 path retains the finite timeout and is not exercised by the new tests.
2 open findings
What changed in this PR
Fixes nondeterministic component-key validation timeouts during OpenAPI loading.
Changes:
- Adds source-generated regex matching for .NET 8+.
- Adds component-key boundary and long-key regression tests.
- Documents repository regex-handling conventions.
| File | Description |
|---|---|
OpenApiComponentsRules.cs |
Introduces target-specific regex matching. |
OpenApiComponentsValidationTests.cs |
Adds validation and load regression tests. |
agents.md |
Documents regex conventions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Peter Ombwa (peombwa)
approved these changes
Oct 9, 2026
Vincent Biret (baywet)
deleted the
copilot/fix-components-key-validation-timeout
branch
October 9, 2026 17:29
Vincent Biret (baywet)
added a commit
that referenced
this pull request
Oct 9, 2026
* Initial plan * fix(library): avoid components key validation timeouts under load * fix(library): use conditional regex fallback for older frameworks --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Deniz İrgin (Blind-Striker)
added a commit
to opencode-dotnet/opencode-sdk-dotnet
that referenced
this pull request
Oct 9, 2026
The roadmap also records the Microsoft.OpenApi bump that microsoft/OpenAPI.NET#3108 unblocks.
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.




Pull Request
Description
Components-key validation can throw
RegexMatchTimeoutExceptionduringLoadAsyncwhen scheduling or GC pauses exceed its 100 ms timeout. This change removes timeout-dependent matching while preserving accepted keys and error messages.Type of Change
Related Issue(s)
Changes Made
$anchor’s acceptance of one final newline.LoadAsyncwith million-character valid and invalid keys.Testing
Checklist
Versions applicability
See the contributing guidelines for more information about how patches are applied across multiple versions.
Additional Notes
RegexOptions.NonBacktrackingis deliberately omitted: it prevents source generation and falls back to a runtime regex.