Skip to content

fix: prevent prompt embed cache eviction KeyError - #37

Merged
wayrise merged 1 commit into
mainfrom
fix/prompt-embed-cache-eviction
Sep 23, 2026
Merged

wayrise merged 1 commit into
mainfrom
fix/prompt-embed-cache-eviction

Conversation

@wayrise

@wayrise wayrise commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix _BoundedPromptEmbedCache raising KeyError on its first LRU eviction.
  • Evict the oldest key with the base OrderedDict.__delitem__ implementation so the overridden __getitem__ is not dispatched during eviction.
  • Add a regression test covering eviction, LRU recency, and one-time warning behavior.

Validation

  • ruff check openwam/ scripts/ tests/ docker/: passed.
  • make test: 2010 passed, 13 skipped, 21 deselected.
  • Full pytest -q: 2066 passed, 17 skipped, 1 warning.
  • Pre-commit hooks: passed.

@wayrise
wayrise merged commit f6d9f10 into main Sep 23, 2026
3 checks passed
@wayrise
wayrise deleted the fix/prompt-embed-cache-eviction branch September 23, 2026 15:49
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.

3 participants