Skip to content

Fix project hash on Windows (paths with forward slashes) - #173

Merged
mbel-tech merged 1 commit into
mainfrom
claude/project-thread-s4y5cm
Oct 16, 2026
Merged

mbel-tech merged 1 commit into
mainfrom
claude/project-thread-s4y5cm

Conversation

@mbel-tech

Copy link
Copy Markdown
Owner

Before: on the Windows runner two golden-hash tests failed, because the hash serialised Path("/data/s1") with backslashes. PR #172's mode="json" change did not help, since pydantic stringifies a Windows path with str().

After: project_hash() dumps in python mode and writes every path with as_posix(), so the hash is the same on every platform. Posix hashes are unchanged (golden tests pass locally).

How: new _hash_default json fallback in track2data/core/models.py. The Windows jobs only run on push to main, so the fix can only be confirmed there after merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N7hYfMaQFqSMBtq9ZWJ3gV


Generated by Claude Code

JSON mode still stringified a Windows path with backslashes, so the golden
hash tests failed on the Windows runner. Hash the python-mode dump and write
paths with as_posix; posix hashes are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7hYfMaQFqSMBtq9ZWJ3gV
@mbel-tech
mbel-tech marked this pull request as ready for review October 16, 2026 11:04
@mbel-tech
mbel-tech merged commit 7064c53 into main Oct 16, 2026
7 checks passed
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