Post-mutation refetch can commit SWR-stale bodies (reaction live update flake) #41
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #31 verification. The thread GET uses ccSWR (private, max-age=0, stale-while-revalidate=60). After a mutation, the explicit reload() refetch and the SSE-frame refetch race: Chrome serves the pre-mutation body with status 200 from disk cache (fromDiskCache=true, observed via CDP), and with no ordering guard in web/src/lib/data.js the stale commit can land last, leaving the timeline stale until the next event. Reproduced ~6/10 runs against the local standalone stack (disk 99% full slows cache reads into losing positions). Evidence: CDP net log [201 reactions, 200 cached=true, 200 cached=false] with DOM stuck pre-mutation; deterministic-fresh with Network.setCacheDisabled. Candidate fix (own vehicle, cross-cutting: comments/patches share the path): bypass HTTP cache on mutation-triggered refetches and/or treat SDK 304 as silent keep-current instead of ReposError(304) into the tray.
Fix PR: #52 (branch fix/issue-41) — ordering/generation guard + cache-bypass on mutation refetches + SDK 304 as silent keep-current. node suite 217/217 green; no merge (awaiting review).
Reviewed PR #52 (fix/issue-41) in scratch worktree at
2e15899. No fixes needed — no new branch pushed.VERIFIED (scratch worktree, removed afterward; main worktree untouched, read-only):
REVIEW FINDINGS (all checked, none blocking):
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #52 (review clean; 217/217 node tests), merged. Closing.