Skip to content

availableLanguages: batch verifier (report + self-heal) #9525

Description

@tanflem

Parent

Sub-issue of #9515 (Rebuild Video.availableLanguages as one cycle-safe, recursively-correct source of truth).

What to build

A batch verifier job, following this codebase's existing reconciliation-worker pattern (paginated/resumable, not a single unbounded pass), walks the catalog level-batched, recomputes every video's availableLanguages from source data via the shared recompute engine, diffs against the stored value, and reports mismatches. It can also self-heal (write the corrected value) rather than only report. This closes the loop on the whole spec: instead of hoping every write path is complete, drift can be proven present or absent, and repaired, on demand.

This is deliberately last — running it before every writer is actually fixed would just surface the still-open bugs as expected noise rather than real signal.

Acceptance criteria

  • Running the verifier against a catalog with a deliberately seeded mismatch (a video whose stored availableLanguages doesn't match what its current variants/children imply) reports that mismatch.
  • Running the verifier against a catalog with no mismatches reports clean, with no false positives.
  • Self-heal mode writes the corrected value for a detected mismatch.
  • The traversal is batched level-by-level (all nodes at a given depth fetched in one query), not one query per video.
  • The verifier is resumable/paginated, consistent with this codebase's existing reconciliation-worker pattern, not a single unbounded pass that must complete in one run.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions