Skip to content

api: batch membership editing is not on the wire, and the gallery is now the caller #29 was waiting for #281

Description

@JArmandoAnaya

The gap

BatchService has add_assets and remove_assets. Neither is on the wire. #29 decided
that deliberately, and the reason it gave was a caller: "a batch is born from an ingest, and
curating one out of an arbitrary subset of assets has no caller until M5's gallery."

The batch-view redesign is that caller. Its bulk action bar wants a Delete frames control,
and there is no endpoint behind it — the only DELETE over assets anywhere in the contract is
DELETE /datasets/{dataset_id}/assets/{asset_id}, which curates the trunk, not a batch.

The split the redesign exposed, and it is the interesting half

"Remove this frame from the batch" means two different things depending on where the batch is
on its lifecycle, and only one of them is a membership edit:

  • draft — membership is still editable. BatchService.remove_assets is the operation,
    and it is the honest answer.
  • After approval — membership is frozen and remove_assets refuses, by design. Jobs
    are already partitioned against the pinned schema, and the partition is exact (disjoint,
    union = batch), so removing a member would invalidate the cut. The standing rule is that
    excluding an asset after approval is a per-asset skipped decision, never a membership
    removal.

So a UI offering one Delete frames button across both states would be offering an action
that is refused half the time. Whatever ships here has to carry that distinction, or the
screen has to draw two different controls.

What this issue is for

Decide and implement the wire surface for draft-batch membership editing:

Constraints

Filed out of the batch-view redesign, where Delete frames was cut for having no API behind it.

Activity

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

    apivisionset.server — REST API and OpenAPI contractenhancementNew feature or requestfrontendannotator / ui-core / app packageskernelvisionset.kernel — domain, ports, adapters, services

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions