Define precise disableCache trigger points for uncacheable operations
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, rust
- Domain
- build-system, tooling
Research direction
Trace the Vite HTTP server start/listen path, watcher start path, generic server creation/configuration paths, and vite_task_client::Client::disable_cache(). Verify that cacheable Vitest run mode performs neither listening nor watching, while API/server and watch modes opt out at their operation boundaries. After the semantics are covered, revert the no-op workaround from PR #481 and restore the effective client request.
Written by the indexing model from the issue text.
Description
Problem
disableCache() currently has an imprecise contract in practice. Tool integrations can call it while configuring a server because the configuration may later lead to an uncacheable operation. That is too early.
The observed failure mode is Vite/Vitest: a task can create a Vite server for transforms or test execution without actually listening on a port or watching the filesystem. If disableCache() fires during server/config setup, cacheable tasks such as vitest run are reported as Not cached: the task opted out of caching even though no uncacheable operation happened.
Principle
disableCache() should be called immediately before the concrete operation that makes the task uncacheable, not when reading configuration that might eventually lead to such an operation.
Concrete examples:
- Listening on a port should disable caching immediately before the listen/bind operation.
- Observing the filesystem should disable caching immediately before the watcher starts observing paths.
- Creating/configuring an object that might later listen or watch should not disable caching by itself.
Temporary workaround
PR #481 makes vite_task_client::Client::disable_cache() a no-op so false opt-outs stop affecting downstream task caching while the real fix is designed and shipped.
Real solution
Move the Vite/Vitest integration points to operation boundaries:
- In Vite, call
disableCache()from the HTTP server start/listen path immediately before binding a port. - In Vite, call
disableCache()from the watcher start path immediately before filesystem observation begins. - Do not call
disableCache()from generic server creation/config resolution paths. - Verify Vitest
runwithout watch/API does not listen or watch and therefore remains cacheable. - Verify Vitest API/server mode and watch mode still opt out because they perform uncacheable operations.
After those semantics are implemented and covered, revert the vite-task client no-op workaround and restore disableCache() as an effective client request.
- Dominant language
- Rust
- Stars
- 466
- Forks
- 42
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/vite-task
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
voidzero-dev/vite-task#738 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
voidzero-dev/vite-task#719 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
voidzero-dev/vite-task#717 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
voidzero-dev/vite-task#702 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
voidzero-dev/vite-task#700 · 2 comments ·
All issues in voidzero-dev/vite-task
Similar issues
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
n0-computer/iroh#4550 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
paritytech/zombienet-sdk#591 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
farion1231/cc-switch#7638 · 1 comment ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100