Skip to content

test(doctor): assert target paths in the OS separator form - #348

Merged
runkids merged 1 commit into
runkids:mainfrom
star-nebula:fix/doctor-test-path-separators
Oct 3, 2026
Merged

runkids merged 1 commit into
runkids:mainfrom
star-nebula:fix/doctor-test-path-separators

Conversation

@star-nebula

Copy link
Copy Markdown
Contributor

What

checkSharedTargetPaths and checkCrossTargetDiscovery render target pools through
filepath.Clean, so on Windows Doctor prints C:\Users\<user>\.agents\skills. Two fixtures
compared those values against slash-form literals, so correct Doctor output failed the suite on
Windows only:

detail "\\tmp\\.agents\\skills ← universal, warp, witsy" missing "/tmp/.agents/skills"
detail "codex (…) also scans C:\\Users\\runneradmin\\.agents\\skills ← universal" missing ".agents/skills"

Nothing is wrong with the product text — it is OS-native on purpose, matching how every other
path is printed. The assertions were the platform-dependent part. Part of #344.

Tests

Test-only change: build the expected strings with filepath.FromSlash so each OS compares
against its own form. On a windows/amd64 build of ./cmd/skillshare, restricted to the
shared-path and cross-discovery tests:

  • stock 7043ca3a: --- FAIL: TestCheckSharedTargetPaths_Collision, --- FAIL: TestCheckCrossTargetDiscovery_CodexSeesUniversal
  • with this commit: all 13 tests in that group pass

Linux is unchanged (ok skillshare/cmd/skillshare).

checkSharedTargetPaths and checkCrossTargetDiscovery print filepath.Clean
output, so on Windows a shared pool renders as C:\Users\<user>\.agents\skills.
Two fixtures compared those values against slash-form literals, so they failed
on Windows even though the diagnosis text is correct on both platforms.

Build the expected strings with filepath.FromSlash so the assertions hold on
every OS. Both tests now pass in a windows/amd64 run and are unchanged on Linux.
@runkids

runkids commented Oct 3, 2026

Copy link
Copy Markdown
Owner

@codex review

@runkids
runkids merged commit e77e912 into runkids:main Oct 3, 2026
7 checks passed
@star-nebula
star-nebula deleted the fix/doctor-test-path-separators branch October 3, 2026 11:38
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.

2 participants