Skip to content

fix: clear lens cache on re-bootstrap#4

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

fix: clear lens cache on re-bootstrap#4
msilivonik-sc merged 2 commits intoms/fix-lens-cache-on-rebootstrapfrom
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 2, 2026 23:37
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 msilivonik-sc merged commit ad1d130 into ms/fix-lens-cache-on-rebootstrap Apr 3, 2026
@msilivonik-sc msilivonik-sc deleted the ms/fix-lens-cache-on-rebootstrap-cache-fix branch April 3, 2026 15:23
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