# Data Collection

> Learn how to collect and prepare training data for your models

## Overview

Qualia accepts three distinct structured robotics source formats: LeRobot 2.1
directories (`lerobot_v2_1`), LeRobot v3 directories (`lerobot_v3`), and ROS 2
MCAP sessions (`mcap_ros2`). It does not require a Hugging Face dataset import
or Hub token; publish the local recording through the Qualia SDK, which
validates and pairs its Git history with lakehouse rows.

Qualia supports several collection workflows for vision-language-action (VLA)
models:

- **Manual data collection** - Record demonstrations manually
- **Automated collection** - Use scripts to gather data at scale
- **Existing recordings** - Upload a local LeRobot 2.1, LeRobot v3, or ROS 2 MCAP recording

### LeRobot 2.1 and v3

[LeRobotDataset v3.0](https://huggingface.co/docs/lerobot/en/lerobot-dataset-v3)
stores synchronized robot trajectories, camera video, and indexing metadata.
Record with a LeRobot release that writes the v3 layout, then upload the local
dataset directory:

```python
from qualia import Qualia

client = Qualia()
result = client.data.upload(
    "/data/record-test",
    name="record-test",
    source_format="lerobot_v3",
)
print(result["dataset_id"], result["episode_count"])
```

Leave `source_format` out and it is read from `codebase_version` in
`meta/info.json`, so a LeRobot 2.1 directory uploads as `lerobot_v2_1`
without naming it. Qualia treats 2.1 and v3 as separate source
contracts; it never aliases one literal or layout to the other.

Video and row rates may differ at upload and are flagged for review; the viewer aligns them by time, but LeRobot download and training require re-exporting the video at the row rate and uploading again.

The `robot_type` in `meta/info.json` becomes each episode's rig unless its
line in the file below names a `rig_id`, so the dashboard can group and filter
LeRobot data by robot. LeRobot itself carries no operator, station, shift or
success verdict; add them per episode as below.

#### Operator, station and shift per episode

To count a day's collection by who recorded each episode, on which station and
in which shift, put a file at `meta/qualia/episodes.jsonl` in the dataset folder
before you upload it. Each line is one episode: its `episode_index`, counting
from 0 as the dataset does, and the keys an MCAP `episode.json` takes:

```json
{"episode_index": 0, "operator": "ana", "scene": "station-2", "session_id": "2026-11-09-am", "rig_id": "openarm-02"}
{"episode_index": 1, "operator": "ben", "scene": "station-1", "session_id": "2026-11-09-am", "rig_id": "openarm-01", "success": false}
{"episode_index": 2, "operator": "ana", "scene": "station-2", "session_id": "2026-11-09-pm", "rig_id": "openarm-02"}
```

- `operator` is who recorded it, `scene` the station, `session_id` the shift
  and `success` how it went. Write the first three and `rig_id` in quotes, `"7"`
  and not `7`, and `success` as `true` or `false`: a value of the wrong type drops
  that line's operator, station, shift, robot and success, and the upload's findings say
  so.
- An episode without a line keeps them empty. A line that cannot be read,
  names an episode the dataset does not have, or names one another line names
  too is left out with a finding. The upload never fails over this file.
- The other keys mean what they mean in `episode.json`. `rig_id` is the robot
  and takes the place of `robot_type` for that episode, so do not put a
  station there. `task` and `mode` are kept but not applied: a LeRobot
  episode's task comes from the dataset. A handheld rig's operator verdict
  still sets `success` where the line leaves it out.
- Uploading the same dataset again, or re-ingesting it, keeps an episode's
  station when its line no longer names one; correct it as below.

A station can be corrected after the upload, for several episodes at once or
one by one, and the edit wins over what the file said:

```bash
qualia dataset edit <EPISODE>... -d <DATASET> --scene "station-2"
qualia dataset edit -d <DATASET> --from scenes.json
```

where `scenes.json` holds one edit per episode, each naming the episode by its
id or name (`qualia dataset episodes <DATASET> --json` lists them with their
`index`), up to 500 episodes of one upload at a time:

```json
[
  { "episode": "<EPISODE>", "scene": "station-2" },
  { "episode": "<EPISODE>", "scene": "station-1" }
]
```

Filter and count by them afterwards with the `operator`, `scene`, `session`
and `rig` fields. The file's `session_id` is the `session` field, and the
robot (the line's `rig_id`, else the dataset's `robot_type`) is the `rig`
field. Naming a rig with `--rig`, at upload or later, does not change this
field: an arm rig named that way becomes each episode's `source_robot`. The
`outcome` facet counts how the episodes went:

```bash
qualia dataset episodes <DATASET> --filter 'operator = "ana" AND session = "2026-11-09-am"'
qualia dataset episodes <DATASET> --filter 'rig = "openarm-02"'
qualia dataset summary <DATASET> --facet operator --facet scene --facet session --facet rig --facet outcome
```

```python
client.episodes.list(dataset, filter='scene = "station-2"')
client.episodes.list(dataset, filter='rig = "openarm-02"')
client.episodes.summarize(
    dataset, facets=["operator", "scene", "session", "rig", "outcome"]
)
```

The episodes with no value for a field are counted too, as `(none)` (the
empty value, `""`, in the SDK), so each field's counts add up to the
episodes when nothing is cut at 100; `--filter 'rig = ""'` lists the ones
with no robot.

#### Handheld (UMI) recordings

A handheld pair records each hand at the tracker it carries, in a tracking
frame the headset sets up again every session, so its raw columns do not
compare across sessions. Qualia recognises a UMI upload by `robot_type =
"umi-handheld"`, by `[rig] kind = "umi-handheld"` in `meta/ingest.toml`, or by
its state channels (`<side>_rot6d_0..5`, `<side>_x/y/z` and `<side>_gripper`
for each hand), and derives each episode's state in one frame for the pair:

- each tracker is moved through the rig's mount to its gripper root;
- the frame is fixed from the first row of the episode that reads both hands
  (its first row, for a take tracked from its start): the origin halfway
  between the hands, z up, y level and towards the left hand;
- positions are in metres and roll, pitch and yaw in radians, with roll and
  yaw unwrapped so a turn through 180 degrees does not jump;
- the gripper angle becomes how far it has closed (`pi/4 - |angle|`), and the
  rows the converter filled with `pi/4` keep the last real reading.

The result is published beside the untouched source as the channels
`left.ee.x`, `left.ee.y`, `left.ee.z`, `left.ee.roll`, `left.ee.pitch`,
`left.ee.yaw`, `left.gripper.closure` and the same for `right`, and it is the
state the dashboard's charts, the episode trajectories and the dataset health
report read. The action stays as recorded, and training reads the source as
recorded. Because a handheld action is the next pose relative to this one, the
dataset health report does not measure a control delay for it.

An upload converts whole or not at all. If any take has no row that reads
both hands, or its hands start one above the other, no take is converted,
every take keeps its state as recorded, and the upload's findings name the
takes that could not be placed. `meta/ingest.toml` is read only for `[rig]` and
`[pose_fill]` on a LeRobot upload; any other table it declares is named in the findings and not
applied. A LeRobot upload whose `meta/ingest.toml` cannot be read still
ingests: the file is ignored, as if absent, and a finding says why.

Two readers still see the raw state. An episode split into child episodes
reads its children's state as recorded, since the converted state belongs to
the episode it was converted for. When an edit recomputes an episode's quality
evidence, that recomputation reads the state as recorded too.

A new handheld recording uploaded as ROS 2 MCAP converts the same way when
it declares `[rig] kind = "umi-handheld"`, or when its selected state confidently
identifies a complete, unambiguous bilateral UMI pair without arm joints.
A declaration always wins over recognition. Its pair is found by
its state's own topics: each hand's tracker `position` and `rotation` (or
`orientation`) quaternion on a topic naming its side and a hand, controller,
end-effector, wrist or pose, and each jaw's angle (`<arm>_<side>_finger_joint1`).
A sleeping controller (it reports exactly `(0, 0, 0)`) gives that row no pose,
and a jaw not yet read counts as open. A controller that loses tracking but
stays awake reports a pose the headset estimates: that row converts with the
hand's position missing and its rotation kept. Ingest fills each short loss
with a smooth curve, a sleeping controller's rotation too by turning smoothly
between the frames either side, and names, in a finding, the takes that still miss
position and need a split or trim. How long a loss it fills is measured on
each take; `[pose_fill]` in `meta/ingest.toml` sets the allowed error
(`allowed_error_m`, default 0.01 m at the 90th percentile, at most 0.1) and the
limit for a take too short to measure (`fallback_limit_s`, default 0.2 s, at
most 0.5). They change later through the API (`Datasets.RepairPoses` with
`fill`; no SDK or CLI command yet), which fills the dataset's takes again and
keeps every repair. The recorded topics stay published
as they are; the converted state is published beside them, as for LeRobot. A
bag whose state holds no such pair publishes as recorded, and the upload's
findings say why no take was converted. Missing or ambiguous jaws, a missing
hand or missing orientation keep the upload raw with an explanation, even if
its Cartesian hand positions identify a UMI collection tag.

To keep an undeclared pair raw, put `infer_handheld = false` immediately below
`schema = 1` in `meta/ingest.toml`, before any table. This choice is persisted
and authenticated through corrective ingest and retries. An explicit converting
`[rig]` still wins; a non-converting declaration such as `egocentric` keeps the
recording raw. Conversion adds derived state bytes beside the unchanged bags.
Existing published recordings are not swept or bulk-converted: use **Move to tool center point** on a recording that needs repair or calibration.

Any upload can name the rig it was recorded on, teleop data as much as a handheld
recording: `qualia dataset upload ./session kitchen --rig my-franka-rig` (the SDK's
`rig=`) names any rig of the workspace (an arm rig, a UMI rig or another capture
rig, the Rigs page's "Other rigs"), and the dataset shows it once the upload
publishes. Only a UMI rig converts a handheld recording; the others are just
recorded on the upload. A name that is no rig of the workspace (a robot template,
a gripper template, a robot's own mounted gripper) is refused before anything is
stored, and so is an arm rig named for a tree whose `meta/ingest.toml` declares a
`[rig]`, or another capture rig named for a tree that declares the UMI kind.

The rig does not have to be named at upload time. On the dataset page, **Recorded on**
in the dataset's **Settings**, under **Collection**, adds, changes or clears it
afterwards (the overview shows it once it is set): a handheld upload offers the
workspace's UMI rigs and other capture rigs, any other upload its arm rigs and other capture rigs, and
**Not recorded** clears it. A merged dataset sets it for every recording: it is offered as a handheld
upload is when its recordings are handheld, and as any other upload when none is, and a dataset that mixes handheld and arm
recordings takes only a capture rig or **Not recorded**. Setting the rig only records it; **Move to tool center point** moves
the poses.

An upload can also arrive converted without editing its file:

- `qualia dataset upload … --rig <UMI rig>` (the SDK's `rig=`) names the UMI rig the
  recording was made on: its name or its id (the old name `umi-handheld` is the
  rig that holds that key, the first one a workspace had, else the workspace's
  one UMI rig). A recording whose `meta/ingest.toml` declares
  `[rig] kind = "umi-handheld"` and names no rig takes the workspace's one UMI
  rig; a workspace with none or several does not refuse it: the upload converts at
  the gripper roots (or at the TCP its own `meta/ingest.toml` declares) and records no rig (it reads "Not recorded"), and `--rig` records one, or `qualia dataset update --rig` adds it later. A workspace has
  the UMI rigs someone made and none otherwise: make one from a gripper template (New rig, UMI in the
  dashboard, `qualia gripper umi-rig`, or `client.robots.make_umi_rig`) and calibrate it with its `tcp_calibration.json`;
  an upload naming a rig the workspace does not have is refused before anything
  is stored. Qualia writes the rig's kind and TCP calibration into the upload's
  `meta/ingest.toml`, so the upload converts at the TCP at once (at the gripper
  roots if the rig has no calibration).
- An upload that appends to a merged dataset (`--merge-target`, or the
  destination the CLI saved) takes that dataset's rig and calibration the same
  way when all of its uploads were converted with one, so it lands where they
  are and the append completes. If they disagree, or are not converted, the
  upload arrives as recorded and its append says what is needed.

Either way the recording itself is uploaded as recorded and your local file is
never written. What your own `[rig]` says is kept: the gripper or the merged
dataset only fills in what it leaves out, except that a named rig's TCP
replaces one your file gives (and a rig with no calibration sets it aside,
converting at the gripper roots). The upload's receipt (`ingest_config`) says what
was written, or why nothing was.

The UMI mount is built in. A rig calibrated differently overrides it per hand:

```toml
schema = 1

[rig]
kind = "umi-handheld"

[rig.mount.left]
xyz = [-0.063, 0.016, 0.052]   # tracker in the gripper root's frame, metres
rpy_deg = [0.0, -45.0, 45.0]   # roll, pitch, yaw, degrees
```

#### What kind of data an upload is

Every episode carries a collection method: `teleop`, `vr`, `handheld`,
`egocentric`, `policy_rollout` or `sim`. Qualia fills it from what the upload
declares, in this order:

1. `[rig] kind` in `meta/ingest.toml`: `"umi-handheld"` gives `handheld`,
   `"egocentric"` gives `egocentric` (LeRobot and MCAP);
2. a rig the upload names: LeRobot's `robot_type`, or the recorder's `rig_id`
   in each bag's `episode.json`, when it is `"umi-handheld"` or `"egocentric"`;
3. on an upload that declares nothing more specific than `handheld`, how its
   data is represented: a hand tracked in space, a left or right position
   recorded as x, y and z under any topic name, tags it `umi` unless the
   upload also records an arm's joints, which are teleop (a gripper's own
   finger joint is not an arm's). A rotation alone, or a hand that two topics
   could be, is not enough;
4. otherwise the recording purpose: a recorder session whose `mode` is
   `collection`, `teleop` or `demo` is `teleop`, one in `eval`, `inference` or
   `rollout` is `policy_rollout`, and anything else is left empty. Nothing is
   guessed from channel names.

An egocentric rig (human capture from the wearer's view, the hands as
Cartesian poses) has no tracker mount, so it takes no `[rig.mount.*]`,
`[rig.tcp.*]` or `[rig.calibration]`, and its state is published as recorded:

```toml
schema = 1

[rig]
kind = "egocentric"
```

Collection classification tags derive from saved method, environment, origin and
controller metadata. The dashboard's common tag picker offers `teleop`,
`vr`, `umi`, `egocentric`, `policy-rollout`, `sim`, `real-world`, `human` and
`gello`, and also accepts your own tags. Environment, origin, collection
method and controller can coexist. Classification additions and removals edit
that metadata; custom tags remain ordinary editable tags. The picker's **Set
method to Unknown** action explicitly clears human methods even when no chip is
visible, preserving axes and customs. A typed `unknown` is an ordinary custom tag.
Opening or reading a dataset does not declare it.
The SDK changes classifications atomically with
`client.datasets.update(dataset, tags=["umi", "real-world", "human", "gello"])`.
Nonempty custom-only input, or unchanged classifications with edited customs,
changes only custom tags and preserves declarations and inference. `tags=[]`
clears customs and explicitly makes every collection dimension Unknown. The CLI
uses `qualia dataset tags <dataset> --tag umi --tag gello`, custom-only `--tag`
values, or explicit full `--clear`. Both use the owner's etag and require
independent collection metadata support. Older `method` and `methods` fields
remain compatibility views.

A merged dataset owns its collection tags. Editing them changes C alone,
and adding another upload keeps C's choices. Dataset and episode filters,
mixture sources and reach selection use that owner's tags. Recording and
curation metadata on an episode stays separate. Reach requires an `umi` or
`egocentric` collection tag and both hands' physical pose channels
(`<side>.ee.x/y/z/roll/pitch/yaw`); the tag alone cannot supply missing poses.
On a merged dataset, **Run solver** checks every upload's takes in
one run, with one progress, on the merged dataset's target robot and reach
settings. Existing results are reused when the robot, reach settings and
pose calibration identity match. Combining TCP uploads with different
calibrations can require solving them again. Under **Run solver**, a **Mixed
calibrations** block lists the calibrations the uploads were read at (see the
[reach solver](https://docs.qualia.dev/global/guides/curation.md#reach-solver)).

#### Poses at the gripper's tool center point

The channels above are the gripper root's. A rig whose trackers have been
calibrated to the gripper's tool center point (TCP), the point where the gripper
holds things, can have an upload moved there too. Upload the calibration file
(`tcp_calibration.json`, one tracking controller → tool center point transform per hand) on an applicable robot's
page under **Rigs**. The file needs a
`calibrated: YYYY-MM-DD` date. In the **Setup** strip of the upload's trajectories tab,
picking a rig under **Play on rig** whose arms all have a TCP moves the poses to the tool center point by itself,
once, with the calibration of the gripper whose rig key is the rig the upload was
recognised as recorded on, whichever of the three ways above recognised it. (The
**Poses** line also has a **Move to tool center point** button for where nothing starts by
itself, and a **⋯** menu with **Move again** and **Back to the gripper root**.)
Moving adds
`left.tcp.x`, `left.tcp.y`, `left.tcp.z`, `left.tcp.roll`, `left.tcp.pitch`,
`left.tcp.yaw` and the same for `right`, in the same frame as the gripper root's
`left.ee.*`, which stay exactly as they were. Each TCP is the tracker's pose
composed with the calibration's transform, so the mount does not enter it.
Undoing it removes the channels again.

The automatic move does not run for a robot with no TCP, never undoes anything, and
is not retried by itself: a failed one shows **Try again**. A move can be
cancelled while it is preparing; once preparation commits, publication finishes.
Moving rewrites the saved pose file and calibration metadata; it does
not read or rewrite cameras, source tables or bags. Returning to the gripper
root removes the TCP column. Both publish a new version, and neither is a
rollback. Versions and pins made earlier
keep the poses they had. If a review ruling or a trim lands while it runs, the
move fails on the stale version and is run again. An upload with any take the
pair frame could not place was not converted, and has nothing to move. A
recording without complete saved pair-frame poses or published tracker mounts
reports what is missing; the move does not silently re-ingest it.
The dashboard's trajectories draw each hand at its TCP once the upload is
resolved there, and the upload's versions tab lists it as "moved to tool center point"
with an undo. A LeRobot export of converted handheld data requires calibrated
TCP poses and emits twenty state values: left then right, each with six rotation
values (the rotation matrix's first two columns), TCP xyz and mirrored absolute
finger-joint radians. It exports no action column: training derives targets from
future state rows. Missing calibration is refused; move to tool center point and pin a new
version first. Export preserves recorded success, validity, tracking and repair
flags when present, and lists missing flags as training prerequisites. Raw MCAP
conversion cannot manufacture that provenance. Roll and yaw swing through a turn
where the TCP's x axis stands vertical (pitch near +-90 degrees), so no check
measures them.

The calibration is recorded in the upload's own `meta/ingest.toml`, not looked up
from the rig, so replacing a rig's calibration changes no upload until it is
moved again. The dashboard writes it; to author it yourself, give both hands
and where they came from:

```toml
[rig.tcp.left]
xyz = [0.01758, -0.11946, -0.18229]   # the TCP in the tracker's frame, metres
rpy_deg = [143.8, 45.0, 180.0]        # roll, pitch, yaw, degrees

[rig.tcp.right]
xyz = [0.01758, 0.11946, -0.18229]
rpy_deg = [36.2, 45.0, -180.0]

[rig.calibration]
file_name = "tcp_calibration.json"    # 1 to 256 characters
derive_date = "2026-10-13"            # YYYY-MM-DD, or leave it out
```

Both hands are required (a pair converts whole), every number must be finite,
and `[rig.calibration]` needs the TCP tables. The stored rotation is roll, pitch
and yaw, so a rotation within a hair of pitch +-90 degrees keeps roll 0.

The operator's verdicts come from the converter's `conversion_report.json` at
the root of the upload: its converted attempts, in order, are the episodes, in
order. `success` marks an episode a success, `failure` and `issue` a failure.
A missing report, or one whose converted attempts do not match the episode
count, leaves every episode unjudged and says so in the upload's findings; it
never refuses the upload.

### ROS 2 MCAP

Lay out one directory per recording and upload with
`source_format="mcap_ros2"`. Every `.mcap` file is ingested as its own source,
so a rosbag2 size split (`bag_0.mcap`, `bag_1.mcap`, …) is fine — each file
yields its own episodes, and a take that straddles a split boundary becomes
two. An optional `episode.json` sidecar per directory can supply task and
recording-purpose fallbacks, and its `operator`, `rig_id`, `session_id`,
`scene` (the station) and `success` are recorded on every episode of the bags
it covers.

**There is no fixed single-file ceiling** on the current data plane: a
400 GiB bag is admitted at `upload/begin` like any other, and the limits that
apply are negotiated there. Still split long sessions at the recorder
(`rosbag2`'s own split size defaults to 2 GB): a bag is the unit of
containment, so a damaged or underivable file costs only its own episodes, and
a smaller file is a smaller re-upload when a recording has to be fixed.

#### Cameras

A camera is any channel of one of these types. Its name comes from the topic,
so `/cameras/head/compressed` becomes `cameras_head`.

| Message type                                                                          | What ingest reads                        |
| ------------------------------------------------------------------------------------- | ---------------------------------------- |
| `sensor_msgs/msg/CompressedImage`                                                     | one JPEG per message                     |
| `foxglove_msgs/msg/CompressedVideo` (or the `foxglove_msgs/CompressedVideo` spelling) | an AV1 or H.264 stream, decoded in order |

Either way, each episode's camera is stored as AV1 with one frame per row.

A video stream has to follow Foxglove's rules for the type: one frame per
message, no B-frames, and every keyframe carrying what a decoder needs to start
there (the sequence header for AV1, SPS and PPS for H.264). An episode that
starts between keyframes still decodes, from the keyframe before it. Frames
before a channel's first keyframe cannot be decoded and are left out. An
episode whose stream cannot be decoded, or decodes with errors, publishes
without that camera.

Other camera formats are left out with a `camera_unsupported_encoding`
finding: raw `sensor_msgs/msg/Image`, a non-JPEG `CompressedImage`, and video
in H.265, VP9 or any codec other than AV1 and H.264. An MCAP download writes its
cameras as AV1 `CompressedVideo`, so uploading one again brings its cameras
back. They are encoded once more on the way in.

#### Ingest degrades, it does not refuse

A source the platform can partly derive is published rather than rejected, so a
**successful upload can contain less than you recorded**. The rules worth
knowing before your first session:

- A camera missing from some bags stays in the dataset: only the episodes from
  bags without it publish without that camera, flagged
  `camera_absent_for_episode`.
- A camera that produced no decodable video anywhere is dropped from the
  dataset, and every episode is flagged `camera_dropped`.
- A camera that dies partway through keeps every episode it did cover; the
  episodes it missed publish without it.
- Bags that record different state or action channels all publish, in the
  union of every bag's channels. A bag's rows are empty (NaN) for the
  channels it does not record, and its episodes are flagged
  `bag_schema_padded`: teleop bags beside policy-rollout bags that also
  carry the policy's action, for example. These episodes are published and
  visible, but training skips them and version normalization leaves them
  out (`non_finite_values`). A LeRobot export of a version holding them is
  refused: curate them out and create a new version, or export the original
  format. A config change cannot recover signals a bag never recorded.
  To keep the policy's topic out of the whole session's action layout on
  re-ingest, declare `[actions] topics` in `meta/ingest.toml`.
  Channels match by topic and joint name, so one joint name on two topics is
  two columns, and so is a topic the bag registers twice. A bag that records
  the same channels in another order publishes in the dataset's order,
  unflagged. Column names stay unique however many topics share a joint
  name: a later topic's copy is suffixed `@<topic key>`, then with its dim
  index, then numbered (`#2`, `#3`, …).
- **A damaged bag costs its own episodes, not the upload.** A bag with a broken
  envelope — a bad record length, a recorder killed mid-write — still uploads,
  at generic chunk boundaries so it deduplicates worse, and ingest reports it
  `source_underivable` at `warn`. Every other bag publishes; the dataset comes
  back DEGRADED with that finding in `ingest_warnings`. Fix the recording and
  re-upload: the good bags are already deduplicated.
- **A row clock above the 240 Hz encode ceiling is re-elected onto a synthetic
  uniform grid at the slowest camera's rate**, floored at 30 Hz and capped at
  the ceiling (30 Hz when no camera is rateable). A 750 Hz `/joint_states`
  beside 30 fps cameras publishes at 30 Hz, beside 60 fps cameras at 60 Hz,
  unless you say otherwise — pin the cadence with `[clock] fixed_hz = <rate>`
  or name the channel that carries it with
  `[clock] row_clock_topic = "<topic>"`. The lever is the slow camera: a grid
  faster than it would repeat frames it never sampled. The elected clock is
  recorded in the report's `row_clock`.

Every one of these is recorded in `meta/ingest_report.json`, and the SDK prints
them at the end of the upload and returns them as `ingest_warnings`:

```
done: kitchen generation 1 — 74 file(s), 41.2 GiB, 73 episode(s), 219000 frame(s)
  1 ingest finding(s) — this dataset was published DEGRADED:
    warn: camera "wrist_left" produced no video for 2 of 73 episode(s) (2 from
    bags with no decodable stream for it); those episodes publish without it
    and every other episode keeps it
```

An empty `ingest_warnings` means the report was read and was clean. If it could
not be read, `ingest_warnings_unavailable` says why — that is not the same as
clean, and should be treated as "go look at the report".

The same report carries the upload's **report card**, returned as `validation`:
every episode is `ok` or `flagged`, and only the flagged ones are listed,
each with the finding codes that flagged it. A flagged episode shows as
`flagged` on its data pages too, with the same codes as the reasons: it stays
out of kept until a person keeps or rejects it. The card never excludes an
episode; that stays a reviewer's decision. One case goes further: an episode whose state or
action rows hold a NaN or an infinity (`stream_non_finite`), a missing value or
a wrong width is blocked. It is kept and flagged, and training skips it; the
dataset's other episodes train. When every episode is blocked, nothing trains
and the values have to be fixed at the source, see
[Declaring state and action channels](#declaring-state-and-action-channels). A
LeRobot download refuses a version that contains a blocked episode. This includes
`bag_schema_padded` episodes with signals left empty because their bag never
recorded them. They remain visible; the original format still exports.
Unless every episode is blocked, publish a curated version without it into a
new dataset (`qualia dataset curate <version> --idempotency-key <uuid> --name
<new-dataset>`) and download that; curation leaves out every episode it
recommends removing, not only blocked ones.

```
  validation: flagged — 71 of 73 episode(s) ok, 2 flagged
    episode 17: stream_gap
    episode 40: episode_too_short, stream_rate_low
```

The reasons are finding codes. An MCAP episode is checked for:

| Code                        | Flags when                                                                                                                                                                                                                       |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `stream_gap`                | a state or action stream is silent for 0.1 s, or a camera for 0.5 s between its first and last frame, either raised to three of the stream's own sample periods when that is longer — an operator pause inside an episode counts |
| `stream_rate_low`           | over two seconds, a camera delivers under half the frames of its best two seconds in the episode                                                                                                                                 |
| `episode_too_short`         | the take spans less than 2 s                                                                                                                                                                                                     |
| `camera_resolution_changed` | frames inside the episode change size; the episode publishes without that camera                                                                                                                                                 |
| `stream_non_finite`         | a state or action stream carries a NaN or an infinity inside the episode; the values are published as they came, and one in a state or action row blocks the episode: training skips it                                          |
| `stream_frozen`             | a state or action stream repeats one sample, bit for bit, for 5 s while the other kind moves — judged on the stream's own samples, not the row grid, so a slow command stream is not frozen by construction                      |

`stream_frozen` blocks when the action held while the state moved, when the
state held while the action moved, and when the upload has one kind of stream
only. Moved means at least 10% of the usual range on some dimension, the usual
range taken over the take's task (else the upload). When both held still (the
robot rested), the finding is the note `stream_still` ("Robot resting")
instead, with the same start and duration, so the issue still offers **Trim
here**.

A LeRobot episode is checked for `stream_gap`, `stream_non_finite` and
`stream_frozen` on its state and action columns, with the same limits, timed by
its `timestamp` column. Timestamps generated from `frame_index` / fps sit on a
perfect grid, so they cannot show a gap. An episode too large to hold for these
checks (over 1 GiB of state and action) is flagged `stream_checks_skipped`
instead of being checked.

Findings ingest already reported also flag what they name: a camera that died,
went missing or could not be encoded (`camera_absent_for_episode`,
`camera_dropped`, `camera_dropout`, `camera_unsupported_encoding`,
`camera_shape_changed`, `video_timeline_gap`), a joint array that changed width
or a channel that could not be read (`channel_width_coerced`, `channel_dropped`,
`bag_schema_mismatch`), a bag that does not record every channel the others do
(`bag_schema_padded`; its empty signals block training and LeRobot export as
explained above) or records one channel twice
(`channel_identity_collision`), header stamps that step backwards even where
the channel runs on `log_time` (`timestamp_non_monotonic`; `[clock] source = "log_time"`
sets them aside), and data that did not publish (`episode_skipped`,
`source_underivable`, `session_no_episodes`). A finding that names no episode,
such as header stamps that step backwards somewhere in a bag, flags its source
and every episode that bag published: this is validation, not curation, and the
bag is unusable as a whole. Two read differently: `episode_skipped` is about an
episode that did not publish, so it flags the source alone, and a camera dropped
from the dataset flags every episode, since the dataset publishes without it.
LeRobot episodes appear on the card through the stream checks above and any
existing finding that names them. A LeRobot finding that names no episode flags
the source alone, because a LeRobot report lists no episodes under its source.

Flagged episodes publish like any other. A flag holds the episode out of kept,
so out of versions and mixtures, until a person keeps or rejects it. Episodes
with a NaN, an infinity, a missing value or a wrong width in their state or
action rows are blocked as well: they stay flagged and are skipped by
training. The card is there for you to decide. After it, the
[free checks](#free-checks-on-every-upload) run on every take.

The card also lists **outliers**: episodes that stand out against the rest of
the same upload. They are a separate axis from flagged. An outlier stays `ok`
when nothing flagged it, and it never changes the verdict.

```
  validation: ok — 8 of 8 episode(s) ok, 0 flagged, 1 outlier(s)
    outlier episode 5: episode_no_movement
```

| Code                  | Listed when                                                                                                                                                                                                                                                                                                                                                      |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `episode_no_movement` | on every action dimension that moves in the upload (state when there is no action), the episode's range stays under 10% of the median range of its comparison group: the other episodes of its task when that task has at least 6, else the whole upload (at least 6 episodes). Dimensions whose median range is under 2% of the widest dimension's are left out |

Every episode publishes with a task label. An episode that no source labels (no
task topic in the bag, no `task` in `episode.json`, no task in a LeRobot task
list) publishes as `unlabeled`, and the upload reports `episode_task_missing`,
a warning that marks the upload degraded. The episodes stay `ok`.

#### Free checks on every upload

After the upload publishes, the free checks run on every take, in every
environment. They read the take's data with no model and cost nothing. No
setting switches them off. They come after the report card above, whose flags
block on their own. While they run, the take has the blocking issue "Free
checks are running" (`checks_pending`), so it is not kept yet. It clears by
itself once they have run. If they cannot run after the last retry, the
blocking issue "Free checks could not run" (`free_checks_failed`) replaces it:
run them again, or keep the take.

A blocking finding holds the take out of kept, so out of versions and
mixtures, until a person keeps or rejects it. A note holds nothing. Nothing is
deleted, and an upload never fails on what a check finds.

| Check                       | What it finds                                                                                                                                           | Blocks?                                                       |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| `heuristic.nan`             | a NaN in the take's data                                                                                                                                | yes                                                           |
| `heuristic.frozen`          | a stuck joint: one that held one value for the whole take while its command moved; or a command channel that never moves (`frozen_action_ratio` ≥ 0.25) | blocks on a stuck joint; a command that never moves is a note |
| `heuristic.jerk`            | jerk past the robot's confirmed limit, else past the range of its other takes                                                                           | no                                                            |
| `heuristic.hf_noise`        | high-frequency noise past the robot's confirmed limit, else past the range of its other takes                                                           | no                                                            |
| `heuristic.velocity`        | top speed past the robot's confirmed limit, else past the range of its other takes                                                                      | no                                                            |
| `heuristic.idle`            | idle for too much of the take (by default, over 30%)                                                                                                    | no                                                            |
| `heuristic.joint_limit`     | the robot's state past a joint limit                                                                                                                    | no                                                            |
| `heuristic.too_short`       | a take under 5 s (validation already blocks under 2 s)                                                                                                  | no                                                            |
| `heuristic.duration_bounds` | a take shorter or longer than its bounds, the Task's included                                                                                           | no                                                            |
| `heuristic.end_stall`       | the arm still for the last 2 s or more, with a gripper far from where the Task's references end                                                         | no                                                            |
| `heuristic.black_frames`    | a camera black for 500 ms or more                                                                                                                       | no                                                            |
| `heuristic.fps_drops`       | a gap of 200 ms or more between a camera's frames                                                                                                       | no                                                            |
| `heuristic.missing_stream`  | a camera with no stream, or no frame that decodes                                                                                                       | no                                                            |

A handheld take is measured from its hand poses: `idle`, `jerk`, `velocity`
and `hf_noise` read both hands' positions and orientations and the jaw
closures, never the take's command. A handheld take recorded raw has no robot
joints and no command, so `frozen` and `joint_limit` read it unassessed, "not
applicable to a handheld rig". A handheld take uploaded with a command is
still checked for frozen commands. A take of another rig with no command at
all gets no motion reading either: those four checks read it unassessed, never
idle. A handheld take measured before this reading is measured again the next
time its checks run; on a large dataset that can take more than one run.

`duration_bounds` and `end_stall` need the take's Task: they run once it has
one, and again when it changes. `black_frames`, `fps_drops` and
`missing_stream` need decoded frames: they run a little after the others. A
check that finishes after `checks_pending` has cleared is a note, whatever it
finds, so a take never moves from kept to blocked minutes after its upload.

Running the free checks again by hand
(`qualia dataset checks run <DATASET_UUID> --kind heuristic --category heuristic`, or **Run
checks** on the dataset page) can move kept takes out of kept. Notes from earlier free checks stay notes until their take is
checked again, by a re-upload or a run by hand.

#### Declaring episode boundaries

Boundaries are resolved highest precedence first: anything you declare in
`meta/ingest.toml` — `spans`, then an event vocabulary — then what can be read
out of the bag: authored markers, an operator-verdict topic, a `done`-style
boolean, and finally one episode per bag. **A declaration always outranks a
heuristic**, so the two config blocks below are how you stop guessing what
ingest will do. The report records which rule fired, as `boundary_mechanism`
(e.g. `ingest-toml-spans`) and `boundary_source` (`authored` when you declared
it).

A rig with its own marker vocabulary declares it in `meta/ingest.toml` instead
of hoping for a heuristic:

```toml
schema = 1

[episodes]
event_topic = "/rig/marks"

[episodes.events]   # your values; unlisted ones are ignored
go   = "open"
halt = "close"
ok   = "label"      # a label describes a take, it does not cut one
```

A label describes the take it falls inside, and two rules decide what reaches
the episode's tags. The same value pressed repeatedly is one outcome, however
many times it was pressed — a held or bounced pedal does not multiply a verdict.
And a **different** value pressed within a second retracts the one before it: an
operator who presses `success`, sees the mistake and immediately presses `issue`
has corrected a mispress, not recorded two outcomes, so the take is tagged
`issue` alone. Presses further apart are two real outcomes and both are kept.

Nothing is erased to do this. Every press stays on the episode's marker
timeline with its instant, so the dashboard still shows the correction that
happened and a curation pass can disagree with it — the rule decides only what
the take is _tagged_.

If your boundaries live **outside** the bag — a sidecar, a manifest, a database
of take timestamps — compute them and declare the windows directly. This is the
one strategy that reads nothing from the recording:

```toml
schema = 1

[episodes]
spans = [
  { start = "2026-08-12T09:00:00Z", end = "2026-08-12T09:02:30Z" },
  { start = "2026-08-12T09:05:00Z", end = "2026-08-12T09:07:10Z" },
]
```

Instants are RFC 3339 on the recorder's clock (MCAP `log_time`). Windows are
closed intervals, so they must be in time order and must neither overlap nor
touch — start a back-to-back take one nanosecond later, or its boundary sample
would belong to two episodes.

One list covers a whole multi-bag session: a window that names no message in a
given bag simply contributes no episode to it. A bag that **no** window reaches
is skipped and recorded in the ingest report at `info` — a session-wide list is
_expected_ to leave most of its bags out, so this never publishes the dataset
degraded. A span list that misses a file costs you that file, not the upload.

You can declare `event_topic` **alongside** `spans`. They answer different
questions: the windows decide where takes are cut, the vocabulary names what the
operator pressed inside them. Under `spans` a value may only be `label` (or
`ignore`) — mapping one to `open`/`close`/`cut` is an error, because the windows
already decide the boundaries. A press between two windows describes the take
that just ended, since an operator stops a take and then says how it went. A
press before the first window describes no take.

If a bag carries both the topic you declared and q-core's own
`/recorder_event`, the windows still decide every edge — neither topic moves
one — and only the topic you declared is read for what its values mean. The
report names the other one, so it is never silently unread.

Declaring windows changes only where takes are cut, not what the operator
recorded inside them: a verdict topic in the bag is still carried through, it
just no longer decides the boundaries.

#### Declaring state and action channels

By default, state is every `JointState`-schema channel and actions are elected
from schema and topic-name evidence. Both elections can be replaced from
`meta/ingest.toml` — the rig knows its own wiring, and a rig that publishes
end-effector or controller poses (handheld, teleop or egocentric capture) has
no `JointState` channel for the default election to find:

```toml
[state]
topics = ["/quest/controller/left/state", "/quest/controller/right/state"]

[actions]
topics = []
```

`[state] topics` lifts the `JointState` schema requirement: any schema
contributes every numeric field in its `.msg` definition order (a nested
message flattens depth-first within its field; `header`, strings and bools are
skipped), each dim is named by its field path under the topic key —
`quest_controller_left_state.rotation.w`, `end_effector_pose.pose[0]` —
unless the message carries a `name` vector as wide as the row, and the topics
concatenate in the declared order. The first topic is
the row clock; a `[clock] row_clock_topic` moves its topic to the front. The
`topics` key is required (a `[state]` table without it is refused, not read as
no declaration), the list cannot be empty — rows are clocked by the first state
channel — and a
`[clock] row_clock_topic` must be one of the listed topics: the state channels
are exactly this list, so a clock outside it could never match, and the config
is refused at `upload/begin` rather than warning on every bag. A topic is one
column or the other: it cannot be listed under both `[state]` and `[actions]`.

A declared topic that is not a `JointState`, `JointTrajectory` or `MultiArray`
contributes every numeric field, so a controller message that carries
`device_time_ns`, `pc_monotonic_ns` and `seq` beside its pose puts those
counters into the state vector. `[state.fields]` lists the top-level fields to
keep for a topic, and `[actions.fields]` does the same for action topics:

```toml
[state]
topics = ["/quest/controller/left/state"]

[state.fields]
"/quest/controller/left/state" = ["position", "rotation"]
```

Only the listed fields contribute, in the message's own order whatever order you
write them, and a topic with no entry keeps every numeric field. It is a list of
fields to keep rather than to drop, so a field added to the message later cannot
widen the vector. The kept dims are always named by field path, never by a
`name` vector. Each key must be one of the declared `topics`, and each list
must be non-empty with no repeats. A name the bag's message does not declare
fails that bag under `[state]`, and the error lists the fields it does declare.
Under `[actions]` it drops the channel with a `channel_dropped` finding, as a
missing action topic does. A list cannot apply to a `JointState`,
`JointTrajectory` or `MultiArray` topic, which are read as fixed layouts, and
counts as a name the message does not declare. The telemetry table keeps every
field either way.

##### Quest clock

A Quest controller's pose reaches the recorder over Wi-Fi, so its header stamp
is when it arrived, not when the headset measured it: a few milliseconds late
usually, a few hundred behind a Wi-Fi stall, and sometimes a whole bag late.
`[device_clock]` times its topics by the field that carries the headset's own
sample time instead:

```toml
[device_clock]
topics = ["/quest/controller/left/state", "/quest/controller/right/state"]
field = "device_time_ns"
```

Ingest reads every bag of the upload first. The headset's clock stops while
it sleeps between takes, so ingest splits the bags where the gap between
arrival and sample time jumps by more than a second, and fits one line from
the headset's clock to the recorder's for each stretch the headset stayed
awake: the earliest-arriving samples of each 10 s window, and the line under
them (an offset plus the clock's drift; with fewer than two such windows, the
offset alone). A bag that arrived late as a whole, at the start, middle or
end of a stretch, is left out of the line when at least two of its windows
sit more than 10 ms above it and run parallel to it. Otherwise, as with a
single late window, the line runs under every window, as before. Each pose
then runs on its sample time mapped through its stretch's line, so a bag that
arrived late as a whole still lines up with its video, and its lateness shows in the
report. The ingest report's `device_clock` lists each stretch with its line
under `stretches`, and how late samples arrived, per bag, with a
`device_clock_fitted` finding. A `stamp_offset_ms` on the topic still applies
on top, and the telemetry table keeps the original stamps. For its topics
`[device_clock]` wins over `[clock] source`, and a header stamp far from its
arrival time drops no sample.

Each topic must be in `[state] topics`, and `field` may stay out of
`[state.fields]`: it is read either way. A bag whose message for one of the
topics has no such integer field fails, as a missing `[state.fields]` name
does. A bag none of whose samples on these topics carries a usable device time
belongs to no stretch and keeps its header stamps; the finding names it. In a
fitted bag, a topic with no usable device time is dropped with a
`channel_dropped` warning, and single samples without one are skipped and
counted. A clock that cannot be fitted leaves that stretch's bags on their
header stamps with a `device_clock_unfit` warning, and the other stretches
keep their lines. That is a clock that restarted, jumped more than an hour
ahead of the recorder's (what a corrupt device time looks like), or drifts
past 100 ppm, or a stretch whose first or last 10 s window sits more than 1 s
off the line: a sleep or a clock set forward inside one bag, or a Wi-Fi
backlog over 1 s filling that window. A Quest drifts about 27.5 ppm, so a fit
showing more than 100 ppm is treated as no fit. A few steps still go unseen,
as before, and leave their poses off by the whole step: a sleep in a bag's
last seconds, a clock set forward by under 10 s in a bag's first seconds, and
a step a little over 1 s on a stretch hours long, which passes as drift.
Without the table, nothing changes.

On its own clock a pose still lands between rows, so interpolate it onto them
and anchor the rows on a camera:

```toml
[clock]
fixed_hz = 30.0
anchor_camera = "/camera/left/image_raw/compressed"

[channels."/quest/controller/left/state"]
align = "slerp"
max_gap_ms = 100.0

[channels."/gripper_width/left/joint_state"]
align = "linear"
max_gap_ms = 250.0
```

`align = "slerp"` moves the position in a straight line between the two
samples around each row and turns the rotation (each `geometry_msgs/Quaternion`
in the message) on the shortest arc; a topic with no quaternion fails the bag.
`max_gap_ms` is the widest pair of samples a row is interpolated between
(above 0, at most 10000; `linear` or `slerp` only, and 100 ms for `slerp` when
left out). A row inside a wider gap has no pose: position and rotation are
empty and the hand reads as untracked there. Rows at the start or end of a
take where a `slerp` topic has no sample on one side are dropped, never
extrapolated, and counted as `rows_trimmed_without_pose` in the ingest report;
a jaw's gaps leave the jaw empty and never drop a row. Each such channel's
report entry also counts `bridged_rows` (a row interpolated across a dropout,
its two samples more than 1.5 sample periods apart) and `gap_rows`. `linear`
without `max_gap_ms` holds the end sample as it always has.

`anchor_camera` (with `fixed_hz` only) starts the rows at that camera's first
frame, after its `stamp_offset_ms`, so the first row lands on a frame of it
(after that a fixed grid, 30 Hz say, drifts against the camera's own
cadence); after a recording pause, at its first frame once the rig records
again. A stretch of recording the camera has no frame in starts at the first
sample of the row clock. A bag without that camera starts its rows at the
first sample of the row clock, with an `anchor_camera_absent` warning.

`[actions] topics = []` means explicitly **no action column**, which the
election can never conclude on its own. Declare it on any rig whose only
command-shaped topic is operator input hardware — otherwise a topic like
`/portable_joy_command` matches the name election and button presses become
the dataset's action vector. Asking for `cut_at_last_action` alongside it is
refused: there is no action column to cut at.

Left undeclared, topics that become the action only because their names say
`cmd`, `command` or `action`, with no joint command schema behind them, are
reported as `action_elected_by_name` warnings, and the upload is marked
degraded. There is one warning per topic in each bag, and each lists every
topic elected that way, because all of them are concatenated into the action.
Declare the ones that are commands under `[actions] topics`, or `topics = []`
to publish without an action column.

A successful MCAP upload prints the topics that fed each column, and returns
them as `channel_summary`:

```
  state:  /controller/left/pose, /controller/right/pose
  action: none (no action column)
```

Read it before you train. `action: none (no action column)` is what
`[actions] topics = []` produces, and also what a bag with no command topic
gets. Topics are listed by name; the vector follows the declared order.

**Every bag has to carry every topic you declare under `[state]`, with
samples on it.** A bag missing one, or carrying it as a channel that
recorded nothing, is dropped from the upload — the rest of the session
publishes without it. This is deliberate: the alternative is a dataset
whose state vector silently narrows partway through, which no training run
would notice. It is also the one rule the config check at `upload/begin`
cannot decide for you, because it depends on what each bag actually
contains rather than on the config. So a config that legitimately spans a
whole session should name only the channels every take recorded — if one
arm is brought up for some takes and not others, declare the channels they
share and let the per-bag findings tell you what was dropped.

`[actions]` is looser, because the action column is optional. A declared
action topic the bag does not carry — whether it registered the channel and
recorded nothing, or never registered it at all — is dropped with a
`channel_dropped` finding, and the bag publishes without that column. Those
are one physical situation (a controller that never published; rosbag2 opens
a channel only for a subscription it made), so they degrade the same way.

**State and action channels that fit no episode publish a dataset nothing
can train on.** If every episode has a NaN or an infinity in its state or
action vector, the upload still succeeds and the episodes are there to look
at. Recorded NaN or infinity is flagged `stream_non_finite` with the topic
that carried it. Signals a bag never recorded can also be left empty when
bags are combined (`bag_schema_padded`); these episodes remain visible, but
training skips them too. A LeRobot export requires a version without these
episodes; the original format still exports. If every episode is blocked,
curating them all out leaves nothing for training or a LeRobot export.
A request for training data is refused and says that no episode can be trained on. On a
bag that usually means the election picked channels that do not describe the
rig — a sensor that publishes NaN while it has no reading, say. A topic that
records NaN to mean "not measured" cannot be declared under `[state]` or
`[actions]` yet. Declare the right topics under `[state]` and `[actions]`. The
bags are already stored, so you do not have to send them again: post
`{"ingestConfig": "<the whole corrected file>"}` to
`POST /v1/accounts/{account}/datasets/{dataset}:reingest` and the upload is
re-derived from them as a new version. The file replaces the published one, so
repeat everything it declared. To change only the clock or how a channel is
aligned, add `"timeSyncPatch": true` and send just `schema = 1`, `[clock]` and
`[channels."<topic>"]` with `align`: the server applies that to the published
file and keeps the rest (camera offsets, the rig and its calibration, `[state]`,
`[actions]`, `[device_clock]` and episode spans), and refuses any other table
or key; an empty `[clock]` resets the whole clock. A patch cannot set `slerp`,
`max_gap_ms` or `anchor_camera`: a channel the upload gap-limits (`slerp`, or
`max_gap_ms`) keeps its align and limit whatever the patch says, so saving its
own settings back can leave the upload unchanged, and `anchor_camera` is kept
while the patch keeps a fixed rate and cleared when it leaves one (a
`row_clock_topic`, or an empty `[clock]`); setting those takes a full re-ingest,
and a later fixed-rate patch does not bring a cleared anchor back.
The dashboard's Time sync tab saves this way, and shows a gap-limited
channel's align and limit read-only, with no method to pick. On a merged
dataset only a `slerp` channel is read-only: a linear channel with a limit
keeps its method, which applies to the recordings without a limit, while each
recording that has one keeps its own. Poll the `reingest.name` it returns
(`GET /v1/accounts/{account}/datasets/{dataset}/reingests/{reingest}`) until its
`state` is `SUCCEEDED` (or `FAILED`, with `failureReason` saying why), then
train on the new version: the original version
stays untrainable. The [qualia.v1 API Reference](https://docs.qualia.dev/api/qualia-v1.md) has both
calls. Uploading again with the corrected file works too, and is the only way
for a LeRobot source. Uploading the original folder again re-derives the upload
from what that folder holds, so it undoes a re-ingest.

#### Re-cutting an upload into takes

A recording that published as one long episode, because its config only closed
an episode on `pause`, can be cut into takes after the fact. Compute the take
windows outside q-core and re-ingest with them as `[episodes] spans`, through the
same `:reingest` call. Keep `event_topic` and the label values, so presses still
tag the takes, and drop `pause`/`resume`, because a role that cuts is refused
under `spans`:

```toml
schema = 1

[episodes]
event_topic = "/recorder_event"
spans = [
  { start = "2026-10-06T09:39:01.5Z", end = "2026-10-06T09:39:24Z" },
  { start = "2026-10-06T09:39:31Z", end = "2026-10-06T09:39:52.25Z" },
]

[episodes.events]
success = "label"
issue = "label"
```

Two ways to get the windows:

- **Home rest.** A handheld rig rests between takes. Read the take events your
  rig records (for a UMI rig, the started/ended pairs on `/umi/episode_events`)
  from the bags, and give each take one window. These come from the bags, so
  the instants are already on the recorder's clock.
- **Operator marks.** Each take ends on the operator's `success` or `issue`
  press. The marks are already stored on the long episode, as its `markers` in
  seconds from the start of the recording. Each window ends at a press, so the
  press tags the take it closes. The next window starts 1 ns after that press,
  because windows that touch are refused. With the recording starting at
  09:39:00 and presses at 24 s and 52.25 s:

  ```toml
  spans = [
    { start = "2026-10-06T09:39:00Z", end = "2026-10-06T09:39:24Z" },
    { start = "2026-10-06T09:39:24.000000001Z", end = "2026-10-06T09:39:52.25Z" },
  ]
  ```

:::caution[Availability]
Footage-based re-cut requires the matching server/worker and result-view changes.
Its production feature flag is currently off. Until coordinated activation,
existing person state or saved drafts still refuse source-span changes.
This section describes the enabled contract, not a deployed SDK release.
:::

Re-cut identity follows footage, not its position in the new list. An unchanged
recording and exact selected frames keep the take's ID and number, along with
keeps/rejects, issues/notes, reaches and saved draft. New or changed footage gets
a fresh take number above the upload's highest historical ordinary number.
Numbers can have gaps or be out of time order. Removed/changed old takes leave
head; their identities and audit stay on record instead of moving to new footage.

After publication, source settings shows **Not carried to the new takes** for
old takes with state that no longer applies. For example, a changed take may
list a person's keep, two issues and a saved draft. Legacy applied trims and
splits instead return the take as recorded: the list names its applied trim
or split-piece count. An unchanged take keeps its draft and person state even
when such a legacy edit is reset. Old versions still contain exactly their
pinned episodes, windows and cuts.

Only a verified published result can report no state lost. A zero count means
nothing is listed; a missing or failed result read does not. **Retry reading
result** reads the same committed report without running re-ingest again.
A failed or canceled publication leaves the old head and state intact.

Older uploads need supported replay of their original recordings and ingest
contract before identity can be established. Missing raw files, unsupported
historical toolchains, ambiguous selections or mismatched reproduced output
refuse with a reason; matching duration or take numbers is insufficient.
Copies that deliberately did not carry direct raw identity cannot be re-cut
through that indirect provenance. A same-span camera correction preserves
identities only while its reference frames/grid are unchanged; retiming those
frames is refused. After a sparse re-cut, an older worker without the required
mapping is refused rather than renumbering existing footage. A non-re-cut full
re-ingest retains its legacy split-child restriction.

Re-cut an upload before you merge it. The merged dataset
holds the uploads' takes as they were cut, and neither it nor the uploads it
holds are re-cut afterwards (the request is refused, naming the merged
dataset). Uploading a session again under the name of one that was merged is
refused the same way: upload it as a new session, or add a new session to the
merged dataset.

#### Change a merged dataset's time sync

A merged dataset has one time sync: the clock its rows follow and how each
channel is aligned to it. To change it, open the dataset's **Settings**, choose
**Sync**, press **Edit sync**, change the clock or a channel's align method and
press **Save…**. The form shows the dataset's whole time sync: once one has
been applied, that time sync over the report of the time sync most recordings
hold. What you save is
the dataset's time sync, which recordings added later are brought to, so the
channels you did not touch are saved as they are shown. Nothing runs yet. q-core first checks every recording and tells
you what applying the time sync would do: how many recordings it applies to, how
many already hold it and how many need action, with the reason for each of those.
Press **Apply** to start. If every recording already holds the time sync but the
dataset has none yet (or it differs), **Apply** is still open: it makes this the
dataset's time sync, so recordings added later are brought to it. It stays closed
when no recording holds the time sync and none can take it (for example a change
of frame rate that blocks every recording), and when it is the dataset's time
sync already and the rest need action.

Each recording that does not hold the time sync is re-processed on its own, a
few at a time, on the server. Each takes minutes and you can leave the page. The
Sync panel counts "12 of 43 recordings hold this time sync" and says how many
are re-processing, how many are waiting and which need action. A re-process
changes only the clock and the alignment. A recording keeps its own camera lag
corrections and tool center point calibration, and its review decisions, notes,
issues and reaches carry over. Old versions of the merged dataset keep their
data. **Edit sync** is unavailable until every recording has finished (a
recording held up by another run of it counts as not finished), so a second
change starts from the time sync after the first. After a cancel there is no
time sync waiting to be re-processed, so **Edit sync** is available as soon as
the page has read the dataset again. It also stays unavailable for a
moment after the last recording finishes, while the report is read again; if
that read fails, the page says so and offers **Retry**.

If you apply a time sync from another tab, or another person does, the new one
replaces the one that is running: recordings that have not been re-processed
yet take the newer time sync, and recordings that already moved to the earlier
one are re-processed to the newer one. The latest edit wins, and nothing warns
you.

While recordings are being re-processed, q-core does not let you remove
recordings from the merged dataset, run the solver or create a version. It says
"… is still re-processing N recordings for its time sync; wait for them to
finish, or cancel the time sync change, before …". Wait for the recordings to
finish, or cancel the change as described below. **Try again** is part of the
time sync work and stays available. After a cancel, these actions still wait for
the recordings that were already re-processing to finish ("N recordings are
still re-processing; wait for them to finish before …").

You can still add recordings to the merged dataset (Merge uploads, "add to"). An
upload added while the dataset re-processes is queued: the dialog says "Queued: 1
recording joins <dataset> once its re-processing ends.", the upload stays its own
dataset until then, and the Sync panel says "1 recording will join after the
current re-processing", with its name. It joins, and is re-processed to the time
sync like any added recording, once the run has settled. If it could not join
(its frame rate no longer fits, say) the panel says "<name> could not join:
<reason>" and the upload stays its own dataset: fix the reason and add it again.
A queued recording is not counted among the recordings that hold the time sync.

To stop a change that is under way, press **Cancel time sync change**. It shows
while any recording is waiting, re-processing or held up by another run of it.
The time sync is withdrawn:

- Recordings that have not started are not re-processed, and recordings added
  to the merged dataset later are not either. Recordings already waiting to join
  still join once the running ones finish, without being re-processed; the page
  says "N recordings waiting to join will still join, without being
  re-processed."
- Recordings that are already re-processing finish, and those already moved keep
  the new time sync.
- The page says "Time sync change cancelled for 25 recordings.", and how many
  recordings already re-processing will finish. It does not follow them:
  removing recordings, the solver and versions wait until they have.

Nothing is deleted. If the recordings finished while you were deciding, nothing
is cancelled: the time sync stays, and recordings added later are brought to it.
If another tab or person cancelled it first, the page says it was already
cancelled. If another tab applied a different time sync while you were deciding,
you are asked again.

To resume, apply the time sync again with **Edit sync**, **Save…** and
**Apply**. The form starts from the time sync most recordings hold, which may be
the change you cancelled or, if fewer than half of the recordings had moved, the
one before it. Check that the form shows the change you cancelled before you
save, and set it again if it does not: saving the form as shown applies exactly
what it shows, and recordings that already hold it are left alone. A cancelled
change of the clock is not resumed, because the clock is never sent unless you
change it: each recording keeps its own clock.

What a time sync cannot do yet:

- **Change the frame rate.** A merged dataset does not hold mixed rates, so a
  clock that would change a recording's frame rate (a custom rate that differs
  from the one the recording has, or another row clock topic) is listed as
  needing action, with the reason. Leave the clock as it is to change only the
  alignment. A camera's cadence is written as one rate for all recordings, and
  the form says which.
- **Re-process a recording that holds trims or batch edits,** has split pieces
  or lacks the clock topic. These need action. A channel that a recording does
  not have is left as it is.
- **Correct camera lag on the merged dataset.** Each recording keeps its own
  camera lag fix from before the merge.

Recordings that are not ROS 2 recordings, such as LeRobot recordings, have no
time sync. They are counted apart ("3 recordings have no time sync") and left
out of the count of recordings that hold it.

For a recording that needs action, **Try again** checks and re-processes that
recording alone. **Remove from this dataset** makes it a standalone dataset
again, with its data and review decisions intact.

#### Takes the recorder marked nothing at

Where no marker says where a take starts, find the instant yourself and
draw a split there. `client.episodes.sample_series` reads traces and
`client.episodes.sign_videos` signs camera links. Try the recording-time
instants with `validate_only` first:

```python
client.episodes.split(dataset, {episode: [12.5, 31.0]}, validate_only=True)
client.episodes.split(dataset, {episode: [12.5, 31.0]})
preview = client.versions.preview(dataset, include=("kept",))
# Read every preview_items page and review any unprocessable takes first.
version = client.versions.create(dataset, "1.0", preview=preview)
```

This explicitly includes every kept take in the upload, including a fresh,
unflagged take that no person has kept yet. Saving a split does not change its
standing. If the take is flagged or rejected, review it and choose the matching
include group. Takes outside the selected groups are filtered before the
`unprocessable` list, so review the frozen items as well as omissions.

Split saves a drawing, not new head episodes. Publish freezes its kept
windows, measures them and creates immutable pieces only when you create
a version. A saved split remains editable on the original take; a piece in
an old version is read only. From the CLI, draw with
`qualia dataset split <episode> -d <dataset> --at 12.5 --at 31 --dry-run`,
then without `--dry-run`; inspect
`qualia dataset version-preview <dataset> --include kept`
and publish with `qualia dataset pin <dataset> 1.0 --preview <preview-name>`.
With footage-based re-cut enabled, an unchanged take retains that saved drawing;
changed footage is reported if the drawing is not carried. See
[Curation](https://docs.qualia.dev/global/guides/curation.md#versions) for preview selections and omissions.

#### A bad config costs you one second, not one transfer

`meta/ingest.toml` is validated at `upload/begin`, against the same parser the
real ingest uses, before the repo exists and before a byte moves. A typo is
refused in about a second with the line, the column and the accepted keys:

```
Error: /v1/datasets/upload/begin -> HTTP 400: invalid data: meta/ingest.toml: TOML parse error at line 5, column 1
  |
5 | event_topics = ["/recorder_event"]
  | ^^^^^^^^^^^^
unknown field `event_topics`, expected one of `cut_at_last_action`, `event_topic`, `events`, `spans`
```

Unknown keys are errors, not silently ignored, so a misspelled setting is
caught here rather than discovered as a wrong result later.
