Batch auto-annotation: a dataset-level page runs the detector over every episode on worker threads, stages the proposals for review, commits in one go
The batch from the review of PR #1: "Run the detector over every episode
of a dataset and save all annotations to the Hub in one commit, with a
progress view and a list of episodes that failed or raised flags so the
reviewer knows where to look first." Starts from main (e3714c1).
- app/[org]/[dataset]/batch/: the page (a fixed route segment, so it wins
over [episode]); "Batch" at the right of the viewer's tab bar and a line
under the Auto-label panel lead to it. Range, raw-stream toggle, worker
count, Run / Stop, progress with an estimate, counters, a per-flag
histogram, the triage table (failed first, then the heaviest flags;
sort by episode; filter to flagged / failed / changed); every row opens
its episode on the Annotations tab. Stop leaves a resumable run: Resume
does only the episodes still owed, Rerun starts the range over.
- lib/annotateEpisode.ts: the single-episode pipeline as a plain function
(table series or raw sidecar series clipped to the episode, the
…
Interpretation layer (PR B): taxonomy, attempts, phantom and residual logic, hesitation, signal screen — behind a per-dataset opt-in and out of the default save path
The second half of the split asked for in the review of PR #1. Stacked
on PR A (this branch starts at its tip): the instrument module from PR A
is unchanged; this commit adds the interpretation layer and the profile
machinery it needs.
- src/lib/eventDetection.ts: the detector — grasp and transport anchors,
failed-attempt rules (air-miss, squeeze-through, whiff-merge, chain
merge), weak-contact and air-grasp spans, the post-task phantom gate,
honest marker names (finger_unload / sensor_residual / phantom),
place hygiene, sustained_slide with the load-retention veto,
hesitation, short_transport, structured spans with the finger they
belong to (blocker 3: finger-scoped deletion in the save path). The
detector never reads the recorded outcome (context.result is gone;
evaluation lives in the offline runner).
- src/lib/residualGate.ts: rule 1 (post-release residual gate, pre-grasp
form) and rule 2's quantum vocabulary, applied to the drift-corrected
frames for datasets …