Skip to content

fix(ff-serv): SWR refresh bypasses adapter to call actual lookup#56

Merged
fdarian merged 4 commits intomainfrom
fix/swr-refresh-adapter-bypass
Feb 19, 2026
Merged

fix(ff-serv): SWR refresh bypasses adapter to call actual lookup#56
fdarian merged 4 commits intomainfrom
fix/swr-refresh-adapter-bypass

Conversation

@fdarian
Copy link
Copy Markdown
Owner

@fdarian fdarian commented Feb 19, 2026

Summary

  • SWR refresh was short-circuiting through the adapter (which still had data within TTL+SWR window) instead of calling opts.lookup for fresh data
  • Move refreshingKeys before EffectCache.makeWith so the lookup closure can reference it
  • Skip adapter hydration when the key is being refreshed, ensuring opts.lookup is always called during SWR refresh

Test plan

  • Added 3 new adapter tests (cold-start hydration, SWR refresh bypass, adapter update after refresh)
  • All 19 tests pass

Move refreshingKeys before EffectCache.makeWith so the lookup closure
can reference it, then skip adapter hydration when the key is being
refreshed.
@fdarian fdarian changed the title fix: SWR refresh bypasses adapter to call actual lookup fix(ff-serv): SWR refresh bypasses adapter to call actual lookup Feb 19, 2026
@fdarian fdarian merged commit c9dede2 into main Feb 19, 2026
3 checks passed
@fdarian fdarian deleted the fix/swr-refresh-adapter-bypass branch February 19, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant