Skip to content

fspy auto input-tracking misses Bun subprocess file reads — cached tasks replay stale results #532

Description

@beorn
bunx -p vite-plus@0.2.4 vp run probe:read   # data.txt = v1   (live)
echo v2 > data.txt
bunx -p vite-plus@0.2.4 vp run probe:read   # data.txt = v1   ← STALE, "◉ cache hit, replaying"

probe:read = bun -e "console.log(readFileSync('data.txt','utf8'))", no declared input:.

fspy auto-tracking never observes Bun subprocess file reads, so the cache key omits real inputs — cached tasks replay stale output. Silent stale greens are the worst failure mode for a gate runner. Bun is a vp-managed PM/runtime, so in scope; likely cause: bun's I/O bypasses the interposed libc symbols.

Repro: https://github.com/beorn/repro-vite-plus-bunx-shim ("Issue B"; the repo also hosts voidzero-dev/vite-plus#2123 — independent defects).

Workaround: declared input: globs invalidate correctly (verified).

Ask: observe bun children (hooks / ptrace-class), or fail closed — don't cache results whose reads weren't observable; at minimum document the limitation. Related: #504, #364.

We couldn't find an open parent/tracking issue for Bun runtime support in vp run (the earlier bun issue arc closed when package-manager support shipped) — if you'd like one, happy to help scope it. First-class Bun runtime support would be very valuable for us: we're mid-evaluation moving a large Bun monorepo onto Vite+.

Env: vp 0.2.4, managed bun 1.3.14, macOS arm64.


Disclosure: prepared with help from Claude Fable (Anthropic) as part of our Bun-monorepo → Vite+ effort; verified with live runs and human-reviewed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions