Repository navigation
Fix Windows test issues - #177
Merged
Merged
Conversation
The tests used native filepath.Join paths as lockfile keys, which contain backslashes on Windows. Production code normalizes with KeyFromPath. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The test-only changes preserve test intent and align store keys with production handling.
0 open findings
What changed in this PR
Fixes Windows failures in commit tests by normalizing lockfile keys consistently with production.
Changes:
- Uses
workflowfile.KeyFromPathfor test store operations. - Preserves native paths in workflow entries and plans.
| File | Description |
|---|---|
internal/pin/commit_test.go |
Normalizes lockfile keys in test setup and assertions. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Windows pipes buffer ~4 KB, so reading after Execute deadlocks on large JSON output (hangs TestCheckCommand_JSONGolden). Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
nodeselector
approved these changes
Oct 20, 2026
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.
Fixes tests that fail or hang on Windows. Test-only; no production code changes.
Found and fixed so far
TestCommitDependencyFreeWorkflow,TestCommitPartialResolution,TestCommitRemovesDependenciesDroppedFromWorkflow,TestCommitRekeysAnnotatedTagObjectWithUses) used nativefilepath.Joinpaths (backslashes) as lockfile keys. Lockfile keys are slash-normalized, so they now useworkflowfile.KeyFromPath.runCommandWithHTTPContextread itsos.Pipestdout/stderr only afterExecutereturned. Windows pipes buffer ~4 KB, so large output (e.g.--json) blocked the writer forever andTestCheckCommand_JSONGoldenhung. Both pipes are now drained concurrently.TestWriteRunLogasserted file mode 0600, but Windows does not report POSIX permission bits (it returns 0666). The mode check now lives in its own test,TestWriteRunLog_FileMode, which is skipped on Windows (a Windows counterpart,TestWriteRunLog_FileModeWindows, asserts the log is a writable regular file); the rest ofTestWriteRunLogstill runs there.