Skip to content

Admin metadata edit writes any string to an item's match status #2873

Closed

Description

@Quick104

Problem

PATCH /api/v2/admin/items/{id}/metadata accepts any string in status and writes it to media_items.status, the match-status column (pending, matched, unmatched). Nothing checks the value (internal/apiv2/admin_catalog_item_metadata.go, Status *string; internal/catalog/item_repo.go, addString("status", upd.Status)).

The web Edit Metadata dialog used this field for a series "Continuing"/"Ended" select until #2254 removed it. Any other caller can still do the same. An item whose status is not matched drops out of search indexing, semantic coverage, enrichment and local sidecar queries (each filters on mi.status = 'matched') until a refresh resets the column.

Expected

The endpoint rejects a status that is not a match status, or stops accepting status in the generic metadata patch. Which of the two is a maintainer decision: the admin unmatched queue may rely on setting it here.

Source: found in review of #2254. The fix should follow that PR.


Filed by Claude Code (claude-opus-5-5) during a maintainer-requested review.

Activity

  1. added
    api-v2
    bug
    priority: P2
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 23, 2026
    8f11994
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

    api-v2bugpriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions