Skip to content

feat(indexing): add bulk video indexing command and coordinator (#68) - #157

Merged
tulayha merged 1 commit into
grayhatdevelopers:codex/bulk-index-integrationfrom
aimerscrypto:feat-bulk-video-indexing
Sep 14, 2026
Merged

tulayha merged 1 commit into
grayhatdevelopers:codex/bulk-index-integrationfrom
aimerscrypto:feat-bulk-video-indexing

Conversation

@aimerscrypto

Copy link
Copy Markdown
Contributor

Closes #68

Summary

Adds bulk indexing capabilities to VidXP for both selected media assets and all eligible catalog items.

Changes

  1. Bulk Indexing Coordinator (src/vidxp/bulk_indexing.py):

    • Added run_bulk_index coordinator with BulkIndexItemResult and BulkIndexSummary data models.
    • Paginates catalog records via application.list_media to resolve all eligible items when --all is requested.
    • Inspects active_snapshot.generations to skip previously indexed media unless re-indexing is explicitly forced.
    • Runs indexing sequentially with ApplicationError isolation so single item failures do not halt remaining jobs.
    • Supports progress hooks (on_item_start, on_item_progress, on_item_complete) and --detach queueing.
  2. CLI Command (src/vidxp/cli_commands/index.py):

    • Added vidxp index bulk command supporting positional media IDs, --all, --reindex, --detach, --json, and standard index options (--modality, --frame-stride, etc.).
    • Interactive Rich progress tracking and summary table rendering.
    • Emits clean JSON when machine-readable output is requested.
    • Exits with status code 1 if any items fail.
  3. Tests (tests/test_bulk_indexing.py):

    • Added 26 unit and CLI tests covering pagination, skip detection, error resilience, forced re-indexing, and Typer runner execution.

Verification

  • uv run --with ruff ruff check . passed cleanly.
  • uv run --no-sync python -m pytest -q tests/test_bulk_indexing.py passed (26/26 tests).
  • Verified input guards, --help, and non-existent media error handling locally.

@tulayha
tulayha changed the base branch from main to codex/bulk-index-integration September 14, 2026 11:34
@tulayha

tulayha commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

I鈥檝e moved this PR to codex/bulk-index-integration so we can combine it with #158 before merging into main.

We鈥檒l keep your reusable runner, indexing options, progress callbacks and detached submission, and use #158鈥檚 preview plan and skip reasons. I鈥檒l handle the integration, including checking the saved content and indexing configuration before skipping a video, and keeping the job ID when indexing fails so it can be retried.

Both contributions will be retained. You鈥檙e welcome to review the combined result once it鈥檚 ready.

@tulayha
tulayha merged commit ad301b6 into grayhatdevelopers:codex/bulk-index-integration Sep 14, 2026
2 checks passed
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.

Add bulk video indexing

2 participants