Skip to content

Conversation

@Teagan42
Copy link
Contributor

Summary

  • add an async ensure_reranker helper that protects reranker initialization with a lock and asyncio.to_thread
  • update the media search tool to await the helper before reranking and reuse cached models
  • cover the async initialization path and concurrency with new unit tests

Testing

  • uv run pytest

https://chatgpt.com/codex/tasks/task_e_68eae14747cc83288e6b9cd9a097323d

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
mcp_plex/loader
   __init__.py1821194%139, 209, 323–325, 327, 416–435
   qdrant.py198299%338–343
   samples.py41393%55–57
mcp_plex/loader/pipeline
   enrichment.py5207586%234, 255–261, 314, 319, 350, 352, 359, 361, 461, 482, 502, 510–512, 515–519, 522–524, 532–537, 545, 596–597, 621, 679–680, 696, 723, 730, 732, 736, 788, 806, 818, 847, 853, 856–864, 890, 893–895, 912–914, 934–937, 941, 955–959, 981, 983, 986–988
   ingestion.py1551392%82, 133–153, 188, 225, 241, 334, 340, 358
   orchestrator.py95595%60, 136, 165, 188–189
   persistence.py130993%123, 165–166, 174, 185, 189–191, 240
mcp_plex/server
   __init__.py3952195%123, 129–132, 151, 157–159, 255, 317, 335–336, 344, 419, 513, 543, 562, 569, 588, 701
   cli.py62198%73
   config.py82199%59
   media.py2232191%159–165, 174–177, 215–222, 245, 279, 285, 291, 309–310
mcp_plex/server/tools
   media_library.py3371296%203, 576, 674, 693, 744, 795, 866, 956–960
TOTAL295117494% 

Tests Skipped Failures Errors Time
199 0 💤 0 ❌ 0 🔥 1m 21s ⏱️

@Teagan42 Teagan42 merged commit 10eb779 into main Oct 11, 2025
4 checks passed
@Teagan42 Teagan42 deleted the codex/add-async-helper-for-reranker-initialization branch October 11, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants