Commit cce757b
docs(contract): §4 — add a JSON scalar-typing clause (#29)
Closes #27. §4 pinned down which codecs exist and the stdout/stderr
split, and §2 pins timestamp formatting, but nothing pinned the JSON
type of an individual field. That gap produced the same class of bug
four times across two repos (liftoff #33 quoted-string bodyweight,
liftoff #36 duration-only-as-prose, withings #27/#20/#42
key-and-type drift). One unwritten rule violated repeatedly.
Adds a Scalar typing subsection under §4 with three requirements —
numbers are JSON numbers not strings; a logical field has one type
(and null, not ""/0, when absent) across every subcommand; a
human-formatted quantity ships a canonical-unit sibling — plus the
timestamp carve-out (§2 already fixes their shape).
Status table gains a JSON-scalar-typing row: liftoff is human-attested
(fixed its known violations in v1.3.0), withings and crono stay at —
(withings has open violations #27/#20/#42; crono is unaudited).
Not machine-attested yet: a compat/scalars bundle is the follow-up, and
it inherits the enforcement-reach gap #27 flags — liftoff and withings
import only compat/formats, so a new bundle needs their imports widened
to actually run in their CI. Tracked separately rather than bundled into
this text change.
Claude-Session: https://claude.ai/code/session_012MvqxTC64Z9EEDewCUbNNo
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fec40e8 commit cce757b
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
| |||
0 commit comments