Repository navigation
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
d7c8a30 to
78b8ee8
Compare
fspy benchmarklinuxmacoswindows |
78b8ee8 to
922a074
Compare
922a074 to
2166c58
Compare
2166c58 to
b81c7bb
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b81c7bb. Configure here.
Two cases for a task whose output folder holds an empty folder it made. In `empty_folder_in_output`, the task makes `out/empty`, writes `out/a.txt` and stats `out`, through `vtt fs`. In `astro_empty_collections`, `astro build` (Astro 6, added to `packages/tools`) on a one-page site makes `.astro/collections` and leaves it empty, next to the `.d.ts` files it writes in `.astro`, and stats both folders. Today a folder holding an empty folder isn't rebuildable, since mkdir isn't recorded, so removing it, as on a clean checkout, is a cache miss. Astro needs Vite 7, so a scoped `astro>vite` override keeps the global `vite` override from handing it the Vite+ fork. esbuild and sharp, which Astro depends on, get their prebuilt binaries as optional dependencies, so their build scripts are skipped. The Astro case removes `.astro`, `dist`, `node_modules/.astro` and `node_modules/.vite/deps`, not all of `node_modules/.vite`, which holds the task cache too, and recreates nothing, as on a clean checkout. Several inputs are then missing, and vt names whichever its parallel validation finds first, so the next step redacts its miss reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A task that makes a folder and leaves it empty, like `astro build` making `.astro/collections`, pinned the folder holding it as an input: fspy recorded nothing for a mkdir, so the empty folder wasn't rebuildable, and the archive held only files, so a hit couldn't recreate it. Removing the folder, as on a clean checkout, was a cache miss. fspy now records the path of a mkdir as a mkdir, a new access kind, before the call, so a failed call, like one finding the folder there already, is recorded too: - Unix preload: `mkdir` and `mkdirat`. - Linux seccomp supervisor, for static binaries: `mkdirat`, plus `mkdir` on x86_64. - Windows: `NtCreateFile` with `FILE_DIRECTORY_FILE` and `FILE_CREATE` or `FILE_OPEN_IF`, where `CreateDirectoryW` ends. These opens were recorded as reads; a mkdir isn't one on Unix either. `Rebuildable` takes the mkdirs that are empty folders after the run (`.DS_Store` aside) as rebuildable folders and climbs from them too, so a folder holding only such folders, rebuildable folders and files the task wrote is rebuildable. The archive gets directory entries for the empty folders, filtered by output exclusions and `ignoreOutput` like files, and restoring recreates them. A folder holding anything needs no entry, since what it holds recreates it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b81c7bb to
e038c4c
Compare

Motivation
A task that makes a folder and leaves it empty can't be rebuilt by a hit today;
astro build, for example, makes.astro/collections. fspy records nothing formkdir, and the archive holds only files, so the folder holding the empty one stays pinned and a clean checkout misses.Changes
mkdiras a new access kind,Mkdir, before the call. This covers the Unix preload, the Linux seccomp supervisor and WindowsNtCreateFilecreating a directory; on Windows those calls were recorded as reads.E2E cases:
empty_folder_in_output(synthetic) andastro_empty_collections(astro buildwith Astro 6.4.8, added topackages/toolswith a scopedviteoverride; true clean checkout).Part of a stack that lets automatic tracking cache tasks which read their own outputs and list the folders holding them, so they also hit on a clean checkout.
🤖 Generated with Claude Code
Note
Medium Risk
Changes cross-platform fspy interception and cache fingerprint/archive replay logic; incorrect tracking would cause false hits or misses, though the PR adds substantial unit and e2e tests.
Overview
Automatic file tracking now records paths created without a normal open:
Mkdirfor directory creation,RenameTargetfor rename destinations, and hard-link destinations as writes. This is wired through Unix seccomp/preload, WindowsNtCreateFile/NtSetInformationFile, and new IPCPathAccessvariants (recorded even when the syscall fails).Task cache builds on those signals in
Rebuildable: empty post-runmkdirfolders are outputs and skip input fingerprinting; folder renames expand to the files underneath for archiving and “may be missing” validation; gone temp dirs the task wrote in are treated like rebuildable outputs. Outputtar.zstarchives now include explicit empty directory entries, and cache restore recreates them.E2E coverage adds
empty_folder_in_outputandastro_empty_collections(Astro 6 in dev deps); existing rename/Vitest snapshot fixtures now expect cache hits after deleting outputs.Reviewed by Cursor Bugbot for commit e038c4c. Bugbot is set up for automated code reviews on this repo. Configure here.