Skip to content

fix(cache): stop skipping dist in directory listings - #919

Open
wan9chi wants to merge 2 commits into
feat/cache-created-symlinksfrom
fix/cache-dist-in-listings
Open

wan9chi wants to merge 2 commits into
feat/cache-created-symlinksfrom
fix/cache-dist-in-listings

Conversation

@wan9chi

@wan9chi wan9chi commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Motivation

Every directory listing skips an entry named dist, a workaround so that a tool listing the folder holding its own dist doesn't miss on a clean checkout. It helps no other folder name and hides a dist that does matter. A dist folder appearing in a folder the task listed goes unseen, and the next run replays stale output: oxlint, for example, passes from the cache after a dist folder with lint errors appears.

Changes

Listings skip only ., .. and .DS_Store. A task's own dist doesn't need the skip anymore, since #915 makes a rebuildable folder an ignored entry. No other snapshot changes.

E2E cases: dist_appears_in_listed_folder (synthetic, vtt list-dir) and oxlint_dist (oxlint -D no-debugger). Both are false hits today and correct misses after.

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
Touches cache input fingerprinting for all tasks that list directories; behavior change is intentional but could shift hit/miss rates for workflows that relied on ignoring unrelated dist folders.

Overview
Directory listings used to drop every entry named dist, so a dist folder that appeared or vanished in a listed directory never changed the cache fingerprint and the next run could replay stale cached output (e.g. oxlint still passing after dist/bad.js showed up).

should_ignore_entry in post-run fingerprinting now skips only ., .., and .DS_Store. A dist the task itself wrote is still excluded from listings via the existing rebuildable-entry logic from #915, not a hard-coded name.

E2E snapshots dist_appears_in_listed_folder and oxlint_dist lock in a cache miss when an external dist appears.

Reviewed by Cursor Bugbot for commit 5b6b3b8. Bugbot is set up for automated code reviews on this repo. Configure here.

@wan9chi
wan9chi added this pull request to stack #920 October 30, 2026 03:17
@wan9chi
wan9chi force-pushed the fix/cache-dist-in-listings branch from 7df8d21 to 0d60891 Compare October 30, 2026 03:19
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  +0.02%  [ -2.56% ..  +2.84%]  overhead   +53.67%
dynamic/access             change  +0.00%  [ -2.41% ..  +4.32%]  overhead   +21.34%
dynamic/access-relative    change  +0.00%  [ -2.06% ..  +1.20%]  overhead   +70.57%
dynamic/access-contended   change  -0.76%  [ -5.52% ..  +4.68%]  overhead    +8.56%
static/launch              change  +0.74%  [ -2.63% ..  +3.79%]  overhead  +192.20%
static/access              change  +0.03%  [ -0.83% ..  +0.74%]  overhead +1445.93%
static/access-relative     change  +0.50%  [ -0.65% ..  +1.44%]  overhead +1990.97%
static/access-contended    change  +0.32%  [ -0.63% ..  +1.19%]  overhead +1895.76%

macos

dynamic/launch             change  -0.08%  [ -2.81% ..  +2.80%]  overhead  +227.29%
dynamic/access             change  -0.79%  [ -3.41% ..  +2.38%]  overhead    +3.03%
dynamic/access-relative    change  +0.00%  [ -3.60% ..  +2.65%]  overhead  +256.77%
dynamic/access-contended   change  +0.19%  [ -3.15% ..  +8.27%]  overhead    +4.15%

windows

dynamic/launch             change  +0.63%  [ -2.20% ..  +4.37%]  overhead   +25.81%
dynamic/access             change  +0.00%  [ -0.76% ..  +0.93%]  overhead    +1.11%
dynamic/access-relative    change  +0.18%  [ -0.54% ..  +0.91%]  overhead    +1.26%
dynamic/access-contended   change  +0.36%  [ -1.06% .. +12.46%]  overhead    +1.44%

@wan9chi
wan9chi force-pushed the fix/cache-dist-in-listings branch from 0d60891 to dbd1644 Compare October 30, 2026 04:06
@wan9chi
wan9chi force-pushed the fix/cache-dist-in-listings branch from dbd1644 to 4e828d2 Compare October 30, 2026 06:31
@wan9chi
wan9chi force-pushed the fix/cache-dist-in-listings branch from 4e828d2 to 992cd6a Compare October 30, 2026 07:08
…unseen

Two cases for a task that lists a folder in which a `dist` folder it
didn't write appears later. In `dist_appears_in_listed_folder`, the task
lists the package root with `vtt list-dir .` and prints its entries. In
`oxlint_dist`, `oxlint -D no-debugger` lints a package whose `.gitignore`
lists `node_modules` but not `dist/`, like a GitHub Action that commits its
built `dist/`: it lists the package root, `src` and, once there, `dist`,
and reads the files in them.

Today every listing skips an entry named `dist`, so a new `dist` folder
in the listed root goes unseen and the next run is a cache hit: the
first case replays the old listing without `dist`, and the second passes
although `dist/bad.js` holds a `debugger` statement.

The oxlint fixture ignores `node_modules` as a real package would;
otherwise oxlint walks into vp's task cache in `node_modules/.vite`,
whose files change between runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every directory listing fingerprint skipped an entry named `dist`, a
workaround so that a tool listing the folder holding its own `dist` output
folder didn't miss on a clean checkout. It helped no other folder name and
hid a `dist` that does matter: a `dist` folder appearing in or
disappearing from a folder the task listed went unseen, and the next run
was a cache hit replaying stale output, like `oxlint` passing after a
`dist` folder with lint errors appeared in a package that commits its
built `dist/`.

Listings now skip only `.`, `..` and `.DS_Store`. A task's own `dist`
output folder doesn't need the skip anymore: a folder holding only what
the task can rebuild is an ignored entry of the listing, so it may be
missing. No other snapshot changes, including `typescript_out_dir` and
`astro_empty_collections`, whose tasks list the folder holding their own
`dist`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wan9chi
wan9chi force-pushed the fix/cache-dist-in-listings branch from 992cd6a to 5b6b3b8 Compare November 1, 2026 11:55
@wan9chi wan9chi added ci: full Run the slow CI jobs (macOS x64, musl) on this pull request and removed ci: full Run the slow CI jobs (macOS x64, musl) on this pull request labels Nov 1, 2026

This branch has not been deployed

No deployments
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