Skip to content

Stabilize C# regex allocation regression probes under full-suite load #5244

Description

@Widthdom

Summary

The net9.0 Release full suite can fail SymbolExtractorCSharpRegexProbeTests.Extract_CSharpPropertyStructuralGate_PreservesPropertyFormsAndReducesAllocations when the optimized and baseline allocation measurements are very close, while the same test passes immediately when rerun in isolation.

Evidence

Full-suite command:

dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --no-build --no-restore -m:1 -nodeReuse:false

Observed failure:

Expected property structural gating to allocate less: optimized=5,805,248, baseline=5,798,592 bytes.

The full suite completed with 11,644 passed, 431 skipped, and this single failure. An immediate isolated rerun under the same Release/net9.0 configuration passed:

dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net9.0 --filter FullyQualifiedName~Extract_CSharpPropertyStructuralGate_PreservesPropertyFormsAndReducesAllocations --no-build --no-restore -m:1 -nodeReuse:false

Expected

The allocation regression probe should distinguish a material regression from measurement noise under full-suite load, while continuing to fail for a meaningful optimized-path allocation increase.

Scope

Stabilize the measurement or comparison contract and retain property-form correctness coverage. This was observed while validating unrelated Issue #5229 and is not part of that implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions