Windows fspy reports the workspace root as a read-write overlap and prevents caching
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- bun, rust
- Lĩnh vực
- devtools, operating-systems, testing-qa
Hướng nghiên cứu
Bắt đầu trong crates/vite_task/src/session/execute/tracked_accesses.rs và cache_update.rs, theo dõi TrackedPathAccesses::from_raw và quan sát observe_fspy để hiểu cách đường dẫn rỗng tương đối với workspace trở thành một phần chồng lấp. Tái hiện trường hợp Windows vite_task_bunx_wrapper::vite_task_bunx_wrapper và kiểm tra việc theo dõi truy cập Windows xung quanh cây tiến trình Bun thực tế. Công việc hoàn tất khi một bài kiểm thử hồi quy duy trì việc theo dõi đầu vào của thư mục gốc, trong khi một truy cập không làm thay đổi workspace აღარ còn ngăn việc caching.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
A cached task using the default automatic input and output inference completes successfully on Windows, but Vite Task refuses to store the cache entry because fspy reports the workspace root as both read and written.
The same fixture completes without this cache diagnostic on Linux and macOS.
Reproduction
This was captured by a real cross-platform Vite+ snapshot test added while working on voidzero-dev/vite-plus#2151.
- Failed Windows CI job: https://github.com/voidzero-dev/vite-plus/actions/runs/29151101121/job/86540717812
- Vite+ diagnostic commit: https://github.com/voidzero-dev/vite-plus/commit/919ed21669917a0e6e9d9a51167e7fb621f99bb9
- Vite Task revision used by that Vite+ build:
cb580c214bb2314fc1f633a3812782c9b3a1d956 - Failing test:
vite_task_bunx_wrapper::vite_task_bunx_wrapper
The fixture used a real managed Bun 1.3.14 installation rather than a mocked executable. Its configured task was equivalent to:
export default {
run: {
tasks: {
'gate:test': {
command: 'bun probe',
},
},
},
}
The package script executed a real package binary through Bun:
{
"scripts": {
"probe": "bunx --bun probe"
},
"dependencies": {
"probe-bin": "file:./probe-bin"
},
"devEngines": {
"packageManager": {
"name": "bun",
"version": "1.3.14",
"onFail": "download"
}
}
}
The snapshot steps were:
vp install
vp run gate:test
vp run --last-details
The command itself succeeded:
$ bun probe
$ bunx --bun probe
probe binary ran
Only the Windows run then reported:
vp run: vite-task-bunx-wrapper#gate:test not cached because it modified its input.
[1] vite-task-bunx-wrapper#gate:test: $ bun probe ✓
→ Not cached: read and wrote ''
The empty relative path is the workspace root. Re-running the task cannot hit the cache because no entry was stored.
Expected behavior
The task should be cacheable when the process tree does not actually modify an inferred input. In this fixture, a subsequent identical run should be able to hit the cache.
Actual behavior
On Windows, fspy reports the workspace root as both read and written. Vite Task treats the empty workspace-relative path as an input/output overlap and skips the cache update.
Analysis
TrackedPathAccesses::from_raw strips the workspace root from absolute paths. An access to the root itself therefore becomes an empty RelativePathBuf, which is retained in both path_reads and path_writes:
observe_fspy then performs an exact intersection between the inferred read and write path sets. The empty path is returned as read_write_overlap, causing CacheNotUpdatedReason::InputModified:
One possible source of the false positive is the Windows access-mode mapping. The Windows preload records the requested access mask when intercepting NtCreateFile/NtOpenFile, before forwarding the real call. Directory access rights share bit values with FILE_WRITE_DATA and FILE_APPEND_DATA, so opening a directory with the capability to add children may be classified as a write even when the process does not mutate it.
The existing diagnostic only contains the aggregated path. It does not identify the originating PID/process, access mask, create disposition/options, or whether the intercepted call succeeded, so the exact syscall in the Bun process tree is not yet known.
A regression test should preserve real root-directory input tracking while ensuring that a directory-handle access which does not mutate the workspace does not make an otherwise cacheable Windows task permanently uncacheable.
- Ngôn ngữ chính
- Rust
- Star
- 466
- Fork
- 42
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 21
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-task
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
voidzero-dev/vite-task#738 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
voidzero-dev/vite-task#719 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#717 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
voidzero-dev/vite-task#702 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#700 · 2 bình luận ·
Tất cả issue của voidzero-dev/vite-task
Issue tương tự
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
paritytech/zombienet-sdk#591 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
farion1231/cc-switch#7638 · 1 bình luận ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100