Repository navigation
test(memory): compare instructions against the slash-form root - #355
Merged
runkids merged 2 commits intoOct 3, 2026
Merged
Conversation
Instructions renders the memory folder with filepath.ToSlash, so asserting the raw root path can only hold where the OS separator already is a slash. On windows-latest the test fails on every run while the rest of the package passes.
runkids
approved these changes
Oct 3, 2026
runkids
left a comment
Owner
There was a problem hiding this comment.
Reviewed b02b585. No blocking findings. Instructions already renders the canonical directory with filepath.ToSlash, so this assertion matches the implementation on Windows while preserving the path check. Verified TestInitPreservesExistingIndex in an isolated devcontainer copy; passed. The Windows CI check also passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Linked Issue
Part of #344
internal/memoryarrived with #349, after #344 was filed, so it is not in that issue's table yet. ItsWindows failure is the same class as #348: an assertion written against one platform's path form.
What
One assertion in
internal/memory/store_test.go:85:Why
Instructionsrenders the folder throughfilepath.ToSlash(internal/memory/guidance.go:36), so thetext it returns contains
C:/Users/...on Windows. The test then compares that text againstroot,which is
t.TempDir()in OS-native form (C:\Users\...). The two forms only coincide where the OSseparator already is
/, which is why this passes on Linux and macOS and fails on every Windows run.The package already asserts it this way elsewhere —
guidance_test.go:16checks for"`"+filepath.ToSlash(outside)+"`"— so this bringsstore_test.goin line with its own siblingtest rather than inventing a convention.
Measured
go test -v -count=1 ./internal/...on awindows-latestrunner at6e176ddbfrom my fork:run 37108486253,
FAIL skillshare/internal/memory 0.641s, andTestInitPreservesExistingIndexis the only failingtest in the package.
Reproduced on a real Windows host with a cross-compiled
windows/amd64test binary:TestInitPreservesExistingIndexinternal/memorypackagegofmt -landgo vet ./internal/memoryare clean.Why this matters for the Windows job
#351 merged a
windows-testjob that lists only the packages green onwindows-latest.internal/memorycannot be added to that list while this assertion fails, so this is the prerequisitefor covering the new memory feature on the platform it ships binaries for.
Checklist
on a real Windows host, with Linux unchanged