Skip to content

Fix DbPathResolver query tests active workspace isolation - #2968

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue2953
Jun 2, 2026
Merged

Fix DbPathResolver query tests active workspace isolation#2968
Widthdom merged 2 commits into
mainfrom
fix-issue2953

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Isolate ResolveDataDirForQuery_* tests from developer-local active workspace state.
  • Add a bilingual changelog fragment for the validation fix.

Root Cause

ResolveDataDirForQuery correctly checks active workspace state before ancestor .cdidx and XDG resolution. The affected tests did not clear CDIDX_ACTIVE_WORKSPACE or isolate XDG_CONFIG_HOME, so local active workspace configuration could redirect the expected test DB path.

Validation

  • CDIDX_ACTIVE_WORKSPACE=/tmp/cdidx_active_workspace/codeindex.db dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore -p:UseSharedCompilation=false --filter "FullyQualifiedName~DbPathResolverTests.ResolveDataDirForQuery"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore -p:UseSharedCompilation=false --filter "FullyQualifiedName~DbPathResolverTests"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet build CodeIndex.sln --no-restore -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review: No blocking/actionable issues found.

Documentation / Changelog

  • Added changelog.d/unreleased/2953.fixed.md.
  • No AGENT.md, CLAUDE.md, or AGENT_GUIDE.md changes.

Follow-up Candidates

None.

Fixes #2953

@Widthdom
Widthdom marked this pull request as ready for review June 2, 2026 20:46
@Widthdom
Widthdom merged commit 1d32f0a into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2953 branch June 3, 2026 23:00
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.

DbPathResolverTests ResolveDataDirForQuery tests resolve temp root data dir

1 participant