Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 2a5ec09 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
dipankarmaikap
marked this pull request as draft
November 19, 2026 18:50
A read with non-preload intent consuming a cache entry fetched under preload intent bumped the entry stamp on every read and wrote that fresh stamp to the entry's version signal after the reading scope had already tracked it. The reading memo re-ran per flush pass, re-adopted the still-pending preload promise, and dev attribution reported the superseded flights as ABANDONED_FLIGHTS. Record the handoff on the entry (cached[3] = intent) so it happens once, and update the version signal before the current read tracks it — the bump still notifies other consumers, but no longer the reader performing the handoff.
dipankarmaikap
force-pushed
the
fix/query-preload-handoff-abandoned-flights
branch
from
November 19, 2026 18:54
430aa0f to
2a5ec09
Compare
dipankarmaikap
marked this pull request as ready for review
November 19, 2026 18:59
This was referenced Nov 20, 2026
ryansolid
added a commit
that referenced
this pull request
Nov 20, 2026
…ce (#739) (#743) Regression test from #740. It fails before #742 (the memo ran 5 times) and passes after it. Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Roel Bruggink <roel@jaroel.nl>
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.
A
query()entry fetched underpreloadintent (hover/focus link preload) is later consumed by a real read undernavigateintent. The reuse branch performed that handoff on every read:cached[3]is never updated, so each navigate-intent read bumps the stamp to a newDate.now()and writes it to the very signal the reading memo just tracked. The memo self-notifies, re-runs on the next flush pass, hits the same branch, bumps again… until the ms clock repeats a value and the equal write becomes a no-op. Each re-run re-adopts the still-pending preload promise, so dev attribution counts it as a superseded flight:This reproduces on the solid-v2/fullstack template with no modifications: run the dev server, then on
/usersrest the pointer on a user link for a moment (the preload starts) and click. Whenever the preload fetch is still in flight at click time — first hit in dev while the server function compiles, or any throttled network — the console warns for both theuserandmememos on/users/:id, andwhyDidRunshows each re-running 5–8 times within ~10 ms. A direct click without a preceding hover never hits the branch, which is why the warning looks sporadic.The fix is to perform the handoff once: bump the stamp, record it on the entry (
cached[3] = intent), and update the version signal before the current read tracks it. Other consumers still learn the preload was consumed; the scope performing the handoff no longer notifies itself. The non-handed navigate write stays as it was (equal value, so a no-op) — nothing changes for entries not flagged"preload", and the bundleddist/copies in the published package build from this source either way.After the fix the consuming memos run exactly once per navigation — the template's
/users/:idpage navigates with no warnings and no re-runs in the capture window.vitest runpasses 761/761 andtest:typesis clean.