fix(effect): reject null for optional non-null properties - #3433
Conversation
Generated-output differences85 files differ — 85 modified, 0 new, 0 deleted |
… fix/effect-optional-properties
Generated-output differences90 files differ — 89 modified, 1 new, 0 deleted |
|
Why is this new schema test not enabled for all languages (except the ones that fail it of course)? |
* fix(dart): count Unicode code points in string bounds * test(dart): reuse shared Unicode length fixture
* fix(zod): count Unicode code points for string length * test(zod): use shared Unicode length cases
* fix(effect): count Unicode code points for string length * test(effect): use shared Unicode length cases
* fix(javascript): count Unicode code points for string length * test(javascript): use shared Unicode length cases
… fix/effect-optional-properties
|
Moved the cases into normal shared schema discovery. Every schema fixture receives them; skips cover reproduced failures accepting null. The cases pass for Effect, Zod, TypeScript, JavaScript, Flow, JSON Schema, Newtonsoft C# and C# records; CJSON passes without Valgrind. Other renderers reproduced the null-acceptance failure, including Haskell with the existing driver. Added skips for those failures. |
Generated-output differences106 files differ — 89 modified, 17 new, 0 deleted |
Generated-output differences99 files differ — 89 modified, 10 new, 0 deleted |
Generated-output differences99 files differ — 89 modified, 10 new, 0 deleted |
…-properties # Conflicts: # test/languages.ts
Generated-output differences99 files differ — 89 modified, 10 new, 0 deleted |
Optional string fields incorrectly accepted explicit null: the missing optional-property capability widened
S.StringtoS.NullOr(S.String). Advertise optional support so omission is allowed and null is rejected.Adds shared absent/string/null schema cases, discovered by every existing schema fixture. Skips cover reproduced failures in other renderers. The corrected graph also enables six existing source comparisons.
Validation: baseline accepts invalid null; the regression passes for Effect, Zod, TypeScript, JavaScript, Flow, JSON Schema, Newtonsoft C# and C# records. CJSON passes without unavailable Valgrind. Skips cover reproduced null-acceptance failures. Full CI passed before the final master merge; build and the Effect regression pass after it. Six source comparisons also passed. Production diff: 4 added lines.