You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(signals): avoid retrying settled errors on dependency checks - #5260
Mounting an optimistic row can pull an already-errored memo. The dependency check recomputed that memo merely because its error came from an earlier cycle; its existing upstream reads then retried the failed request and held the row on an unrelated fetch.
Only retry a pending dependency in this check. Dirty computations, tracked re-reads by existing readers, and explicit refreshes retain their retry paths. This preserves the distinction between a new reader and a re-read (F-9), treats an error as an answer (D-41), and avoids observable extra work from a lazy pull (D-22).
Add four DOM tests covering plain and optimistic sources, an unchanged failed source while a new row mounts, and explicit recovery to empty and nonempty lists. Include a patch changeset.
The only cross-referenced PR is merged downstream solidjs/reactivescript#94. It records the Solid bug and its reproduction; it does not fix Solid's runtime. No matching open Solid implementation PR was found.
How did you test this change?
Ran the final four regression/control cases with the implementation fix removed:
The failing cases observed an unexpected second b request; the plain-source controls passed. Restored the fix, rebuilt the signals and Solid JS artifacts, then ran:
@codspeed/* 5.4.0 is only tested on Node.js 18, 20, and 22, so your Node.js 24 measurements may be inaccurate. Upgrade your @codspeed/* packages to 6.0.0 or later.
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
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
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 #5195.
Mounting an optimistic row can pull an already-errored memo. The dependency check recomputed that memo merely because its error came from an earlier cycle; its existing upstream reads then retried the failed request and held the row on an unrelated fetch.
Only retry a pending dependency in this check. Dirty computations, tracked re-reads by existing readers, and explicit refreshes retain their retry paths. This preserves the distinction between a new reader and a re-read (F-9), treats an error as an answer (D-41), and avoids observable extra work from a lazy pull (D-22).
Add four DOM tests covering plain and optimistic sources, an unchanged failed source while a new row mounts, and explicit recovery to empty and nonempty lists. Include a patch changeset.
The only cross-referenced PR is merged downstream solidjs/reactivescript#94. It records the Solid bug and its reproduction; it does not fix Solid's runtime. No matching open Solid implementation PR was found.
How did you test this change?
Ran the final four regression/control cases with the implementation fix removed:
The failing cases observed an unexpected second
brequest; the plain-source controls passed. Restored the fix, rebuilt the signals and Solid JS artifacts, then ran:pnpm --filter @solidjs/signals testpnpm --filter @solidjs/web exec vitest run test/optimistic-failed-read-5195.spec.tsx test/errored-store-memo-boundary-reask-5002.spec.tsx test/for-row-latest-reask-fails-4998.spec.tsxpnpm exec prettier --check packages/signals/src/core/core.ts packages/web/test/optimistic-failed-read-5195.spec.tsx .changeset/optimistic-failed-read.mdnpm --prefix scripts/size run sizeNo browser visual verification was performed. The complete web, SSR, hydration, and integration suites were not run.
Public API changes
None. No new exports, parameters, options, or type signatures.
AI assistance
Prepared with AI assistance from Devin (Cognition AI).