Repository navigation
refactor(fspy): carry paths inside access variants - #848
Merged
wan9chi merged 3 commits intoOct 13, 2026
Merged
Conversation
A record was one path plus a mode, which leaves no room for accesses that touch more than one path, such as a rename from one path to another. PathAccess is now an enum whose variants hold their own paths. The wire bytes are unchanged: a one-byte tag, then the path. Consumers work on accesses instead of path-to-mode maps. AccessMode remains only for interceptions, which decide the mode before the path is resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wan9chi
added this pull request to stack #849
October 13, 2026 04:43
…py-access-paths # Conflicts: # crates/fspy_shared/src/ipc/mod.rs
fspy benchmarklinuxmacoswindows |
Exec resolution only ever reports reads, so its callbacks now take a plain path and their callers build PathAccess::Read. AccessMode is left at the clients' open entry points, where an interception chooses the kind before the path is resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Motivation
fspy may later track accesses that touch more than one path, such as a rename from one path to another. A record of one path plus one mode can't express that, and neither can consumers that keep a map from path to mode.
Changes
PathAccessis now an enum whose variants hold their own paths:Read(path),Write(path),ReadWrite(path),ReadDir(path). An access with two paths becomes one more variant. The wire bytes don't change: a one-byte tag, then the path.PathAccess::paths()yields every path an access touched, for checks like "did anything touch this path".TrackedPathAccessesmatches on each variant.assert_contains(&accesses, path, PathAccess::Read).fspy_e2ewrites one line per distinct access.AccessModeis no longer sent and stays only at the clients' open entry points, where an interception chooses the kind before the path is resolved.AccessMode::with_pathbuilds the record. Exec resolution reports plain paths, andfspyre-exportsIpcPathinstead ofAccessMode.🤖 Generated with Claude Code