Context
The Batch is the unit of annotation work. Membership is editable only in draft; approval
freezes it and partitions it into jobs.
Deliverables
- State machine
draft → approved → in_annotation → completed with guarded transitions
(invalid transitions raise).
add_assets/remove_assets allowed only in draft.
approve(batch, partition=...) — partition strategies: single job (default), by size
("jobs of N assets"), by explicit segments. Jobs are an exact partition: disjoint,
union = batch. Schema version pinned for the whole batch at approval.
completed is derived: batch completes when all its jobs complete; only then are
annotated assets promoted to the Dataset (promotion itself in DatasetService).
- Asset exclusion during annotation (
skipped) is a recorded decision, never a removal.
Acceptance criteria
Context
The Batch is the unit of annotation work. Membership is editable only in
draft; approvalfreezes it and partitions it into jobs.
Deliverables
draft → approved → in_annotation → completedwith guarded transitions(invalid transitions raise).
add_assets/remove_assetsallowed only indraft.approve(batch, partition=...)— partition strategies: single job (default), by size("jobs of N assets"), by explicit segments. Jobs are an exact partition: disjoint,
union = batch. Schema version pinned for the whole batch at approval.
completedis derived: batch completes when all its jobs complete; only then areannotated assets promoted to the Dataset (promotion itself in DatasetService).
skipped) is a recorded decision, never a removal.Acceptance criteria