You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python and bash session_dir_slug disagree on the Windows drive letter, and test_slug_parity does not cover the step where they differ #268
Found while fixing #263, outside that PR's blast radius. Not user-reported — NTFS hides it completely, which is why it can sit here indefinitely.
The divergence
scripts/lib-slug.sh:session_dir_slug() folds the drive letter. pipeline/slug.py does not: it is a faithful transcription of Claude Code's own JXA slug routine and carries no drive normalisation at all.
On Windows the Python side receives CLAUDE_PROJECT_DIR as exported by resolve-paths.sh, which is the native Win32 form with an upper-case drive (C:\\Users\\…). So:
Side
Computes
bash session_dir_slug
c--Users-…
pipeline/slug.py
C--Users-…
extract.py:50 uses the Python slug to locate the session directory, so it reads a differently-cased path than the store is named after. On NTFS both resolve, nothing fails, and nothing anywhere reports a difference.
Why the existing guard does not catch it
tests/test_slug_parity.py exists precisely to keep these two implementations identical, and it is the reason this is worth filing rather than shrugging at: the test is doing its job for every step except the one where they now differ. The drive-letter fold is not among its cases, so parity is asserted and the assertion does not reach the divergence.
This is the same shape as #263 one layer over: a check that answers a narrower question than the one it appears to answer.
Blast radius
Currently benign, and it is worth being precise about why rather than claiming damage:
On NTFS, a case-only difference resolves to the same directory, so reads succeed.
On macOS/Linux the fold does not fire at all (no drive letter), so the two agree.
The exposure is that it stops being benign the moment anything compares the two slugs as strings rather than using them as paths — which is exactly what #263 turned out to be, in git rather than in the filesystem. Any future consumer that keys, indexes or matches on the slug inherits a mismatch that no platform will surface.
Extend tests/test_slug_parity.py to cover drive-letter inputs in both cases and both shapes (C:\\…, c:/…, /c/…), so the parity guarantee actually spans the step where the two most recently drifted.
The second half matters more than the first. A parity test that does not cover the normalisation step will let the next divergence through in the same silence.
Activity
fix(slug): fold the Windows drive letter on the Python side too (Digi…