description: The conformance corpus that defines chiptime's behavior: generated inputs, committed expected outputs, and byte-exact cross-language parity.¶
The conformance corpus¶
The corpus is chiptime's definition of correct — a language-agnostic suite of FIT files with committed expected outputs. Every implementation (Python today, TypeScript next) must reproduce them byte for byte.
Anatomy of a case¶
corpus/cases/temporal/zwift-local-timestamp-1989/
├── input.fit # generated by a committed script — never hand-edited
├── expected.json # the canonical output, committed
└── case.json # what this case proves + per-mode expectations
case.json grades each mode (ok / partial / reject, or raise:CODE for
strict), and ties the case back to the edge-case taxonomy item it covers.
Where cases come from¶
- A 104-item edge-case taxonomy — every documented FIT failure mode, from truncated headers to 12-bit HR event timestamps. Each taxonomy item maps to at least one corpus case.
- Public issue reports — failure modes reported publicly across the FIT ecosystem informed additional cases; every reproducible class became one.
- Real files — a private, git-ignored tier of real device files (they contain GPS traces of real homes; privacy policy in ADR-0007). The public corpus is 100% synthetic and safe.
Rules that keep it honest¶
- Inputs are generated, never hand-edited — every corrupt file comes from a committed generator script, and SHA-256 guards catch drift.
- Expected outputs are committed and diffed in CI on every change.
- Determinism is tested explicitly: each case is parsed twice and must match itself.