Skip to content

Release v0.3.4 - #5

Merged
brian-taylor-unity merged 1 commit into
mainfrom
release/v0.3.4
Dec 2, 2026
Merged

brian-taylor-unity merged 1 commit into
mainfrom
release/v0.3.4

Conversation

@brian-taylor-unity

Copy link
Copy Markdown
Collaborator

Upgrading

  • Goldens and worktrees made with v0.3.3 keep working.
  • Windows: keep ReFS dedup off on the volume that holds the project and its worktrees, and run doctor to see how many more worktrees fit. seed, new and hydrate can now fail with exit 2 and reason clone_copied where they used to report success after a byte copy (see Fixes). A script that branches on reason should handle it.

Added

  • .uwt-keep: a committed file at the root of the repo or workspace listing untracked paths that new keeps instead of cleaning, such as build output (AssetBundles, Assets/StreamingAssets/aa) that a warmup would otherwise rebuild in every worktree. One plain path per line, no globs. new reads the copy committed on the branch it checks out, so a branch can keep less; an untracked .uwt-keep is ignored. new names what it kept, and new --json reports it as kept. Kept files can be stale on a branch that changes what they are built from. Works for git and Plastic.
  • doctor on Windows estimates how many more worktrees fit under ReFS's limit of 8,176 references per block, from the reference counts of the golden's 32 largest Library files. It warns under 50 and fails at none.
  • measure reports compressed extents. On ReFS, extents left by dedup or compression have no physical address; they are now listed per tree as compressed (logical size) and kept out of allocated, private and shared, instead of being reported as unmapped. On btrfs, --json gains inline_bytes and encoded_extents. Existing keys are unchanged.

Fixes

  • Windows: a clone that robocopy turned into a byte copy is now refused. robocopy copies a file ReFS will not clone and still reports success. ReFS stops cloning a block at 8,176 references, and with dedup on, which spends most of them inside a single file, that came at the seventh worktree of a mid-size project: whole-file copies of its DataStore and ArtifactDB, reported as ready. seed, new and hydrate now read the reference counts of the 32 largest files each clone wrote, and if any was copied they fail with exit 2, reason clone_copied, and roll back. Cost: a few ms per file.
  • measure on btrfs: compressed extents were counted at their uncompressed length, which inflated allocated and could make a group larger than its whole tree, and files stored inline in metadata counted 4 KiB each. Compressed extent sizes are now estimated (an upper bound, within 1.4% of compsize when tested), inline files count their size, and the block size is read from the volume. Each byte counts once per tree, in one group, so the groups add up to the tree.
  • measure on Windows without --json failed under Windows PowerShell 5.1, i.e. on any machine without pwsh. Under PowerShell 7 it never printed the unmapped line.
  • The scripts ship executable. unity-worktree-cow.sh and measure.py were mode 644, so running them directly on macOS or Linux failed with Permission denied.
  • Troubleshooting no longer says to re-seed after ReFS error 347. A re-seed shares the source's blocks and does not reset the count.

Upgrading

- Goldens and worktrees made with v0.3.3 keep working.
- Windows: keep ReFS dedup off on the volume that holds the project and its worktrees, and run doctor to see how many more worktrees fit. seed, new and hydrate can now fail with exit 2 and reason clone_copied where they used to report success after a byte copy (see Fixes). A script that branches on reason should handle it.

Added

- .uwt-keep: a committed file at the root of the repo or workspace listing untracked paths that new keeps instead of cleaning, such as build output (AssetBundles, Assets/StreamingAssets/aa) that a warmup would otherwise rebuild in every worktree. One plain path per line, no globs. new reads the copy committed on the branch it checks out, so a branch can keep less; an untracked .uwt-keep is ignored. new names what it kept, and new --json reports it as kept. Kept files can be stale on a branch that changes what they are built from. Works for git and Plastic.
- doctor on Windows estimates how many more worktrees fit under ReFS's limit of 8,176 references per block, from the reference counts of the golden's 32 largest Library files. It warns under 50 and fails at none.
- measure reports compressed extents. On ReFS, extents left by dedup or compression have no physical address; they are now listed per tree as compressed (logical size) and kept out of allocated, private and shared, instead of being reported as unmapped. On btrfs, --json gains inline_bytes and encoded_extents. Existing keys are unchanged.

Fixes

- Windows: a clone that robocopy turned into a byte copy is now refused. robocopy copies a file ReFS will not clone and still reports success. ReFS stops cloning a block at 8,176 references, and with dedup on, which spends most of them inside a single file, that came at the seventh worktree of a mid-size project: whole-file copies of its DataStore and ArtifactDB, reported as ready. seed, new and hydrate now read the reference counts of the 32 largest files each clone wrote, and if any was copied they fail with exit 2, reason clone_copied, and roll back. Cost: a few ms per file.
- measure on btrfs: compressed extents were counted at their uncompressed length, which inflated allocated and could make a group larger than its whole tree, and files stored inline in metadata counted 4 KiB each. Compressed extent sizes are now estimated (an upper bound, within 1.4% of compsize when tested), inline files count their size, and the block size is read from the volume. Each byte counts once per tree, in one group, so the groups add up to the tree.
- measure on Windows without --json failed under Windows PowerShell 5.1, i.e. on any machine without pwsh. Under PowerShell 7 it never printed the unmapped line.
- The scripts ship executable. unity-worktree-cow.sh and measure.py were mode 644, so running them directly on macOS or Linux failed with Permission denied.
- Troubleshooting no longer says to re-seed after ReFS error 347. A re-seed shares the source's blocks and does not reset the count.

@elbert-s-perez elbert-s-perez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving at b2f8f93. I read the script and workflow changes; all eleven checks are green, including the two new ReFS jobs. I did not run the tests locally or try it on a ReFS volume, so the reference-count behaviour rests on your measurements.

Notes, none blocking:

  • .uwt-keep only ever spares files from the clean, and keep_load rejects globs, absolute paths, .. and .git, so a bad entry cannot widen what is deleted.
  • clone_copied is a behaviour change for callers that branch on reason; the Upgrading note covers it.
  • Small one: on the git path keep_matched is called without fold, so on a case-insensitive volume a kept path spelled with different case is still kept by git but may be missing from the kept report.

@brian-taylor-unity
brian-taylor-unity merged commit 50544e8 into main Dec 2, 2026
11 checks passed
@brian-taylor-unity
brian-taylor-unity deleted the release/v0.3.4 branch December 2, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants