Skip to content

docs(changelog): list the Windows fixes of 0.7.1 - #88

Merged
N4M3Z merged 6 commits into
mainfrom
change/windows-tests-on-the-runner
Nov 23, 2026
Merged

N4M3Z merged 6 commits into
mainfrom
change/windows-tests-on-the-runner

Conversation

@runewright

@runewright runewright Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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 Unix canonicalize is still fs::canonicalize.

Pull requests 86 and 87 merged without release notes, and scripts/compile-release-notes builds the 0.7.1 release body from the pull request bodies alone. So the Release Notes below are the whole 0.7.1 section of CHANGELOG.md, the fixes of 86 and 87 included.

Changes

  • Give a canonical path one form in src/folders.rs and its copy in rune-docs/src/support.rs: the \\?\ prefix comes off whatever the length, and a path Windows reads as another file without the prefix is an InvalidInput error.
  • Join the state folder one part at a time in src/cli/state.rs, so it prints with one kind of separator.
  • Show a path outside the module root whole in display_relative in src/cli/adopt/review.rs: its parts joined with / gave C:/\/module on Windows and //tmp/module on Unix.
  • Compare canonical paths in two tests of src/cli/install/tests.rs, in tests/init.rs, and in tests/install_freshness.rs.
  • Skip relative_root_selects_an_open_session_by_artifact in src/cli/adopt/tests.rs when the temp folder is on another drive than the checkout, and retry a folder rename that Windows refuses for a moment.
  • Give eight hook tests in tests/hook_wrap.rs and tests/hook_dispatch.rs their own deadlines. The product defaults stay 500 ms and 1200 ms.
  • List the Windows fixes of 0.7.1 in CHANGELOG.md.

Testing

  • CI on head 9bcfcbc: the Test workflow passed on Windows (cargo test --locked --workspace, 734 s) and on Linux (1262 s), and contract passed on macos-latest and ubuntu-latest.
  • cargo test --locked --workspace on 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 warnings and cargo fmt --check clean on Windows.
  • cargo test --locked --workspace --all-features on Linux, Ubuntu 26.04 in WSL: 2970 passed, 10 failed. The 10 need make or unzip, which that distribution lacks.
  • Draft Open quality checks: passed on the second attempt. The first attempt failed in the pre-push stage after 4 minutes and its log was not read.
  • macOS: cargo test not run. Only the contract (macos-latest) check ran there.
  • cargo test --all-features on Windows: 5 tests in tests/dotrune_git.rs fail on file:// sources. The Windows job does not use that feature, and main was not checked.

Release Notes

  • Make rune install, deploy, drift, prune, doctor, validate, and spec work on Windows. Hooks, rune exec of a shell script, and rune sign queue still need a Unix shell.
  • Write manifest keys with / on Windows. rune install refused every skill there, and rune doctor reported every deployed file as an orphan.
  • Follow HOME on Windows, as git does there. rune.exe read only the profile folder of the account, so nothing could point it at another home.
  • Print a path on Windows without the \\?\ prefix and with one kind of separator, and name rune, not rune.exe, in the usage line.
  • Treat a file more than 260 characters deep as inside its folder on Windows. rune wrote the two paths in different forms, and a check that a path stays inside a folder gave the wrong answer.
  • Refuse a path on Windows that only the \\?\ form can name: one with a part that is a device name such as NUL, or that ends in a dot or a space.
  • Match a session exclusion against the working folder on Windows. An excluded session was captured.
  • Keep a project-scope target under the home folder on Windows. Its key held \ and the drive colon.
  • Draw the seal nonce of rune sign from the system on Windows, which has no /dev/urandom.
  • Give rune.exe the stack size of the Linux and macOS builds. A debug build overflowed its stack.
  • Show an artifact outside the module root with its whole path in rune adopt. It printed C:/\/module on Windows and //tmp/module elsewhere.
  • Build for Windows again. The 0.7.0 release build for x86_64-pc-windows-msvc did not compile.
  • Read a file's identity on Windows from an open handle, as the volume serial number and the file index, so the spec transaction can tell a replaced file from the one it hashed.
  • Skip the directory flush on Windows, where a directory does not open as a file. Spec transactions no longer fail there when they sync a directory.
  • Compile gix, jsonschema, and the dashboard and terminal UI dependencies on every platform. They sat in the Unix-only dependency table with nix.

🤖 Generated with Claude Code

Note

Fix Windows path canonicalization and list Windows fixes in 0.7.1 changelog

  • Adds a platform-specific canonical_form helper 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 returns InvalidInput when the plain form fails the component checks (reserved device names, trailing dot or space).
  • Makes state.dir in state.rs build the state directory with the platform-aware join helper instead of a forward-slash string.
  • Makes display_relative in review.rs show out-of-root paths as whole paths instead of joining components with /.
  • Adds Windows-friendly test fixes: a retrying folder-rename helper in tests.rs, relaxed hook deadlines in hook_dispatch.rs and hook_wrap.rs, and canonicalization of temp paths before path assertions in the install and init tests.
  • Updates the 0.7.1 changelog in CHANGELOG.md to list these Windows fixes and correct the release date to 2026-11-19.
  • Behavioral Change: Windows canonicalization can now return InvalidInput for paths whose plain form fails the checks in part_looks_plain (e.g. components like CON or trailing dots), where the old code kept the verbatim form.

Macroscope summarized 9bcfcbc.

