Repository navigation
fix: resolve '..' physically in absolute and ~ path-tables - #1606
Merged
Merged
Conversation
Red ahead of the fix: a '..' after a symlinked directory is folded lexically, so the absolute and ~/ forms read a different file than the shell does.
Absolute and ~/ path-table names no longer fold '..' lexically; the OS resolves it, so a '..' after a symlinked directory climbs out of the link's target as in the shell, and path reports the name as written. Verbatim Windows paths, where the OS takes '..' literally, still fold. Config table anchors keep the lexical fold.
This was referenced Nov 4, 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 #1580
An absolute or
~/path-table folded..lexically before the filesystem saw it, so'/r/y/link/../f.md'ready/f.mdwhilecatreadsreal/f.mdwheny/linkis a symlinked directory. The./and../forms already passed..through to the OS.Red
Red-test commit f72c400, CI red for the asserted reason: https://github.com/thekevinscott/dirsql/actions/runs/41879257313 (Rust
Integration testsjob: https://github.com/thekevinscott/dirsql/actions/runs/41879258057/job/126747194405)Fix
path_table::absolute_targetno longer callsnormalize; the OS resolves.., andpathreports the name as written (/r/y/link/../f.md), as the./form and bash do.\\?\), where the OS takes..literally, still fold. Non-verbatim Windows paths keep folding:typed_pathfollows Win32, which folds..lexically itself.[[table]]glob anchors keep the lexical fold (unchanged behavior; out of scope here).Tests: CLI e2e (
tests/path_table_cli_e2e.rs, absolute and~/), SDK integration (tests/path_table_symlinks.rs), unit tests inpath_table.rs. The symlink tests arecfg(unix)like the existing symlink suite: on Windows the OS itself resolves..lexically, so the physical expectation does not apply there.Manual run (release binary, issue repro):
E2E Verification
packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python)packages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts)cd packages/python && testing-conventions e2e attest 'uv run python -m pytest tests/e2e/query_contract_test.py tests/e2e/on_file_query_test.py tests/e2e/use_case_join_test.py tests/e2e/glob_speed_symlink_test.py tests/e2e/fanout_test.py -x -q'(aftermaturin develop --release);just e2e-attest-ts;cargo test -p dirsql --features cliChangelog / Migrations
<root>/<pkg>/changelog.d/for each changed package (or:skip-changelogtrailer on a commit with reason)<root>/<pkg>/migrations.d/for each changed package (every subsection but Summary_None._when nothing breaks)