Skip to content

perf: accelerate imports and harden large-library recovery - #137

Merged
DeusExTaco merged 12 commits into
developfrom
feature/import-scan-performance
Sep 4, 2026
Merged

perf: accelerate imports and harden large-library recovery#137
DeusExTaco merged 12 commits into
developfrom
feature/import-scan-performance

Conversation

@DeusExTaco

Copy link
Copy Markdown
Contributor

Summary

  • Speeds up Mylar and folder imports with resource-aware bounded archive inspection, batched persistence, cached metadata reads, and bounded Step 4 work scheduling.
  • Makes scan, import, recovery, and post-import metadata progress truthful and durable, including correct current-item completion and ETA handling.
  • Preserves trusted import decisions while isolating malformed archives, conflicting identities, stale source files, and other exceptions instead of invalidating otherwise successful series.
  • Adds safe in-app revalidation to Retry failed for completed Mylar and folder imports, so changed sources can recover without an operator CLI workflow or a full rescan.
  • Refreshes the exact, time-bounded Grype exception after the DHI zlib package revision changed from dhi2 to dhi3; the High-severity container gate remains enabled.

Why

Large, long-lived Mylar libraries exposed avoidable provider work, archive-inspection bottlenecks, misleading progress, and recovery paths that required too much manual intervention. This keeps successful imports usable while making exceptional files easier and safer to retry.

This work advances #112 while retaining explicit review for ambiguous or unsafe source material.

Validation

  • make ci-full
  • Python: 10,607 passed, 13 skipped, 1 xfailed; 90.51% coverage
  • Accessibility: 23 passed
  • Chromium E2E: 543 passed, 2 skipped
  • Firefox E2E: 543 passed, 2 skipped
  • DHI image build, runtime security verification, blocking Grype High scan, and 7 container smoke tests passed

Review notes

  • The scan worker budget is intentionally capped and resource-aware rather than an unconstrained process/thread increase.
  • Changed source files are re-inspected for containment, readability, archive safety, and saved identity before retry; successful files and series are not replayed.
  • The zlib exception remains limited to CVE-2026-85091, exact dhi3 package revisions, and the existing 2026-10-04 re-review deadline.

Adam Hernandez added 9 commits September 2, 2026 22:27
Use container-aware inspection budgets for Mylar and folder imports, batch review-row inserts, and skip impossible singleton duplicate checks. Cache repeated page-title parsing and bound Step 4 task submission while preserving safety, cancellation, and rollback ownership.

Correct current-item completion and unknown ETA rendering. Add regression tests, benchmark controls, and runtime timing/resource evidence. Validated with make ci-full: 10,519 Python tests, 90.49% coverage, Chromium/Firefox, accessibility, container security, and Docker smoke tests.
Calculate Mylar scan ETA from completed source batches, preserve progress across review phase transitions, and batch safety-only review summaries without hiding remaining work.

Add regression coverage and realistic multipage scale fixtures while preserving source archives and import safety decisions.
Keep fractional metadata and file progress for Step 4 ETA calculations instead of deriving remaining time from rounded display percentages. Use a fresh execution clock for remaining work after pause or restart while preserving elapsed-time reporting.

Cover large imports and large single groups across live updates, durable snapshots, and background progress for both Mylar and folder imports.
Publish the current recovery snapshot instead of stale preparation state after completion. Send worker progress directly to the shared activity feed so updates do not depend on modal polling.

Add regression coverage for live progress, completed and partial recoveries, failure state, and activity expiration.
Batch and cache ComicVine profile, catalog, and issue requests so visible library metadata hydrates first while ComicInfo enrichment continues independently. Disable manual metadata refresh during initial synchronization and validate deferred archive targets before mutation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d2eb2d95e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pullbox/services/import_review_recheck.py
Comment thread src/pullbox/services/import_catalog_hydration.py
Comment thread src/pullbox/services/import_comicinfo_enrichment.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T20:21:36.109959Z 6d2eb2d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DeusExTaco DeusExTaco added the ci:full Run the full CircleCI PR gate label Sep 4, 2026
Comment thread src/pullbox/core/issue_numbers.py Fixed
Comment thread src/pullbox/providers/metadata/comicvine.py Dismissed
@DeusExTaco
DeusExTaco merged commit 1e35d01 into develop Sep 4, 2026
30 checks passed
@DeusExTaco
DeusExTaco deleted the feature/import-scan-performance branch September 4, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the full CircleCI PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants