Skip to content

DbPathResolverTests ResolveDataDirForQuery tests resolve temp root data dir #2953

Description

@Widthdom

Summary

DbPathResolverTests.ResolveDataDirForQuery_* fail in this workspace because ResolveDataDirForQuery resolves to the temp root .cdidx/codeindex.db instead of the test project or ancestor workspace .cdidx directory.

Evidence

Command:

dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore --filter "FullyQualifiedName~DbPathResolverTests.ResolveDataDirForQuery"

Observed on both net8.0 and net9.0:

  • ResolveDataDirForQuery_PrefersOutermostAncestorCdidx expects the temp project root .cdidx/codeindex.db, but gets the temp root .cdidx/codeindex.db.
  • ResolveDataDirForQuery_FallsBackToCurrentDirectoryWhenNoAncestorCdidxExists expects the child directory .cdidx/codeindex.db, but gets the temp root .cdidx/codeindex.db.

Impact

Full suite validation can fail independently of the code under test, and the tests no longer verify the intended ancestor-workspace fallback behavior.

Notes

Found while validating a separate PR for CLI/MCP input bounds. Not addressed there to keep that PR scoped.

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