Skip to content

fix: clear lens cache on re-bootstrap#5

Merged
msilivonik-sc merged 2 commits intomainfrom
ms/fix-lens-cache-on-rebootstrap-cache-fix
Apr 3, 2026
Merged

fix: clear lens cache on re-bootstrap#5
msilivonik-sc merged 2 commits intomainfrom
ms/fix-lens-cache-on-rebootstrap-cache-fix

Conversation

@msilivonik-sc
Copy link
Copy Markdown
Collaborator

Summary

  • Fix stale lens references after SDK re-initialization: the lens cache retained objects from the old lensRepository, causing fetchLens to return lenses bound to a destroyed kit instance
  • Clear lensCache and reset lenses state at the start of the bootstrap effect, before the new kit is created

Test plan

  • New test: "should clear lens cache on re-bootstrap" — verifies that after a stabilityKey change triggers re-bootstrap, previously cached lenses are evicted and fetchLens calls the new kit's loadLens
  • Full test suite passes

msilivonik-sc and others added 2 commits April 3, 2026 12:38
The lens cache retained references from the old kit's lensRepository
after re-bootstrap, causing fetchLens to return stale objects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@msilivonik-sc
Copy link
Copy Markdown
Collaborator Author

msilivonik-sc commented Apr 3, 2026

@jciereszko-sc That was already reviewed in #4, but it was merged not into main but into another branch and I didn't want to mix the changes, so I reverd that merge and therefore there is this PR.

@msilivonik-sc msilivonik-sc merged commit c315e96 into main Apr 3, 2026
1 check passed
@msilivonik-sc msilivonik-sc deleted the ms/fix-lens-cache-on-rebootstrap-cache-fix branch April 3, 2026 19:55
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.

2 participants