Skip to content

fix: copy filesystem walkers without shared traversal - #1031

Merged
andiwand merged 2 commits into
mainfrom
review/13-walker-copies
Oct 4, 2026
Merged

andiwand merged 2 commits into
mainfrom
review/13-walker-copies

Conversation

@andiwand

@andiwand andiwand commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Copying a disk-backed FileWalker copied a single-pass filesystem iterator, so advancing either walker also advanced the other. A copy now opens its own traversal and positions it at the same entry; equality compares traversal roots and positions.

Copying costs a replay from the walked directory. Normal traversal keeps its existing streaming behavior and memory use. This is preferable to eagerly snapshotting every directory for a rarely used copy operation.

One shared regression exercises independent copies at every position, including nested entries and the end, for both disk and virtual filesystems. Validation: 28 filesystem/file tests passed.

@andiwand
andiwand force-pushed the review/12-io-failures branch from 8f40d0f to c6b7c04 Compare October 4, 2026 20:44
Base automatically changed from review/12-io-failures to main October 4, 2026 20:46
andiwand and others added 2 commits October 4, 2026 22:47
filesystem.cpp throws std::runtime_error, and the test uses
std::filesystem and std::error_code. They compiled only through other
headers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
@andiwand
andiwand force-pushed the review/13-walker-copies branch from c8c444f to bed4ee2 Compare October 4, 2026 20:50
@andiwand
andiwand merged commit 2b35aa9 into main Oct 4, 2026
23 checks passed
@andiwand
andiwand deleted the review/13-walker-copies branch October 4, 2026 20:53
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.

1 participant