Skip to content

V11.0.0/upstream sync 2026 11 01 - #7

Merged
gimlichael merged 22 commits into
masterfrom
v11.0.0/upstream-sync-2026-11-01
Nov 1, 2026
Merged

gimlichael merged 22 commits into
masterfrom
v11.0.0/upstream-sync-2026-11-01

Conversation

@gimlichael

@gimlichael gimlichael commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

This pull request records upstream master through 2e0a852d3a0d9669d9c19445e366c69ccaaf6424 as ancestors of the Codebelt branch, preserving an accurate zero-behind comparison against that snapshot. The normal upstream merge has exactly the same tree as the integrated PR #6 baseline; production code, dependencies, tests, package layout, and release workflows are unchanged.

Synchronization policy:

  • Keep all writes within codebeltnet/coverlet and preserve selective file integration, the Codebelt package surface, and both upstream merge parents.
  • Integrate this PR with a merge commit. The fork now permits merge commits and retains its other PR, deletion, and force-push protections.

Developer visibility:

  • Show the reviewed upstream boundary in the README and describe the ancestry-only synchronization in the changelog.

Review and validation record:

  • Record decisions for all 19 incoming commits, intentional exclusions, the comparison base, and the unchanged runtime tree.
  • Release build, package inspection, and all four retained local suites passed on .NET 10/11. Preserve the initial concurrent package-validation restore failure and the successful full isolated rerun; no code or assertions changed.
  • CI run 41267824916 passed all 18 build, test, pack, and package-validation jobs across Linux, Windows, and macOS. The final documentation follow-up is subject to the same PR checks before integration. Existing release tags are unchanged, and package publication is skipped.

