Skip to content

LocalJsonl source guard can cross parallel unreadable test markers #5142

Description

@Widthdom

Summary

LocalJsonlJsonWriterOptionsTests.RelaxedEncoderAndHelperStayLimitedToLocalJsonlSinks can fail during the full parallel Release suite when its repository-wide source enumeration crosses an unreadable marker directory created by another test under a generated tests/CodeIndex.Tests/bin/Debug/... tree.

Observed behavior

Command:

dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore --logger "console;verbosity=minimal"

The test failed in EnumerateSourceFiles with:

System.UnauthorizedAccessException: Access to the path
tests/CodeIndex.Tests/bin/Debug/net8.0/mcp_index_unreadable_marker_.../secret is denied.

The generated unreadable marker belonged to another parallel test. A separate full Release suite completed successfully before this independent adversarial-review run, so the failure depends on scheduling and transient generated state rather than the LocalJsonl contract itself.

Expected behavior

The repository-wide guard should deterministically inspect the intended source set during the normal parallel suite without traversing generated bin / obj artifacts or failing on transient unreadable test fixtures.

Acceptance criteria

  • The source enumeration excludes generated build/test trees or otherwise handles concurrent inaccessible generated paths without hiding failures in the intended source set.
  • The test remains exhaustive for the repository files that define the LocalJsonl contract.
  • The normal parallel Release suite no longer depends on the timing of unreadable-marker fixtures.

Scope note

Observed during the required adversarial review for #5113 and unrelated to that bounded-regex test stabilization.

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