Repository navigation
Conversation
When a CONFIG_GUESS node carries a pending or errored truth pass (_x._error) from its held source, a non-dirty dependency check in updateIfNecessary previously fell through to recompute(el) as a mainline truth pass. Reading the held truth source from an unrelated flush merged the guess hold into that flush, violating F-11 and D-33 and leaving newly mounted rows staged behind the unresolved hold while their on-screen owners had already been disposed. Skip the _x._error retry branch in updateIfNecessary when guessing && (el._config & CONFIG_GUESS) so the guess stands in for its own flight until it is actually dirtied or its lane settles. Fixes solidjs#5201 Co-Authored-By: Claude Code <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 4a40c00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
Fixes #5201.
When a
createOptimisticnode (CONFIG_GUESS) has an in-flight refresh on its underlying truth source, it holds_x._error(NotReadyError,STATUS_PENDING) while continuing to present its active optimistic guess. Previously,updateIfNecessaryretried any non-dirty node with_x._error && _time < clock && !_x._inFlight, which caused an unrelated flush (for example, checking a shared memo inREACTIVE_CHECKor mounting a reader of the guess) to re-runrecomputeon the guess node as a mainline truth pass. Reading the held truth source then merged the guess's held transaction into the unrelated flush, violating F-11 and D-33: newly mounted<For>rows stayed staged behind the unresolved hold while their visible owners were disposed, causing subsequent guesses to stop updating attributes on those rows.This change skips the non-dirty
_x._errorretry branch inupdateIfNecessarywhenguessing && (el._config & CONFIG_GUESS), so an active guess stands in for its own flight until it is actually dirtied or its lane settles. Non-guess pending memos keep their existing retry behavior, and theguessingguard preserves zero pay-for-use bundle impact (+0 Bminified).Public API changes: None.
How did you test this change?
packages/signals/tests/optimistic-guess-mounted-row-5201.test.tscovering both indirectREACTIVE_CHECKchecks through shared memos and direct reader mounts during an unrelated flush (verified failing before the fix and passing after).packages/web/test/optimistic-guess-mounted-row-5201.spec.tsx(verified failing with[false, false]before the fix and passing with[true, true]after).node packages/signals/scripts/rules-index.mjs --check, full workspace build (pnpm build), full test and typecheck suites across@solidjs/signals(7,324 tests),solid-js(942 tests), and@solidjs/web, Prettier formatting, and the CI bundle-size gate (scripts/size/gate.mjs,+0 Bminified).🤖 Generated with Claude Code