Skip to content

Commit e41eded

Browse files
Staacksclaude
andcommitted
Export set row count: longest column is canonical (ruled 2026-08-25)
Both platforms size an export set by its FIRST column, silently truncating longer later columns - and dropping a whole set when the first container is empty, as the T1 export validation found on motion_stopwatch (dtlist filled, tlist empty, zero rows in all six formats). The maintainer overruled it: the longest column determines the row count; shorter columns keep the existing NaN padding. Recorded as export-set-row-count (decided - both platforms diverge from the canonical identically), marked on the export docs, and the ruled semantics stated in the set element's spec description. The T1 driver already matches the ruling (rows required when any source buffer filled), so no driver change - motion_stopwatch goes green when the writers conform. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 88941d7 commit e41eded

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

‎docs/file-format/index.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ The export block may hold one or more *set* blocks, grouping and naming multiple
257257

258258
### Block: set
259259

260-
The set block will define a group of data-containers to be exported. The sets are represented in the final file: a CSV export results in a ZIP file containing a separate CSV file for each set, and an Excel export will contain a separate sheet for each set, in both cases named by the *name* attribute.
260+
The set block will define a group of data-containers to be exported. The sets are represented in the final file: a CSV export results in a ZIP file containing a separate CSV file for each set, and an Excel export will contain a separate sheet for each set, in both cases named by the *name* attribute. The number of rows is determined by the set's longest column; shorter columns are padded with NaN for the missing entries.
261+
262+
{{inconsistency:export-set-row-count}}
261263

262264
#### Tag: data
263265

‎inconsistencies.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,31 @@
8989
A non-power-of-two number of input samples yields a different output
9090
length and different values on the two platforms; a power-of-two input
9191
gives identical results on both.
92+
93+
- id: export-set-row-count
94+
title: Row count of an export set
95+
area: file-format
96+
status: decided
97+
canonical: >-
98+
The number of rows a set exports is determined by its LONGEST column
99+
(ruled 2026-08-25); shorter columns keep the existing NaN padding for
100+
the missing entries. The current first-column rule silently drops
101+
every value beyond the first column's length - motion_stopwatch's
102+
dtlist data never appears in an export while tlist is empty, which is
103+
data loss, not formatting.
104+
affects:
105+
android: >-
106+
The first column determines the number of rows (DataExport.java,
107+
the comment says so verbatim); longer later columns are truncated.
108+
ios: >-
109+
Same rule - rows iterate 0..<columns.first.count
110+
(ExperimentExportSet.swift), shorter later columns are NaN-padded,
111+
longer ones truncated.
112+
summary: >-
113+
Both platforms size an export set by its FIRST column, so a set whose
114+
first data container holds fewer values than a later one silently
115+
drops the excess - including the whole set when the first container
116+
is empty. Found 2026-08-25 by the T1 export validation
117+
(motion_stopwatch); ruled: the longest column determines the row
118+
count. Identical on both platforms today, so this is a decided
119+
behavior change rather than a divergence between them.

‎spec/root.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ elements:
412412
parent: export
413413
since: "1.0"
414414
summary: One sheet or file of the export.
415+
description: >-
416+
One sheet (Excel) or file (CSV) of the export, holding its data
417+
elements as columns. The number of rows is determined by the set's
418+
longest column (decided 2026-08-25 - see the export-set-row-count
419+
entry while both platforms still size by the first column); shorter
420+
columns are padded with NaN for the missing entries.
415421
children: [data]
416422
attributes:
417423
- name: name

0 commit comments

Comments
 (0)