Repository navigation
docs(changelog): list the Windows fixes of 0.7.1 - #88
Conversation
folders::canonicalize answered `C:\repo` for a path under 260 characters and kept `\\?\C:\repo\...` for a longer one. A folder and a deep file inside it then had two spellings, and `starts_with` between them was false. confine_existing could refuse a file inside its base, and refuse_inside_checkout could let a workspace folder inside the checkout pass. Every path on a drive or a share now loses the prefix. The standard library adds it again for a call that needs it, so a long plain path opens as before. A path that Windows reads as another file without the prefix is now an error, not a second form: one with a part that is a device name such as `NUL`, or that ends in a dot or a space. Which names are devices differs between Windows versions, so a part that looks like one is put to Windows: the plain path is the answer when it resolves to the same file. The text is handled as UTF-16, so a file name that is not valid Unicode gets the same form as any other. rune-docs carries its own copy in support.rs and gets the same change. runeseer reported the two forms on pull request 87. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The fallback state folder was `home.join(".local/state/rune")`, which
prints as `C:\Users\owner\.local/state/rune`. It goes through
folders::join now, as the other folders do.
runeseer reported it on pull request 87.
Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
…s it display_relative joined the parts of a path with `/`. For a path under the root that is the relative path. For any other path it gave `//tmp/module` on Unix and `C:/\/module` on Windows, since the root is a part too. Such a path is now shown whole. A root that is not canonical reaches this, for example a temp folder that Windows names with a short name. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The Windows job of pull request 87 failed in its first run of the workspace tests. This machine did not show it: its temp folder has no short name and sits on the drive of the checkout. Four tests looked for the temp folder's path, as tempfile gives it, in text that rune wrote. rune writes the canonical path. On the runner TEMP is `C:\Users\RUNNER~1\AppData\Local\Temp`, a short name, and the canonical path has the long one. The tests now look for the canonical path. `relative_root_selects_an_open_session_by_artifact` built its relative root by dropping the first component of each path. On Windows that left `\Users\...`, which is read on the current drive. The runner has the checkout on `D:` and the temp folder on `C:`. The helper now builds a path with no root, and the test prints `skipped` and returns when the two folders are on different drives, where no relative path exists. Three adopt tests rename a folder they have just written into. With the suite on two cores, Windows refused one rename with "Access is denied". The tests now try a refused rename again for up to five seconds. Which program held a file open is not known. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
Two tests in tests/hook_dispatch.rs start `sh` handlers under the default deadline of 500 ms: `a_firing_records_what_a_passive_event_s_merge_discarded` and `a_firing_records_the_context_cursor_s_stop_has_no_field_for`. Git for Windows starts `sh` far slower than a Unix system does. With the suite on one core both read `timed out` where they expect a record. They now write 20 seconds for each handler and 30 for each event, as `dcg_judges_cursor_s_shell_tool_through_the_dispatcher` does. Six tests in tests/hook_wrap.rs ran the turn wrapper under its default deadline of 1200 ms. A wrap is a snapshot and a commit: a handful of jj processes. On this Windows machine one wrap takes about 270 ms. With the temp folder on a hard disk, or with eight tests on one core, the six tests read `turn-wrap failed: timed out after 1200 ms` where they expect the wrap. They now give the wrapper 15 seconds and the stop event 20, as PATIENT_WRAPPER already did for one test. They test what the wrapper does, not its deadline. The product default stays 1200 ms, and `a_first_touch_keeps_its_key_when_the_snapshot_runs_past_the_timeout` still runs under it. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The section had the build fixes of pull request 86 only. It now has the fixes of pull request 87 and of this branch, as a user of rune.exe sees them, and the planned tag date, 2026-11-19. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
|
review/correctness round 1 started on |
|
Claude finished @Runewright[bot]'s task in 3m 3s —— View job Review
Looks good. The Windows canonical form drops the 260-character cutoff so a folder and a deep file inside it share one form, and a path only the What I checked:
Notes, nonblocking:
|
Runeseer review — cleanLooks good. The head is unchanged since the last review, and the Windows canonical form still gives a drive or share path one length-independent form, erroring on a path only
No open findings · Reviewed |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
review/correctness round 2 started on |
|
Claude finished @N4M3Z's task in 2m 20s —— View job Review
Looks good. The head has not moved since the last round, and the recheck holds: a drive or share path gets one length-independent plain form, and a path only What I rechecked:
Notes, nonblocking:
|
Make the Windows test job pass on a GitHub runner, and fix the fault the reviewer found in pull request 87: a canonical path had two forms on Windows, by its length.
Plan
Pull request 87 merged with its Windows job red. Four tests compared the temp folder as written with the canonical path rune prints, and a runner's temp folder is a short name,
C:\Users\RUNNER~1\.... The same pull request gave a canonical path of 260 characters or more the\\?\form and a shorter one the plain form, so a folder and a file deep inside it did not compare as prefix and rest. This change gives every path on a drive or a share the plain form and makes the tests compare canonical paths. On Unixcanonicalizeis stillfs::canonicalize.Pull requests 86 and 87 merged without release notes, and
scripts/compile-release-notesbuilds the 0.7.1 release body from the pull request bodies alone. So the Release Notes below are the whole 0.7.1 section ofCHANGELOG.md, the fixes of 86 and 87 included.Changes
src/folders.rsand its copy inrune-docs/src/support.rs: the\\?\prefix comes off whatever the length, and a path Windows reads as another file without the prefix is anInvalidInputerror.src/cli/state.rs, so it prints with one kind of separator.display_relativeinsrc/cli/adopt/review.rs: its parts joined with/gaveC:/\/moduleon Windows and//tmp/moduleon Unix.src/cli/install/tests.rs, intests/init.rs, and intests/install_freshness.rs.relative_root_selects_an_open_session_by_artifactinsrc/cli/adopt/tests.rswhen the temp folder is on another drive than the checkout, and retry a folder rename that Windows refuses for a moment.tests/hook_wrap.rsandtests/hook_dispatch.rstheir own deadlines. The product defaults stay 500 ms and 1200 ms.CHANGELOG.md.Testing
9bcfcbc: theTestworkflow passed on Windows (cargo test --locked --workspace, 734 s) and on Linux (1262 s), andcontractpassed onmacos-latestandubuntu-latest.cargo test --locked --workspaceon Windows 11 with Rust 1.100.0: 2600 passed, 0 failed, 146 ignored. Run three ways: with the temp folder as a short name, with the temp folder on another drive, and on one core with eight test threads.cargo clippy --all-targets --all-features -- -D warningsandcargo fmt --checkclean on Windows.cargo test --locked --workspace --all-featureson Linux, Ubuntu 26.04 in WSL: 2970 passed, 10 failed. The 10 needmakeorunzip, which that distribution lacks.Draft Openquality checks: passed on the second attempt. The first attempt failed in the pre-push stage after 4 minutes and its log was not read.cargo testnot run. Only thecontract (macos-latest)check ran there.cargo test --all-featureson Windows: 5 tests intests/dotrune_git.rsfail onfile://sources. The Windows job does not use that feature, andmainwas not checked.Release Notes
rune install,deploy,drift,prune,doctor,validate, andspecwork on Windows. Hooks,rune execof a shell script, andrune sign queuestill need a Unix shell./on Windows.rune installrefused every skill there, andrune doctorreported every deployed file as an orphan.HOMEon Windows, as git does there.rune.exeread only the profile folder of the account, so nothing could point it at another home.\\?\prefix and with one kind of separator, and namerune, notrune.exe, in the usage line.\\?\form can name: one with a part that is a device name such asNUL, or that ends in a dot or a space.\and the drive colon.rune signfrom the system on Windows, which has no/dev/urandom.rune.exethe stack size of the Linux and macOS builds. A debug build overflowed its stack.rune adopt. It printedC:/\/moduleon Windows and//tmp/moduleelsewhere.x86_64-pc-windows-msvcdid not compile.gix,jsonschema, and the dashboard and terminal UI dependencies on every platform. They sat in the Unix-only dependency table withnix.🤖 Generated with Claude Code
Note
Fix Windows path canonicalization and list Windows fixes in 0.7.1 changelog
canonical_formhelper in folders.rs and support.rs. On Windows it canonicalizes the path as UTF-16, strips the verbatim prefix from drive and UNC share paths (including long paths), and returnsInvalidInputwhen the plain form fails the component checks (reserved device names, trailing dot or space).state.dirin state.rs build the state directory with the platform-aware join helper instead of a forward-slash string.display_relativein review.rs show out-of-root paths as whole paths instead of joining components with/.InvalidInputfor paths whose plain form fails the checks inpart_looks_plain(e.g. components likeCONor trailing dots), where the old code kept the verbatim form.Macroscope summarized 9bcfcbc.