Claude Fable 5.2 (claude-fable-5-2) and others added 6 commits November 19, 2026 02:18
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>
@github-actions github-actions Bot added area:docs auto: documentation and markdown size:large auto: changed-lines bucket labels Nov 23, 2026
@runeseer

runeseer Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 1 started on 9bcfcbcf at ledger generation 1.

@runeseer

runeseer Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @Runewright[bot]'s task in 3m 3s —— View job


Review

  • Read the lane inputs and the controller ledger
  • Review origin/main...HEAD (6 commits, 11 files)
  • Judge the other lanes' findings
  • Write the verdict, findings, and summary files

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 \\?\ form can name now returns InvalidInput instead of leaking a verbatim path.

What I checked:

  • src/folders.rs:76 — canonical_form strips the prefix for a drive or a share only, and falls back to a filesystem round-trip (fs::canonicalize(&plain) == verbatim) whenever a part looks like a device, a trailing dot, or a trailing space. The UTF-16 path means a non-Unicode name gets the same treatment rather than silently keeping its prefix. COM0/LPT0 and CONIN$/CONOUT$ are now in the device list, and the conservative direction of part_looks_plain only ever costs an extra canonicalize, never a wrong answer.
  • rune-docs/src/support.rs:166 — the same logic, kept in step with src/folders.rs.
  • src/cli/adopt/review.rs:1929 — display_relative no longer joins the components of a non-prefixed path, which is what produced C:/\/module and //tmp/module. The under-root branch still goes through manifest::slash_lossy, so the string used for the --artifact selector comparison at src/cli/adopt/review.rs:717 is unchanged.
  • src/cli/state.rs:16 — folders::join keeps one separator in the printed state folder.
  • The test changes (short-name temp folders, cross-drive skip in relative_path, the PATIENT_WRAPPER deadlines, the move_folder rename retry) relax environment assumptions without weakening an assertion.

Notes, nonblocking:

  • display_relative prints \ for a path outside the module root and / for one inside it. The doc comment states this, so it reads as a choice rather than a slip.
  • The pull request body is still the template text, so the Plan, Changes, and Testing sections state nothing about the six commits.
  • cargo test is outside this session's allowed tools, so the new tests were read, not executed.
    • change/windows-tests-on-the-runner

@runeseer

runeseer Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Runeseer review — clean

Looks 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 \\?\ can name.

  • The copy in rune-docs/src/support.rs stays in step with src/folders.rs.
  • display_relative prints \ outside the module root and / inside it; its doc comment says so.
  • Codex code and security reviews were still running; neither is required here.

No open findings · Reviewed 9bcfcbcf · review run · $1.17 · 2m20s · 24 turns

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earned approval: review/correctness returned a clean verdict for 9bcfcbc at ledger generation 1. Dismissed automatically on any new push or generation.

@N4M3Z
N4M3Z marked this pull request as ready for review November 23, 2026 14:46
@N4M3Z
N4M3Z self-requested a review as a code owner November 23, 2026 14:46
@N4M3Z
N4M3Z merged commit abe1d59 into main Nov 23, 2026
41 of 43 checks passed
@N4M3Z
N4M3Z deleted the change/windows-tests-on-the-runner branch November 23, 2026 14:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T14:46:48.183843Z 9bcfcbc Draft marked ready
🔒 Security Review ✅ Completed 2026-11-23T14:47:56.366640Z 9bcfcbc Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runeseer

runeseer Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

review/correctness round 2 started on 9bcfcbcf at ledger generation 1.

@runeseer

runeseer Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @N4M3Z's task in 2m 20s —— View job


Review

  • Read the lane inputs and the controller ledger
  • Review the diff at 9bcfcbc (11 files, base a6befa31)
  • Judge the other lanes' findings
  • Write the verdict, findings, and summary files

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 \\?\ can name returns InvalidInput instead of leaking a verbatim path.

What I rechecked:

  • src/folders.rs:76 — canonical_form strips the prefix for a drive or a share only, and falls back to a filesystem round-trip (fs::canonicalize(&plain) == verbatim) when a part looks like a device, a trailing dot, or a trailing space. The UTF-16 path gives a non-Unicode name the same treatment. part_looks_plain errs toward the extra canonicalize, so COM0/LPT0 cost a syscall, never a wrong answer.
  • rune-docs/src/support.rs:166 — the same logic, line for line with src/folders.rs.
  • src/cli/adopt/review.rs:1929 — display_relative no longer joins the components of a non-prefixed path, which produced C:/\/module and //tmp/module. The under-root branch still goes through manifest::slash_lossy, so the string compared against the --artifact selector at src/cli/adopt/review.rs:717 is unchanged.
  • src/cli/state.rs:16 — folders::join splits on / and extends one part at a time, so the printed state folder carries one separator.
  • The test changes (canonical temp folders, the cross-drive skip in relative_path, the PATIENT_WRAPPER deadlines, the move_folder rename retry) relax environment assumptions. No assertion is weakened; the retry loop still panics once its five seconds run out.

Notes, nonblocking:

  • display_relative prints \ for a path outside the module root and / for one inside it. The doc comment states this.
  • Codex code review and security review were still running at 9bcfcbc. Neither is required for this verdict.
  • cargo test is outside this session's allowed tools, so the tests were read, not executed. The pull request records the Test workflow green on Windows and Linux at this head.
    · change/windows-tests-on-the-runner

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earned approval: review/correctness returned a clean verdict for 9bcfcbc at ledger generation 1. Dismissed automatically on any new push or generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs auto: documentation and markdown size:large auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant