Skip to content

Conversation

@Teagan42
Copy link
Contributor

What

  • wrap the IMDb retry queue in a tracked asyncio queue that keeps a deque-based snapshot for persistence
  • update the retry queue load/process/persist helpers and CLI setup to operate on the tracked structure
  • extend the loader retry unit tests to verify queued IDs remain after persisting and loading, and bump the project version

Why

  • accessing queue._queue relied on asyncio internals that could change; maintaining our own serialized view keeps persistence safe across Python versions

Affects

  • IMDb retry queue management within mcp_plex.loader
  • loader retry unit tests

Testing

  • uv run ruff check .
  • uv run pytest

Documentation

  • n/a

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

Copilot AI review requested due to automatic review settings September 23, 2025 14:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the IMDb retry queue to use a tracked queue structure that maintains persistence-safe serialization. Instead of relying on asyncio's internal _queue attribute, it introduces a custom _IMDbRetryQueue class that extends asyncio.Queue and maintains its own deque-based snapshot for safe persistence.

Key changes:

  • Introduces _IMDbRetryQueue class that wraps asyncio.Queue with deque-based tracking
  • Updates queue loading, processing, and persistence functions to use the new tracked structure
  • Adds validation for loaded JSON data format and enhanced test coverage

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
mcp_plex/loader.py Implements _IMDbRetryQueue class and updates queue management functions
tests/test_loader_unit.py Updates tests to use new queue class and adds snapshot verification
pyproject.toml Bumps project version to 0.26.29

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2025 14:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2025 14:52
@github-actions
Copy link

github-actions bot commented Sep 23, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
mcp_plex
   loader.py4172893%70, 73–74, 150, 179–183, 185–194, 205, 207–209, 225, 251, 652–654
   server.py3182193%107–108, 231, 459, 463, 485–491, 523, 533, 564–565, 582–583, 606, 609–610, 657, 694
TOTAL9164995% 

Tests Skipped Failures Errors Time
66 0 💤 0 ❌ 0 🔥 36.092s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2025 14:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2025 14:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Teagan42 Teagan42 merged commit 9c3e0d1 into main Sep 23, 2025
4 checks passed
@Teagan42 Teagan42 deleted the codex/refactor-imdb-retry-queue-management branch September 30, 2025 08:56
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