Skip to content

Keep post-extraction hook fixture discovery below the loadable-type cap #5135

Description

@Widthdom

Problem

The production-runtime post-extraction hook tests copy CodeIndex.Tests.dll into a hooks directory. The test assembly now exceeds the production hook discovery loadable-type cap, so discovery skips the assembly and the hook tests fail before exercising their intended behavior.

On current origin/main (2671f0194), the diagnostic is:

Hook assembly skipped: too many loadable types (4102; maximum 4096).
category: hook_type_limit_exceeded

The earlier 84bff5e8f baseline also reproduces at 4098 loadable types.

Reproduction

dotnet build tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Debug -f net8.0 -p:UseSharedCompilation=false
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Debug -f net8.0 --no-build --filter "FullyQualifiedName~PostExtractionHookTests.WorkerConstructionFailure_DisablesHookForCurrentRun"

Expected

Post-extraction hook tests should use a bounded dedicated fixture assembly, or another test-only arrangement that remains below the production discovery cap as the main test assembly grows. The production security cap should remain enforceable and separately covered.

Discovered while validating #5098; no fix is included in that issue's scope.

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