Summary
Relational column type "number" accepts NaN and Infinity because validation uses typeof value === "number" only. Values store as JSON null or break round-trip — schema contract violated silently.
Audit ID: Section 2 Med — Wave 2
Root cause
case "number":
return typeof value === "number";
Fix
Use Number.isFinite(value); throw with same style as other validation errors in validateRow().
Tests
- Insert row with
NaN column → throws.
- Insert
Infinity → throws.
- Normal numbers still pass.
Acceptance criteria
Verification
Summary
Relational column type
"number"acceptsNaNandInfinitybecause validation usestypeof value === "number"only. Values store as JSONnullor break round-trip — schema contract violated silently.Audit ID: Section 2 Med — Wave 2
Root cause
Fix
Use
Number.isFinite(value); throw with same style as other validation errors invalidateRow().Tests
NaNcolumn → throws.Infinity→ throws.Acceptance criteria
src/lens/relational.test.ts.bun run gategreen.Verification