Repository navigation
fix(rust): hand on-file hooks non-verbatim Windows paths - #1211
Merged
6 commits merged intoOct 2, 2026
Merged
6 commits merged into
6 commits merged into
Conversation
Red: non_verbatim is still the identity, so verbatim Windows paths reach the hook unchanged.
{path} and {root} drop the \\?\ and \\?\UNC\ prefixes when the plain spelling names the same file.
thekevinbot
marked this pull request as ready for review
October 2, 2026 11:32
MSYS sh collapses a leading \\ even when quoted; UNC conversion stays covered by the non_verbatim unit tests.
5 tasks done
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 #1208
Part of #1191
On-file hooks and
parsed()parsers now receive{path}and{root}in plain form:\\?\C:\xbecomesC:\xand\\?\UNC\server\share\xbecomes\\server\share\x. Verbatim forms with no plain equivalent (\\?\GLOBALROOT,\\?\Volume{...},./..or empty components, trailing dot/space, reserved device names, invalid characters, paths of 260+ UTF-16 units) pass through unchanged.The conversion is a pure string function (
command::non_verbatim), so its tests run on Linux.dunceis not a dependency; a small local function covers it. Argv quoting (#1207) and the root-relativepathcolumn (#1189) are untouched.E2E Verification
cargo test --workspace --features cli)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)cargo test --workspace --features cli,just e2e-attest-python,just e2e-attest-ts,just preflightManual run (Linux):
dirsql -c .dirsql.toml "SELECT p, r FROM seen"withon-file = "sh -c '...' sh {path} {root}"returned[{"p":"/tmp/ex1208/data/a.txt","r":"/tmp/ex1208"}], unchanged on Unix. The Windows conversion is covered by Linux-run unit tests; there is nocfg(windows)code, so no Windows-target compile check was needed. Not run on a Windows host (that CI job is in #1178).Changelog / Migrations
<root>/<pkg>/changelog.d/for each changed package (or:skip-changelogtrailer on a commit with reason)<root>/<pkg>/migrations.d/(or: not required -- additive/bugfix only)