Repository navigation
Conversation
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
from
November 28, 2026 04:49
297ebcc to
ecbc3ce
Compare
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
3 times, most recently
from
November 28, 2026 04:59
2d67721 to
8c84032
Compare
…-device sentinel probe Co-authored-by: Gemini 4 Neon <noreply@google.com>
wan9chi
force-pushed
the
fspy-linux/5-nested-fspy-detection
branch
from
November 28, 2026 05:07
8c84032 to
e970d5c
Compare
…5-nested-fspy-detection
…5-nested-fspy-detection
Read the nested probe path with user_path and match the new loss tests against UntrackedReason::Incomplete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5-nested-fspy-detection
…5-nested-fspy-detection # Conflicts: # crates/fspy_preload_linux/src/main.rs
…5-nested-fspy-detection # Conflicts: # crates/fspy/tests/macos_preload.rs # crates/fspy/tests/untracked_fallback.rs # crates/fspy_preload_linux/src/main.rs
…5-nested-fspy-detection
This branch has not been deployed
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
When a cached
vp runtask invokes a nestedvp runsubprocess (for example, through a wrapper script or package script), attempting to install a second automatic file-access tracker inside an already-tracked process either fails (on Linux, where#1029removes the Linux-onlymincore/process_vm_readvprobe and rejects nestedfspy_preload_linuxmappings withEEXIST) or duplicates interception and breaks outer tracking (on macOS and Windows).Summary
fspy_shared::probe): Define hardcoded random-GUID sentinel paths beneath the OS null device (/dev/null/fspy_probe_92e41940-369e-42f1-876f-a8e2a614fbf2on Linux and macOS,\??\NUL\fspy_probe_92e41940-369e-42f1-876f-a8e2a614fbf2on Windows).fspy_elf_loader+fspy_preload_linux): AddSyscallAction::Return(isize)and short-circuitSysno::faccessatmatching the sentinel path toOk(SyscallAction::Return(0))without recording aPathAccess.fspy_preload_macos): Short-circuitfaccessatmatching the sentinel path to return0without recording aPathAccess.fspy_preload_windows): Short-circuitNtQueryAttributesFilematching the sentinel path to zero-fillFILE_BASIC_INFORMATIONand returnSTATUS_SUCCESSwithout recording aPathAccess.fspy):faccessat/NtQueryAttributesFile, cached process-wide inOnceLock<bool>.UntrackedReason::Nestedinstead ofUntrackedReason::Incomplete.vt):CacheNotUpdatedReason::NestedTracking/SavedCacheNotUpdatedReason::NestedTrackingexplaining that automatic file tracking is already active in a parent task and that configuringinputandoutputmanually still enables caching on the nested task.vpbinary (without the sentinel probe interceptor) spawns a newer innervp, the sentinel probe will not be intercepted and will fall back to the existing behavior.Stacked on #1029.
Note
Medium Risk
Touches automatic file-tracking and cache eligibility on all supported OSes, but behavior is narrowly scoped (detection + untracked delegation) with new tests and clear fallbacks.
Overview
Adds cross-platform nested automatic file-tracking detection so a
vp runinvoked inside an already-tracked cached task does not install a second tracker. Innerfspyprobes a shared null-device sentinel path (fspy_shared::probe); when the outer preload short-circuits that probe, the inner instance spawns children untracked and surfacesUntrackedReason::Nestedinstead of treating the run as incomplete or breaking outer tracking.Platform preloads learn to answer the sentinel without logging a
PathAccess(LinuxSyscallAction::Returnonfaccessat, macOSfaccessathook, WindowsNtQueryAttributesFile).TrackingIncompletebecomesUntrackedReasonwith distinctIncompletevsNestedvariants wired through cache update and user messaging (NestedTrackingexplains that the parent task still records accesses and manualinput/outputcan cache the nested task).Includes integration tests for nested
fspyand an e2enested_vt_runfixture verifying outer cache hits and that inner runs do not pollute the inner task cache.Reviewed by Cursor Bugbot for commit db836d4. Bugbot is set up for automated code reviews on this repo. Configure here.