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
rel_path is backslash-separated on Windows: to_rel_path uses os.path.relpath and nothing normalises to POSIX form #214
rel_path is part of the API contract — test_rel_path_api_parity.py exists to hold it — and on Windows it is built from os.path.relpath, which returns backslash-separated paths.
The chain._enrich_with_rel_path() (palinode/api/search_helpers.py) is what attaches rel_path to search, associative, dedup-suggest, orphan-repair and topic-coverage results. It calls to_rel_path() (palinode/core/path_guard.py), whose body is os.path.relpath(file_path, base). That is correct POSIX behaviour and correct Windows behaviour — it is just not the same string, and as_posix() appears nowhere in the package.
Seven test_rel_path_api_parity tests fail on native Windows in @Kaap10's 3.12 inventory and @kevin-lozada-santos's 3.11 inventory, both posted on #169. Whether all seven trace to this expression is for the fix to establish — that has not been verified, and it should not be assumed.
A separate, smaller instance in the same family.palinode/core/store.py derives a path for associative results with fp.replace(config.memory_dir + "/", "").lstrip("/") — a hardcoded separator. On Windows that replace never matches, so the value stays absolute. It feeds the result's category field, notrel_path, so the consequence is a wrong category rather than a broken contract. Worth fixing in the same pass; worth not conflating with the above.
The precedent is already in the tree.palinode/core/skip_dirs.py does rel_path.replace(os.sep, "/"). Someone solved this once, in one place, and it was never generalised.
What is wanted:rel_path renders in POSIX form on every platform, and a test that pins it so the next refactor cannot quietly undo it. Where the normalisation belongs — inside to_rel_path, or at the enrichment boundary — is a design call worth stating in the PR.
Not in scope: the rest of the Windows suite failures. Those are being carved separately.
Reserved for @Kaap10, who claimed this slice on #169. GitHub currently rejects the direct assignment on this new issue; it is not open for another claim.
I've implemented the fix and opened a pull request to resolve this issue: #228
Summary of Changes:
POSIX Path Normalization (to_rel_path): Converted derived relative paths and already-relative inputs to use forward slashes (/), while preserving the fallback-unchanged invariant for external/different-drive absolute paths.
Removed Hardcoded Slashes: Replaced manual string stripping (config.memory_dir + "/") in store.py associative search and layer_split.py with to_rel_path().
Test Suite Updates: Updated assertions to explicit POSIX literals, added test coverage for backslash relative paths and Windows paths, and verified all tests pass locally.
Activity
docs(changelog): add entry for to_rel_path POSIX normalization (phase…
Kaap10 commentedon Sep 21, 2026
I've implemented the fix and opened a pull request to resolve this issue: #228
Summary of Changes:
to_rel_path): Converted derived relative paths and already-relative inputs to use forward slashes (/), while preserving the fallback-unchanged invariant for external/different-drive absolute paths.config.memory_dir + "/") instore.pyassociative search andlayer_split.pywithto_rel_path().Ready for review!
fix(path_guard): normalize to_rel_path to POSIX forward slashes (#214) (