Skip to content

Increase regex timeout headroom for SQL refs - #2971

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue2949
Jun 2, 2026
Merged

Increase regex timeout headroom for SQL refs#2971
Widthdom merged 1 commit into
mainfrom
fix-issue2949

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Increase the bounded regex default timeout from 250 ms to 1 second so SQL reference extraction has more scheduler headroom under full-suite CPU contention.
  • Add a focused regression guard for the bounded regex timeout budget.

Root Cause

Regex timeouts are treated as no-match fallbacks. Under heavy test-suite load, the previous 250 ms budget could intermittently turn SQL reference matches into missing references.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-restore -p:UseSharedCompilation=false --filter "FullyQualifiedName~BoundedRegexTests|FullyQualifiedName~Extract_SQL_CreateIndexCapturesOnTableReference|FullyQualifiedName~RunReferences_ExactJson_SqlMergeTempTargetWithoutIntoResolvesTargetAndSource|FullyQualifiedName~RunReferences_ExactJson_SqlNonAsciiBareIdentifiersStayWhole|FullyQualifiedName~RunReferences_ExactJson_SqlMultilineSingleQuotedStringsStayOpaque"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet build CodeIndex.sln -p:UseSharedCompilation=false --no-restore
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json

Full dotnet test CodeIndex.sln --no-restore -p:UseSharedCompilation=false was attempted locally but did not produce a final summary before being stopped, so it is not counted as a passing validation.

Documentation / Changelog

  • Added changelog.d/unreleased/2949.fixed.md.
  • No README or guide updates required; this only changes the bounded regex execution budget.

Fixes #2949

@Widthdom
Widthdom marked this pull request as ready for review June 2, 2026 20:47
@Widthdom
Widthdom merged commit 7d7e7ca into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2949 branch June 2, 2026 20:48
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.

Investigate intermittent SQL references tests in full suite

1 participant