-
Notifications
You must be signed in to change notification settings - Fork 30.3k
fix(turbo-tasks-backend): use correct TaskDataCategory for is_immutable check #88331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **430 kB** → **430 kB** ✅ -26 B82 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
|
Tests Passed |
Merging this PR will not alter performance
Comparing Footnotes
|
…le check The `is_immutable()` function was using `self.task.contains_key()` directly instead of going through the `has_key()` method which enforces `check_access()`. This means the Immutable flag (stored in Meta category) could be read without ensuring the Meta category data was actually loaded. Additionally, a call site checking immutability during task completion was using `TaskDataCategory::Data` when it should use `TaskDataCategory::Meta` since `Immutable` is stored in the Meta category. Changes: - Move `is_immutable()` to be a default implementation on the TaskGuard trait using `has_key()` which calls `check_access()` - Fix task completion immutability check to use `TaskDataCategory::Meta` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
fa8d88f to
3ac147f
Compare
Merge activity
|

Fix task immutability check by using correct TaskDataCategory
What?
This PR fixes a bug in the task immutability check by ensuring we use
TaskDataCategory::Metainstead ofTaskDataCategory::Datawhen checking if dependent tasks are immutable.Why?
The immutable flag is stored in the Meta category, but we were incorrectly checking the Data category. This could prevent us from reading the immutable flag if Meta hadn't been restored for the task.
How?
TaskDataCategory::DatatoTaskDataCategory::Metawhen reading tasks where we neededimmutabilityis_immutable()implementation fromTaskGuardImplto theTaskGuardtrait with a default implementation that useshas_key(&CachedDataItemKey::Immutable {})which enforces correct access modes