fix(rust): resolve Windows absolute path-table names - #1192
Open
thekevinbot wants to merge 5 commits into
Open
thekevinbot wants to merge 5 commits into
thekevinbot wants to merge 5 commits into
Conversation
Drive-letter, UNC and ~\ names now resolve on Windows, and absolute path-tables report a /-separated prefix. Path parsing goes through typed-path so the Windows rules are unit-tested on any host.
This branch has not been deployed
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 #1185
Path-table names are now parsed with
typed-pathinstead ofstd::pathplus a/-prefix check. The syntax is a type parameter, so the Windows rules run as unit tests on Linux.On Windows these now resolve:
\or/(C:\logs\*.log,C:/logs/*.log)\\server\share\*.md)~\as well as~//var/log), as beforeAbsolute path-tables report
path_prefixwith/separators (C:/logs), so absolute tables match the/-separated relative paths from #1184. Verbatim (\\?\) paths keep\, because/is not a separator there.root(the directory walked) stays native.Two smaller fixes:
\\?\C:is no longer read as a glob because it contains?.normalizeno longer pops a..it kept on a relative path (../../astayed../abefore).Test changes.
path_table_globs.rsandpath_table_cli_e2e.rsbuilt their expectedpathwithformat!("{dir}/docs/a.md")orjoin(..).display(). On Windows that yields mixed separators likeC:\...\tmp/docs/a.mdandC:\...\tmp\notes/n.md. Those strings only hold where the temp dir contains no\. No single reporting rule can satisfy all of them, so the tests now expect the/-separated form. On Linux nothing changes.Stacked on #1178 (
claude/1175-windows-ci) so theWindows testsjob runs here. CI red: #1178's Windows run 35995035941.Windows failure count: 99 before, 94 after (run 36437093101). The five
path_table::testsunit failures are fixed. Every absolute,../and~/path-table now resolves on Windows. Thepath_table_globs.rsandpath_table_cli_e2e.rsfailures that remain have the rightC:/...prefix, then a\before the relative part (C:/.../docs\a.md). That comes from the vtab path join and relative paths, which #1184 owns.E2E Verification
cargo test --workspace --features cli)packages/python/e2e-attestations/claude-1185-win-abs-table-names.jsonreceipt written (just e2e-attest-python)packages/ts/e2e-attestations/claude-1185-win-abs-table-names.jsonreceipt written (just e2e-attest-ts)just e2e-attest-python,just e2e-attest-ts,cargo test --workspace --features cli,just preflightdirsql query "SELECT path FROM '/tmp/claude/1185-demo/sub/*.md'"returned/tmp/claude/1185-demo/sub/a.md, and'~/work/dotfiles/domains.md'returned the absolute home path.Changelog / Migrations
packages/rust/changelog.d/packages/rust/migrations.d/. Thechangeloggate requires one, and absolutepathvalues on Windows change from\to/.