Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
68e9da5
Produce deprecated property in JsonSchema for obsolete types (#130665)
Youssef1313 Jul 17, 2026
a71db21
Revert free-threaded assert in FreeThreadedStrategy (#130981)
AaronRobinsonMSFT Jul 17, 2026
9bef9d9
Add DacDbiInterfaceInstance to cdac (#130856)
hoyosjs Jul 17, 2026
ca92950
Add wasm HardwareIntrinsics PR pipeline (#130975)
tannergooding Jul 17, 2026
f938960
Update outerloop convert tests for saturating float/double casts (#13…
tannergooding Jul 17, 2026
d01cd5b
SuperPMI: fix spurious arm asmdiffs from out-of-range BL relocs (#130…
AndyAyersMS Jul 17, 2026
1161641
Add missing helix-platforms variables to superpmi-collect (#130874)
jakobbotsch Jul 17, 2026
61f49e4
[wasm] Publish __stack_pointer before SuppressGCTransition native cal…
lewing Jul 18, 2026
2aadac7
Load the duplicate attribute PFX under a lock
vcsjones Jul 18, 2026
d63fc6a
Align CoseKey async verification with synchronous validation
Copilot Jul 18, 2026
b676463
Bump actions/setup-dotnet from 5 to 6 (#130925)
dependabot[bot] Jul 18, 2026
ea78a90
[cDAC] Add EnC metadata and caching (#129935)
rcj1 Jul 18, 2026
7fede03
Implement wasm codegen for sub-16 SIMD load/store (#131000)
tannergooding Jul 18, 2026
a5e5db7
[wasm] Implement WasmBase LeadingZeroCount/TrailingZeroCount JIT intr…
lewing Jul 18, 2026
0f6e08b
Remove unused functions from the xarch emitter (#130803)
tannergooding Jul 18, 2026
65a72da
Wire up orphaned Runtime_129288 regression test (#130836)
tannergooding Jul 18, 2026
4037892
Fix TensorPrimitives.IndexOfMaxMagnitude signed integer tie (#128484)
lilinus Jul 18, 2026
34b8797
[wasm] Fix AOT + BlazorWebAssemblyLazyLoad startup crash (#131020)
lewing Jul 19, 2026
6675dac
Cleanup multicast delegate handling (#130905)
MichalPetryka Jul 19, 2026
447ed1c
Add scheduled holistic reviews for all PRs and path-specific review i…
jeffhandley Jul 19, 2026
84838e8
Avoid SocketException flood in NamedPipeClientStream on Unix (#125872)
haltandcatchwater Jul 19, 2026
5996889
Migrate eng/pipelines from PublishBuildArtifacts to PublishPipelineAr…
mmitche Jul 19, 2026
2a00ddd
Link statically to GrowableFunctionTable (#131017)
huoyaoyuan Jul 19, 2026
4b46325
Clean up redundant defines and warning suppressions in coreclr/vm/com…
AaronRobinsonMSFT Jul 19, 2026
a9d4d8e
Preserve checked overflow for unsigned range additions (#130435)
Copilot Jul 19, 2026
fb2a1ee
[wasm] Html Encode incoming parameters to debug page (#130960)
maraf Jul 19, 2026
a566999
Reduce unsafe code in System.Decimal (#126187)
pentp Jul 19, 2026
1bdb5c1
[mono][wasm] Respect [Un]SupportedOSPlatform in the Mono pinvoke gene…
lewing Jul 19, 2026
c4f12f3
[wasm] Fix native build failing when temp path contains parentheses (…
lewing Jul 19, 2026
4cd37b2
[mono][wasm] Fix pinvoke with 64-bit enum argument (#131021)
lewing Jul 19, 2026
465593f
[perf][wasm] Stage CoreCLR wasm runtime pack for Mono workload instal…
lewing Jul 19, 2026
31ac44b
Keep runtimelab IntermediateArtifacts on classic build artifacts (#13…
akoeplinger Jul 19, 2026
c23643e
ci: declare contents:read on jit-format workflow (#128205)
arpitjain099 Jul 19, 2026
e87b2c9
[wasm] Bump chrome for testing - linux: 150.0.7871.128, windows: 150.…
github-actions[bot] Jul 19, 2026
2ac1c4c
Add openbsd-x64 CI leg (#130761)
am11 Jul 19, 2026
3c22694
Fix linux-musl-rsicv64 build (#130966)
am11 Jul 19, 2026
52f293c
Speed up Decimal32/64/128 arithmetic, conversions, and equality (#130…
tannergooding Jul 19, 2026
71d5bc0
Fix publishing of ILLink test results (#131042)
akoeplinger Jul 20, 2026
a3e8de5
Update code review skill guidelines for suggestions formatting (#131035)
MichalPetryka Jul 20, 2026
ceb4945
Implement the transcendental functions for the IEEE 754 decimal types…
tannergooding Jul 20, 2026
1fefdf8
[iOS] Optimize CompareStringNative performance (#130691)
matouskozak Jul 20, 2026
244340e
Escape C# keyword identifiers in OptionsValidator generated code (#13…
UditDewan Jul 20, 2026
b12dc15
Add a limit on number of pending HTTP/2 PING ACKs (#130997)
mrek-msft Jul 20, 2026
233b660
Async Profiler: Optimize async dispatcher allocation. (#130877)
lateralusX Jul 20, 2026
408b525
Add CPU feature detection using elf_aux_info (#130901)
am11 Jul 20, 2026
64dfa80
Fix broken "See also" link in CoreCLR iOS build docs (#128211)
matouskozak Jul 20, 2026
1aa5d93
[main] Update dependencies from dotnet/xharness (#131061)
dotnet-maestro[bot] Jul 20, 2026
de5b041
Revert WinZipAesStreamFuzzer, ZipCryptoStreamFuzzer (#131075)
MihaZupan Jul 20, 2026
9b13a2b
Emit SupportedOSPlatform("browser") on generated JSImport partials (#…
lewing Jul 20, 2026
d066ad0
Enable previously suppressed tests on CoreCLR browser (#130970)
radekdoulik Jul 20, 2026
c0daed1
Remove larger test length for Iri_ExpandingContents_TestData (#131070)
MihaZupan Jul 20, 2026
7c2e1f5
Implement RFC 9659 compliance for "zstd" HttpContent compression (#13…
rzikm Jul 20, 2026
d571672
[cDAC] Mark unused APIs E_NOTIMPL and remove fallback (#130942)
max-charlamb Jul 20, 2026
4fb9c9f
[Apple] Preserve Norwegian locale names in hybrid globalization (#130…
matouskozak Jul 20, 2026
f62afbd
Implement IXCLRDataExceptionState state comparison (#131011)
rcj1 Jul 20, 2026
624a84f
Disable large alloc tests on 32b targets (#130382)
dhartglassMSFT Jul 20, 2026
b10b941
Embed debug info in host object libraries to avoid LNK4099 (#130933)
elinor-fung Jul 20, 2026
6149fb1
Fix browser-wasm CoreCLR artifact collisions (#131086)
radekdoulik Jul 20, 2026
8f8954f
[mono][wasm] Fix UnmanagedCallersOnly exports with more than 8 argume…
lewing Jul 20, 2026
59c8399
Add System.Security.Cryptography Copilot instructions (#131006)
PranavSenthilnathan Jul 20, 2026
d28c6e2
Remove dead/unreachable code in several JIT phases (#130801)
tannergooding Jul 20, 2026
3cff276
Add method extent enumeration support to legacy cDAC (#130996)
Copilot Jul 20, 2026
e9143e7
Add XML doc comments for the IEEE 754 decimal types and value propert…
tannergooding Jul 20, 2026
82a3537
[RyuJIT Wasm] SIMD Element-Wise Loads and Stores (#130822)
adamperlin Jul 20, 2026
8e7cee3
Pause scheduled runs for runtime-coreclr gc-standalone pipeline (#130…
Copilot Jul 20, 2026
dc0f8a6
Fix three xarch lowering correctness/invariant issues (#130843)
tannergooding Jul 20, 2026
f06a76d
Use eng\common\dotnet.cmd instead of .\dotnet.cmd in crossgen2 compar…
jtschuster Jul 20, 2026
cc61817
JIT: formatting fixes in rangecheck.h (#131104)
AaronRobinsonMSFT Jul 21, 2026
7354416
Use user-arg accessors when expanding runtime lookups (#130949)
tannergooding Jul 21, 2026
e9db8d6
Fix side-effect reordering when folding constant-zero-mask BlendVaria…
tannergooding Jul 21, 2026
d1ae2f3
Reject folding local addresses the emitter cannot encode (#130990)
tannergooding Jul 21, 2026
9c7f383
JIT: fix profile propagation in LowerSwitch (#130907)
AndyAyersMS Jul 21, 2026
569c7bf
Align Decimal32/64/128 surface with the approved API (#131098)
tannergooding Jul 21, 2026
3c30333
Use stable names for perf sample-app binlog artifacts (#131103)
DrewScoggins Jul 21, 2026
7d4c45e
Reduce reader/writer contention in Pipelines (#130884)
VSadov Jul 21, 2026
7f50015
Fix flaky PhysicalFilesWatcher timeout when root is deleted and recre…
svick Jul 21, 2026
2ef38b1
Fix flaky PhysicalFileProvider TokensFiredForOldAndNewNamesOnRename t…
svick Jul 21, 2026
b0acf7a
[ci-fix] Needs review: fix CS0246 InvalidCSharp build break in ByRefL…
github-actions[bot] Jul 21, 2026
92a7364
Add configurable HTTP connection eviction, expose ConnectionId APIs (…
MihaZupan Jul 21, 2026
793c4ad
[mobile] Skip publishing tests ignored by CI (#131071)
kotlarmilos Jul 21, 2026
3ec189d
[HTTP] MultiProxy (#131080)
ManickaP Jul 21, 2026
2f59eec
Fix Dragon4 shortest formatting for exact powers of two (#131131)
tannergooding Jul 21, 2026
3522d3d
Prevent StackOverflow in PhysicalFilesWatcher on unwatchable file sys…
svick Jul 21, 2026
f218c36
Modernize System.Text.Json product code (#130976)
eiriktsarpalis Jul 21, 2026
198cea0
Simplify vectorization guidelines and add a vectorization skill (#131…
tannergooding Jul 21, 2026
c42e7c1
Avoid array allocations when evaluating connections for eviction (#13…
MihaZupan Jul 21, 2026
49a0cf5
Reduce EncryptedXml encoded DTD test workload (#131091)
eiriktsarpalis Jul 21, 2026
60cf367
Re-enable BitOps_Crc32C_* tests on tvOS (#130560)
Copilot Jul 21, 2026
d04399d
Route code-review skill to vectorization skill on SIMD diffs (#131151)
tannergooding Jul 21, 2026
e543bc3
Fold floating-point comparisons with a constant NaN in morph (#130838)
tannergooding Jul 21, 2026
50aa655
[cDAC] WebAssembly support: stack walking and managed metadata resolu…
lewing Jul 21, 2026
ca250af
Re-enable foreground shutdown test (#131134)
eduardo-vp Jul 21, 2026
b855827
Make Complex<T> conform to C23 Annex G special values (#131132)
tannergooding Jul 21, 2026
de14f9b
JIT: Cleanup and harden lowering (#130837)
tannergooding Jul 21, 2026
6bd17bc
Vectorize IA5 and Visible strings in ASN.1 encoding and decoding
vcsjones Jul 21, 2026
b9f48b9
Update performance benchmark skill workflow (#131047)
EgorBo Jul 21, 2026
a6cbe91
LibraryImportGenerator: prep for unsafe-v2 (#131041)
EgorBo Jul 21, 2026
f8bdee7
Mark additional commutative xarch and arm64 intrinsics and instructio…
tannergooding Jul 21, 2026
b191426
[wasi] Stand up CoreCLR-WASI library-test leg (per-app corerun relink…
lewing Jul 21, 2026
acd9648
[Trimming] Fix startup crash when TypeMapAssemblyTarget attribute sur…
Copilot Jul 21, 2026
2180c0f
Fix two latent HWIntrinsic miscompiles in gentree.cpp (#130832)
tannergooding Jul 21, 2026
8cede7e
Change IList<string> to IEnumerable<string> in Process Run/StartAndFo…
Copilot Jul 21, 2026
5c5a613
[cdac] Convert TypeHandle to the ITypeHandle interface (#129800)
max-charlamb Jul 21, 2026
b0d22bd
Re-add retired r2r.yml (#131100)
jtschuster Jul 21, 2026
ab369d6
Fix thread-statics bootstrap recursion on WASM (#131120)
Copilot Jul 21, 2026
050a853
Add support for inline pinvokes to Wasm Ryujit (#130384)
davidwrighton Jul 21, 2026
0eddebe
Extract wasm string-ctor thunk selection and prestub native-helper fa…
Copilot Jul 21, 2026
118dced
Remove unused args from specifier-less JITDUMP calls (#131166)
tannergooding Jul 21, 2026
00f6d23
Fix HWIntrinsic codegen for elided scalar/vector reinterprets (#131155)
tannergooding Jul 21, 2026
503f473
Enable additional library tests in ReadyToRun pipeline (#130821)
jtschuster Jul 21, 2026
5a97eb8
Remove unused parse_only_production parameter from fx_ver parse (#131…
Copilot Jul 21, 2026
474a843
Change InitClass and InitInstantiatedClass to return void* for WASM p…
Copilot Jul 21, 2026
8761e62
Track reflectability of delegates pointing to generic virtuals (#130829)
MichalStrehovsky Jul 21, 2026
3279c98
Materialize Vector128<T> as a wasm v128 in the codegen ABI (#130866)
tannergooding Jul 22, 2026
1113123
Add Stub IXCLRDataFunctionTableAccess to cDAC (#130762)
noahfalk Jul 22, 2026
f672853
Remove dead NativeAOT dynamic-delegate path from `System.Delegate` (#…
Copilot Jul 22, 2026
3b44a9f
Merge Runtime_131137 into the shared regression runner (#131173)
tannergooding Jul 22, 2026
e0bee5d
Disable new test on clr interpreter (#131139)
BrzVlad Jul 22, 2026
d1af069
Fix agentic threat-detection auth by recompiling pat_pool workflows w…
matouskozak Jul 22, 2026
1ab8035
Throw PNSE for Extended Protection on unsupported platforms (#131144)
rzikm Jul 22, 2026
39d9afc
[main] Update dependencies from dotnet/runtime-assets (#130062)
dotnet-maestro[bot] Jul 22, 2026
8c658d6
Update container image digests (#131067)
dotnet-renovate-bot Jul 22, 2026
6795c86
Bump actions/setup-python from 6 to 7 (#131105)
dependabot[bot] Jul 22, 2026
59cf80d
Fix building the sanitizer instrumentation and hooking it into the ho…
39otsu Jul 22, 2026
b16b66e
[browser] Move boot config tests to Wasm.Build.Tests
maraf Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "11.0.0-prerelease.26360.1",
"version": "11.0.0-prerelease.26368.1",
"commands": [
"xharness"
]
Expand Down
22 changes: 16 additions & 6 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"entries": {
"actions/cache/restore@v4": {
"repo": "actions/cache/restore",
"version": "v4",
"sha": "0057852bfaa89a56745cba8c7296529d2fc39830"
},
"actions/cache/save@v4": {
"repo": "actions/cache/save",
"version": "v4",
"sha": "0057852bfaa89a56745cba8c7296529d2fc39830"
},
"actions/checkout@v6.0.2": {
"repo": "actions/checkout",
"version": "v6.0.2",
Expand Down Expand Up @@ -35,15 +45,15 @@
"version": "v7.0.1",
"sha": "043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"
},
"github/gh-aw-actions/setup-cli@v0.81.6": {
"github/gh-aw-actions/setup-cli@v0.82.6": {
"repo": "github/gh-aw-actions/setup-cli",
"version": "v0.81.6",
"sha": "ba6380cc6e5be5d21677bebe04d52fb48e3abec7"
"version": "v0.82.6",
"sha": "cec6394202d7db187b02310d928812194988eb20"
},
"github/gh-aw-actions/setup@v0.81.6": {
"github/gh-aw-actions/setup@v0.82.6": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.81.6",
"sha": "ba6380cc6e5be5d21677bebe04d52fb48e3abec7"
"version": "v0.82.6",
"sha": "cec6394202d7db187b02310d928812194988eb20"
}
}
}
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Before making changes to a directory, search for `README.md` files in that direc

If the changes are intended to improve performance, or if they could negatively impact performance, use the `performance-benchmark` skill to validate the impact before completing.

When writing or reviewing SIMD / hardware-intrinsics code (anything using `Vector128`/`Vector256`/`Vector512`, `Vector<T>`, or the platform intrinsics in `System.Runtime.Intrinsics.*`), use the `vectorization` skill.

You MUST follow all code-formatting and naming conventions defined in [`.editorconfig`](/.editorconfig).

In addition to the rules enforced by `.editorconfig`, you SHOULD:
Expand Down
104 changes: 104 additions & 0 deletions .github/instructions/review-all-src.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
applyTo: "src/**"
---

# Code Review -- General Guidance (all source areas)

Cross-cutting review criteria for any change under `src/`. Also apply the language file for the
code under review (`review-csharp`, `review-native`), `review-all-tests` for test changes, and
any matching area file (`review-core-runtime`, `jit`, `system-net-*`, `extensions-*`,
`compression`, `cdac`). Where a more specific file conflicts with a general one, the more
specific file wins.

**Reviewer mindset:** Be polite but very skeptical. Your job is to help speed the review process for maintainers, which includes not only finding problems the PR author may have missed but also questioning the value of the PR in its entirety. Treat the PR description and linked issues as claims to verify, not facts to accept. Question the stated direction, probe edge cases, and don't hesitate to flag concerns even when unsure.

These are review criteria. During code authoring or local experimentation, treat PR-level gates
such as motivation, benchmark evidence, and issue prerequisites as preparation guidance for a
ready-for-review PR, not as reasons to block exploratory work unless the user asks for review.

## Holistic PR Assessment

Before reviewing individual lines of code, evaluate the PR as a whole. Consider whether the change is justified, whether it takes the right approach, and whether it will be a net positive for the codebase.

### Motivation & Justification

- **Every PR must articulate what problem it solves and why.** Don't accept vague or absent motivation. Ask "What's the rationale?" if none is provided. However, when the PR links to an approved API proposal, accepted issue, or prior discussion that already establishes motivation, referencing that is sufficient — don't demand the author re-state what's already documented.
- **Challenge every addition with "Do we need this?"** New code, APIs, abstractions, and flags must justify their existence. If an addition can be avoided without sacrificing correctness or meaningful capability, it should be.
- **Demand real-world use cases and customer scenarios.** Hypothetical benefits are insufficient motivation for expanding API surface area or adding features. Require evidence that real users need this.

### Evidence & Data

- **Require measurable performance data before accepting optimization PRs.** Demand BenchmarkDotNet results or equivalent proof — never accept performance claims at face value. Prefer local BenchmarkDotNet runs first, especially for experimental/iterative work. EgorBot runs on an individual's personal account and is not billed like Copilot usage — only recommend it when explicitly requested, or for a final cross-architecture (x64/arm64) confirmation that cannot be reproduced locally.
- **Distinguish real performance wins from micro-benchmark noise.** Trivial benchmarks with predictable inputs overstate gains from jump tables, branch elimination, and similar tricks. Require evidence from realistic inputs representative of actual workloads. Note that "realistic" does not always mean "varied" — many real-world collections are small (under 64 elements), and data distributions are often domain-specific and non-uniform.
- **Performance claims in low-level or hardware-guided code may not need benchmarks.** When code follows official hardware vendor optimization recommendations or well-established algorithmic improvements, the systemic reasoning may be sufficient evidence. Microbenchmarks for such changes can be misleading because they don't capture system-level effects.
- **Investigate and explain regressions before merging.** Even if a PR shows a net improvement, regressions in specific scenarios must be understood and explicitly addressed — not hand-waved.

### Approach & Alternatives

- **Check whether the PR solves the right problem at the right layer.** Look for whether it addresses root cause or applies a band-aid. Prefer fixing the actual source of an issue over adding workarounds to production code.
- **When a PR takes a fundamentally wrong approach, redirect early.** Don't iterate on implementation details of a flawed design. Push back on the overall direction before the contributor invests more time.
- **Ask "Why not just X?" — always prefer the simplest solution.** When a PR uses a complex approach, challenge it with the simplest alternative that could work. The burden of proof is on the complex solution.

### Cost-Benefit & Complexity

- **Explicitly weigh whether the change is a net positive.** A performance trade-off that shifts costs around is not automatically beneficial. Demand clarity that the change is a win in the typical configuration, not just in a narrow scenario.
- **Reject overengineering — complexity is a first-class cost.** Unnecessary abstraction, extra indirections, and elaborate solutions for marginal gains are actively rejected.
- **Every addition creates a maintenance obligation.** Long-term maintenance cost outweighs short-term convenience. Code that is hard to maintain, increases surface area, or creates technical debt needs stronger justification.

### Scope & Focus

- **Require large or mixed PRs to be split into focused changes.** Each PR should address one concern. Mixed concerns make review harder and increase regression risk.
- **Defer tangential improvements to follow-up PRs.** Police scope creep by asking contributors to separate concerns. Even good ideas should wait if they're not part of the PR's core purpose.

### Risk & Compatibility

- **Flag breaking changes and require formal process.** Any behavioral change that could affect downstream consumers needs documentation, API review, and explicit approval — even when the change improves the codebase internally.
- **Assess regression risk proportional to the change's blast radius.** High-risk changes to stable code need proportionally higher value and more thorough validation.

### Codebase Fit & History

- **Ensure new code matches existing patterns and conventions.** Deviations from established patterns create confusion and inconsistency. If a rename or restructuring is warranted, do it uniformly in a dedicated PR — not piecemeal.
- **Check whether a similar approach has been tried and rejected before.** If a prior attempt didn't work, require a clear explanation of what's different this time.

## Consistency with Codebase Patterns

### PR Hygiene

- **Keep PRs focused on their stated scope.** No accidental file modifications, no unrelated refactoring, no whitespace noise, no build artifacts. Each PR should serve a single purpose.
- **Do large refactorings and renames in separate PRs.** Separate no-diff refactors from functional changes. Mechanical renames should be separate from logic changes.
- **Merge to main first, then backport to release branches.** Use the `/backport` command. Backports to servicing are limited to security bugs, regressions, and reliability issues. Note: the reviewer should never invoke `/backport` itself — only recommend it when appropriate.

### Code Reuse & Deduplication

- **Extract duplicated logic into shared helper methods.** Fix improvements inside shared helpers so all callers benefit.
- **Move shared code to shared files, not duplicated across runtimes.** When identical code exists across CoreCLR and NativeAOT, move it to the shared partition (using `#if !MONO` if needed).
- **Use existing APIs instead of creating parallel ones.** Before introducing new types, enums, or helpers, check if existing ones serve the same purpose. Fix existing utilities rather than introducing duplicates.
- **Delete dead code and unused declarations aggressively.** When removing code, also remove helper methods, enum values, function declarations, and resx strings that are no longer used.

### Established Conventions

- **Store error strings in `.resx`, not inline code.** Reference via the `SR` class. When removing code that uses a resx string, delete the unused string entry.
- **Preserve existing alphabetical ordering in modified lists.** When a PR adds or reorders entries in an alphabetized list—especially items within a `.csproj` item group, such as `Compile`, `ProjectReference`, and `PackageReference`—verify that the changed entries preserve the surrounding order. Flag only ordering regressions introduced by the PR; do not require unrelated cleanup of pre-existing unsorted entries. This also applies to lists of areas, configuration entries, resx entries, entrypoint/export lists, and ref source members.
- **Don't modify auto-generated files or `eng/common` manually.** Change the generator or source definition instead. Files in `eng/common` are synced from dotnet/arcade.
- **Use `DOTNET_` prefix for environment variables, not `COMPlus_`.** New runtime environment variables must use `DOTNET_` exclusively.
- **Match existing style in modified files.** The existing style in a file takes precedence over general guidelines. Do not change existing code for style alone.

### Runtime-Specific Patterns

- **Consider NativeAOT parity for runtime changes.** When changing CoreCLR behavior, verify whether the same change is needed for NativeAOT. Note: Mono and CoreCLR native code conventions differ significantly — do not assume they share the same rules.
- **Keep interpreter behavior consistent with the regular JIT.** Follow the same patterns, naming, error codes (`CORJIT_BADCODE`), and macros (`NO_WAY`). Use `FEATURE_INTERPRETER` guards.
- **Source generators: no file locks, diagnostics from analyzers only.** Generators should bypass invalid state gracefully. A separate analyzer should produce diagnostics.
- **Ref assembly conventions.** No `using` directives (fully qualify types), empty method bodies or `throw null`, genapi-style formatting, alphabetical member order. TFM-specific APIs go in separate files.

## Documentation & Comments

- **Comments should explain why, not restate code.** Delete comments like `// Get the types` that just duplicate the code in English. Don't include historical context about why code changed.
- **Delete or update obsolete comments when corresponding code changes.** Stale comments describing old behavior are worse than no comments. Only flag obsolete comments when the relevant code is being touched or the PR is an explicit cleanup pass.
- **Track deferred work with GitHub issues and searchable TODOs.** Reference a tracking issue in TODO comments with a consistent prefix (e.g., `TODO-Async:`). Remove ancient TODOs that will never be addressed.
- **Don't duplicate comments on interface implementations.** Documentation comments belong on the interface definition. Implementations should use `<inheritdoc/>` to avoid divergence.
- **Add XML doc comments on all new public APIs.** These seed the official API documentation on learn.microsoft.com. Properties should start with "Gets the ..." or "Gets or sets the ...". Do not add XML docs to test code.
- **Use SHA-specific or commit-based links in documentation.** Don't use branch-relative links that break when files move.
- **Reference specs and authoritative sources in implementation code.** When parsing signatures and metadata, cite the relevant spec section (e.g., ECMA-335). Link to relevant RFCs, papers, or repo-specific documentation (such as the ECMA-335 augments maintained in this repo). This applies broadly, not just to ECMA-335.
- **File breaking change documentation for behavioral changes.** Open an issue in dotnet/docs using the template, send notification to the .NET Breaking Change Notification DL. Applies even to prerelease-to-prerelease changes.
- **Use established terminology in user-facing text.** Do not expose internal type names, private field names, or codenames like "Roslyn" in public docs or error messages.
- **Retain copyright headers and license information.** All C# and C++ source files must include the standard license header, including test files. When porting from other projects, retain original copyright and update THIRD-PARTY-NOTICES.TXT.
32 changes: 32 additions & 0 deletions .github/instructions/review-all-tests.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
applyTo: "src/tests/**,**/tests/**"
---

# Code Review -- Tests

Rules for reviewing test changes. Also apply `review-all-src` plus the language file for the code
under test (`review-csharp` or `review-native`). Note that test conventions differ across areas:
libraries tests (`src/libraries/**/tests/`) typically use xUnit with `[Fact]`/`[Theory]` and
`Assert.*`; JIT/runtime tests (`src/tests/`) often use a `return 100` success convention and
have different naming/priority requirements. Apply area-specific rules when they conflict with
general guidance below.

These are review criteria. During code authoring or local experimentation, treat PR-level gates
such as motivation, benchmark evidence, and issue prerequisites as preparation guidance for a
ready-for-review PR, not as reasons to block exploratory work unless the user asks for review.

## Testing

- **Always add regression tests for bug fixes and behavior changes.** Prefer adding `[InlineData]` test cases to existing test files rather than creating new ones. Ensure new test files are included in the csproj.
- **Use platform-specific test attributes correctly.** Use `[PlatformSpecific]`, `[ConditionalFact]`, or `[ActiveIssue]` for skip logic rather than runtime if-checks. `ConditionalFact` is required for `SkipTestException` to work.
- **Test edge cases, error paths, and all affected types.** Include empty strings, negative values, boundary conditions, Turkish 'i', surrogate pairs. Test both true and false for boolean options. Choose inputs that can't accidentally pass if output wasn't touched.
- **Test assertions must be specific.** Assert exact expected values (exact `OperationStatus`, exact byte counts), not broad conditions. Ensure tests actually fail when the fix is reverted.
- **Delete flaky and low-value tests rather than patching them.** Do not add tests known to be flaky. If a test relies on fragile runtime details and cannot be made reliable, prefer deletion.
- **Make test data deterministic and culture-independent.** Create `CultureInfo` with explicit format settings. Use `[Theory]` with `[InlineData]` over individual `[Fact]` methods.
- **Use `PLACEHOLDER` for test passwords.** Avoids false positives from credential scanning tools.
- **Use checked builds for CI, lower priority for regression tests.** Use checked (not debug) CoreCLR builds for CI. New JIT regression tests should typically be `CLRTestPriority 1`.
- **Use `RemoteExecutor` for tests with process-wide shared state.** Tests that modify shared state should use `RemoteExecutor` for isolation. Avoid hardcoded paths; use temp files. Do not add heavy dependencies like `Microsoft.CodeAnalysis.CSharp` to test assemblies.
- **Catch only expected exceptions in fuzz tests.** Catching all exceptions masks bugs like undocumented exceptions escaping the API.
- **Use modern xUnit patterns for xUnit-based tests.** In xUnit test projects (for example, most libraries tests), use `Assert.*` instead of the legacy `return 100 == success` pattern, use `[Fact]`/`[Theory]`, prefer `ThrowsAnyAsync<OperationCanceledException>` for cancellation, and name regression test classes after the issue number (e.g., `Runtime_117605`). Legacy non-xUnit tests under `src/tests` may continue to use the existing `return 100` convention.
- **Reduce test output volume.** Avoid megabytes of console output. Use `Thread.Sleep` with fewer iterations instead of busy loops.
- **Follow naming conventions for regression test directories.** In `src/tests/Regressions/coreclr/`, use `GitHub_<issue_number>` for the directory and `test<issue_number>` for the test name.
26 changes: 26 additions & 0 deletions .github/instructions/review-core-runtime.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
applyTo: "src/coreclr/**,src/native/corehost/**"
---

# Code Review -- Core runtime

Rules for reviewing CoreCLR and native host changes. Also apply `review-all-src`, the language
file (`review-csharp` or `review-native`), `review-all-tests` for test changes, and `jit` for
JIT changes.

These are review criteria. During code authoring or local experimentation, treat PR-level gates
such as motivation, benchmark evidence, and issue prerequisites as preparation guidance for a
ready-for-review PR, not as reasons to block exploratory work unless the user asks for review.

## Correctness & Safety

- **Prefer correct-by-construction designs.** Prefer designs that are correct by construction (e.g., scanning IL) over manually maintained parallel data structures. A missed optimization is better than silent bad codegen.
- **Allocate on the correct loader allocator for collectibility.** When allocating runtime data structures for generic instantiations, use the correct loader allocator accounting for collectibility of type arguments.

## Performance & Allocations

- **Avoid LINQ and records in low-level compiler codebases.** In CG2/ILC and AOT tools, use direct loops instead of LINQ and readonly structs instead of records. Use concrete types over interfaces in private code.

## PR Prerequisites

- **Start core component changes with an issue.** Changes to host, VM, or JIT should start with a GitHub issue describing the problem and motivation before submitting a PR.
Loading
Loading