Skip to content

Run the conformance vectors

Conformance is testable: an implementation demonstrates it by round-tripping the published test vectors for the profile and tier it claims — judged on inputs and outputs, with equivalence decided by the suite’s normalized-equivalence method (conformance/EQUIVALENCE.md), which the reference implementation implements as the equivalence oracle. The reference implementation ships a vector runner.

  1. From your openbody-ts checkout (with openbody/ as a sibling):

    Terminal window
    npm run vectors # run the standard's conformance vectors against this impl

    The runner reads the vectors from ../openbody/conformance/vectors/ by default; override the standard location with OPENBODY_STANDARD=/path/to/openbody.

  2. Run the full test suite — typecheck, lint, and the vitest suite, including the incumbent mapper round-trips (every mapped wire record validates and normalization is idempotent) and the lossless-number guarantee (EQUIVALENCE.md step 1):

    Terminal window
    npm test

What the vectors cover

The minimum core vectors (the conformance bar, SPEC §8.3) cover:

  • each of the five WorkUnit.scoring kinds (reps|time|distance|continuous|energy);
  • a resistance set, an interval/round scheme (AMRAP / EMOM / for-time / Tabata), and a continuous-endurance record;
  • both the scalar and Target forms of a metric value;
  • both the nested and flat + partOf encodings of one containment structure, asserted equivalent;
  • an unresolved ExerciseRef (opaque only), an unknown extension, and an unknown open-vocabulary token — each asserted to round-trip losslessly;
  • a supersession lineage (correction) and a tombstone;
  • a sampleArray in regular (frequencyHz) and irregular (offsets), scalar and multi-channel, including a null dropped sample;
  • a normalization-determinism vector: a multi-WorkUnit Exercise with a sets: N shorthand and an id-less inlined child, with its exact post-normalization ids and partOf links asserted (per EQUIVALENCE.md), plus a number-canonicalization case.

The vector files live in conformance/vectors/ with an index.json manifest; the Conformance section explains profiles and how to claim “OpenBody Compatible”. Alongside them, the extended activity-coverage corpus (conformance/corpus/, documented in CORPUS.md) is coverage validation, not a conformance bar.