Skip to content

Harden book metadata identity matching and audiobook enrichment eligibility #510

Closed

Description

@Quick104

Problem

Audiobook, ebook, and manga enrichment can permanently attach metadata from the wrong provider work when a search result is accepted without enough identity evidence. Audiobook enrichment can also remain idle when scanner-supplied cover art is treated as proof that provider enrichment already ran.

Scope

  • Select book metadata candidates only when title and volume evidence is credible.
  • Require provider results to agree before combining identities.
  • Reject positive author contradictions before provider metadata is merged.
  • Prevent durable provider IDs owned by another item from being claimed, and retry persistence conflicts safely.
  • Classify provider failures consistently so retryable and rate-limited failures are not stamped as clean no-matches.
  • Make audiobook eligibility depend on missing provider identity rather than missing cover art.
  • Keep ebook search queries free of trailing series furniture while retaining the raw title for identity validation.

Acceptance criteria

  • Wrong-volume, unrelated-title, cross-provider, author-mismatch, and provider-ID ownership cases have regression coverage.
  • Unicode titles and author initials are compared correctly.
  • Transient provider or identity-store failures remain retryable and do not terminally persist metadata.
  • Audiobooks with embedded covers but no provider identity are eligible for enrichment.
  • Focused metadata and book-enrichment tests pass.

Tracking scope for #496; production measurements and reproduction evidence remain in that PR.

AI Disclosure

  • Tool(s): T3 Code (Codex harness)
  • Model(s): gpt-5.6-sol
  • Involvement: fully AI-generated issue text from the reviewed PR scope and verified code diff
  • Adversarial review: the Standards review found the missing issue disclosure; it was added before updating the PR.

Activity

  1. Tobechukwu-Njoku commented on Aug 24, 2026

    @Tobechukwu-Njoku
    Contributor

    This looks complete on main — #520 ("fix(metadata): gate book enrichment on a credible match, and drain the no_match backlog") merged 2026-08-20 without closing keywords, so the issue stayed open.

    Checked against main at 820eef77, against the scope list:

    • Credible title/volume evidence before selecting a candidate — internal/metadata/match_admission.go introduces SearchMatchAdmissionRequest / SearchMatchAdmission, described in-source as "the shared policy inputs used by book enrichers when admitting one provider's search response", applying title credibility as an admission gate rather than accepting the top hit.
    • Reject positive author contradictions — internal/metadata/author_match.go adds AuthorsAgree, with personNamesMatch, sharesInitial and isSubsequence behind it.
    • Unicode titles and author initials compared correctly — normalisePersonName and foldDiacritics in the same file, plus sharesInitial for the initials case.
    • Durable provider IDs owned by another item can't be claimed — ProviderIDConflict in match_admission.go is documented as identifying "either a durable identity owned by another item or a candidate that contradicts this item's existing provider ID", and ProviderIDAdmission is documented as containing "only identities that are safe to merge".
    • Audiobook eligibility on missing provider identity, not missing cover art — internal/audiobooks/enrichment_state.go is new and carries the eligibility bookkeeping.
    • Consistent provider-failure classification / retryable failures — SearchMatchAdmissionStatus exists to explain "why a provider candidate was or was not admitted", and fix(metadata): gate book enrichment on a credible match, and drain the no_match backlog #520 added internal/ebooks/enrichment_queue.go for the backlog drain.

    Tests pass on main:

    ok  github.com/Silo-Server/silo-server/internal/metadata
    ok  github.com/Silo-Server/silo-server/internal/ebooks
    ok  github.com/Silo-Server/silo-server/internal/manga
    

    I verified the modules and behavior exist rather than auditing each regression case named under "Acceptance", so if you want the wrong-volume / cross-provider / provider-ID-ownership cases confirmed individually that's worth a maintainer's eye before closing.

  2. Quick104 commented on Sep 4, 2026

    @Quick104
    ContributorAuthor

    Fixed on main by #520.

    The merged book-enrichment work superseded #496 and #514 and includes credible title/volume admission, author validation, provider-identity ownership checks, retry handling, and audiobook eligibility based on provider identity rather than cover art.

    Current main routes audiobook and ebook enrichment through the shared admission checks. The focused admission, identity-conflict, ownership-failure, and author-matching tests pass.

    Closing as completed after checking current main (a4c8f4b2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions