refactor(cache): rename execute cache_base_path to workspace_root#434
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8fda062 to
a22c31b
Compare
1d5bc23 to
7ed8c9d
Compare
a22c31b to
69fa227
Compare
The ExecutionContext field (and the execute_spawn parameter it feeds) was named `cache_base_path` but holds the workspace root that relative paths in cache entries anchor to. Rename it to `workspace_root`, matching the value it is given (self.workspace_path) and disambiguating from the session's `cache_root`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69fa227 to
1171b9e
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
crates/vite_taskhad two unrelated fields both namedcache_base_path, which was a trap for anyone reading across the cache code:session/mod.rs, it meant the cache directory — the parent of allvNschema-version subdirs.execute/mod.rs, it meant the workspace root — the directory that relative paths stored in cache entries (inputs, outputs, archives) are resolved against. It is literally set toself.workspace_path.Same name, opposite halves of the cache machinery (where the cache lives vs. what cached paths point at).
What
This PR renames the
executeone toworkspace_root, naming it for the value it actually holds and disambiguating it from the cache directory. The doc comment is updated to spell out the role. All 10 references (theExecutionContextfield and theexecute_spawnparameter it feeds) are renamed.The
sessionfield was renamed tocache_rootin the parent PR (#433), so after both PRs the two concepts read clearly:cache_rootvNcache dirscache_path…/v13)workspace_rootcache_dirPure rename + doc tidy; no behavior change.
cargo check -p vite_taskpasses.🤖 Generated with Claude Code