alexthornton1 and others added 21 commits September 21, 2026 10:11
When determining the configuration to be used in each test module
execution, we're now using the `--config-file` CLI argument, loading
configuration from the file it refers to (when that argument is
present), rather than falling back to the legacy file search.
…rom compileLibraries (coverlet-coverage#2032)

TryWithCustomResolverOnDotNetCore in CecilAssemblyResolver only resolves assemblies by
looking them up in DependencyContext.CompileLibraries (built from the instrumented
module's *.deps.json). Starting with the .NET SDK 10.0.4xx feature band, transitively
shared Microsoft.Extensions.* assemblies (e.g. Microsoft.Extensions.Logging, referenced
only via a transitive FrameworkReference to Microsoft.AspNetCore.App, not directly on the
instrumented project) are no longer enumerated in compileLibraries at all.

When a method has a default parameter of such a shared-framework enum type, Cecil's
resolver misses it and throws CecilAssemblyResolutionException while instrumenting -- and
that failure silently drops the entire module out of the coverage report
(coverage.cobertura.xml ends up with an empty <packages/>) even though `dotnet test`
itself is green, with no diagnostic pointing at the real cause.

NetCoreSharedFrameworkResolver already exists in the same file and can resolve these
assemblies directly from the shared-framework directory via runtimeconfig.json, but it was
only ever consulted as a constructor fallback, never re-tried when the compileLibraries
lookup specifically misses by name. This change adds that fallback: on a compileLibraries
miss, ask NetCoreSharedFrameworkResolver directly before giving up.

Verified against a live repro matching the reporter's stack trace
(CecilAssemblyResolutionException -> Mono.Cecil.MetadataBuilder.GetConstantType) on
dotnet SDK 10.0.400/10.0.401 (the same feature band as the report). Added
TestInstrument_NetstandardAwareAssemblyResolver_MissingFromCompileLibrariesFallsBackToSharedFramework,
modeled on the neighboring _SiblingRuntimeConfigCanResolveSharedFrameworkAssembly test: a
module with no adjacent .deps.json forces the compileLibraries lookup to miss, and the test
asserts System.Text.Json still resolves via NetCoreSharedFrameworkResolver. 5/5 green on
net10.0 (net8.0 leg not run in this environment: the SDK image only ships the 10.0.11
runtime, an environment gap, not a test issue).

Fixes coverlet-coverage#2026

Signed-off-by: Eljees <3.14hell@gmail.com>
…mpilerGeneratedAttribute drops async state machine) (coverlet-coverage#2033)

The underlying bug was already fixed by 3a241bc (coverlet-coverage#1940) for the related coverlet-coverage#1843, but no existing test exercises the exact configuration reported in coverlet-coverage#1727 (ExcludeAttributes=[CompilerGeneratedAttribute] on a constructorless class). Adds that missing coverage; no src/ changes.

Fixes coverlet-coverage#1727
* update version + changelog

* update change log file

* update changelog
Update "To Reproduce" and "Actual behavior" text.
)

Extend MTP config-file coverage to include OpenCover diagnostics and add a Windows regression test for central config loading, legacy config ignoring, and report count/prefix validation.
---
updated-dependencies:
- dependency-name: Moq
  dependency-version: 4.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Moq
  dependency-version: 4.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Moq
  dependency-version: 4.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: Moq
  dependency-version: 4.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

---
updated-dependencies:
- dependency-name: Microsoft.Sbom.Targets
  dependency-version: 4.1.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.37.9 to 4.38.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v4.37.9...v4.38.2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
InstrumentType now detects local functions via IInstrumentationHelper.IsLocalMethod, and for those methods ignores CompilerGeneratedAttribute/GeneratedCodeAttribute when deciding exclusion (reusing the existing IsCompilerGeneratedOrGeneratedCodeAttribute helper), while still honoring any other user-configured exclude attribute (e.g. ExcludeFromCodeCoverage) applied directly to a local function.
* Update centralized package versions

Bump centrally managed NuGet, test, xUnit, Microsoft Testing Platform, and LinqKit.Microsoft.EntityFrameworkCore package versions in Directory.Packages.props.

* Update .NET SDK and package dependencies

- Refresh .NET SDK, runtime, and package patch versions.
- Align legacy builds with SDK 9.0.319.
- Centralize System.Text.Json versioning.
- Add AsyncInterfaces to MTP validation tests.
Added System.Security.Cryptography.Pkcs package reference.
* add CollectorExtensionThresholdCoverageTests.cs

* add CoverageTests.CecilAssemblyResolver.cs
…overlet-coverage#2047) (coverlet-coverage#2056)

* Compute branch reachability from the control-flow graph

Add the IsReachable property introduced by Bertk in coverlet-coverage#2047 to BranchPoint
and BranchInfo. Compute branch reachability by walking each method's
control-flow graph once, from the method entry. The walk follows branch
targets, stops at return, throw and jmp, and enters the filter and
handler of each exception handler whose try entry is reached. Every
path of a branch gets the reachability of its branch instruction.

Carry the flag through Instrumentation.Branch ([DataMember], default
true), both places in Instrumenter that create a Branch, and the four
BranchInfo initializers in Coverage. DataContractSerializer does not run
field initializers, so Branch sets IsReachable to true in an
OnDeserializing callback; otherwise an instrumentation state file
without the field reads back with every branch unreachable.

Branch coverage totals leave out unreachable branches, as in coverlet-coverage#2047. So
do the per-branch details: Cobertura conditions, LCOV BRDA records and
OpenCover branch points, so that each report's details agree with its
totals. A Cobertura line whose branches are all unreachable is no longer
marked as a branch line.

The tests compile C# samples with Roslyn in Debug and in Release, so
the branch points come from real IL with real offsets. Methods built
with Cecil cover a branch and a switch that nothing reaches, and a
branch after jmp. An end-to-end test in CoverageTests checks that the
flag survives Instrumenter and Coverage.

Refs coverlet-coverage#2036. Supersedes coverlet-coverage#2047.

Co-authored-by: Bert <bert.k@hotmail.com>

* Move the disk-backed reachability test to coverlet.core.coverage.tests

Coverage_DeadBranch_IsReachableFalseSurvivesInstrumenterAndCoverage
writes a compiled module and its PDB to a temporary directory.
.github/copilot-instructions.md asks unit tests not to use the file
system, so move the test and the helper that builds its module to
coverlet.core.coverage.tests, as the Copilot review on coverlet-coverage#2056 suggested.
Coverage_BranchWithoutLines_IsReachableCopiedToBranchInfo uses mocks and
stays in coverlet.core.tests.

coverlet.core.coverage.tests does not reference coverlet.core.tests, so
the moved test compiles its sample with its own copy of the Roslyn
step, and BranchPointReachabilityTests.Compile is private again.

---------

Co-authored-by: Bert <bert.k@hotmail.com>
Record coverlet-coverage/coverlet master at 2e0a852 as an ancestor through a normal merge. The applicable fixes are already ported; retain the exact Codebelt baseline tree after reviewing conflicts, exclusions, duplicate tests, and dependency references. Preserve the narrowed package surface, framework pins, runtime adaptations, MinVer, and release workflows. Detailed source decisions and validation follow in UPSTREAM.md.
Make downstream-only merge ancestry the maintenance policy while keeping Codebelt file integration selective. Record every incoming source decision, the unchanged runtime tree, current validation, and the merge policy needed to preserve the upstream parents. Expose the reviewed upstream boundary to developers without changing the package or release process.
@gimlichael gimlichael self-assigned this Nov 1, 2026
@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge using the documented merge-commit policy once its required checks pass.

Summary

This PR retains the reviewed upstream history without changing the runtime files.

  • Future upstream syncs preserve ancestry while keeping file changes selective.
  • The reviewed upstream snapshot is recorded without changing the Codebelt package.

Reviews (2) · Last reviewed commit: "💬 record downstream sync validation and..." · Reviewed by Greptile

Record the successful local and cross-platform validation, preserve the initial shared-directory test failure and isolated rerun evidence, and link the downstream integration PR. Clarify how a ledger committed within its own PR records the destination without inventing a future commit hash.
@gimlichael
gimlichael merged commit 0e2e2fe into master Nov 1, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants