Fix schema generation for embedded recursive structs #17
BugBot Review
BugBot Analysis Progress (5m 50s elapsed)
✅ Gathered PR context (1s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 1 potential bug found (5m 45s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 1 bug reported (2s)
✅ Analysis completed successfully (0s)
Final Result: BugBot completed review and found 1 potential issue
Request ID: serverGenReqId_a67b6325-feab-4467-b700-9ab9e59468ac
Details
Bug: String Length Validation Now Counts Code Points
String validation methods (len, min, max, gt, gte, lt, lte) now use custom .refine() functions with [...val].length instead of Zod's native .min(), .max(), and .length() methods. This changes string length counting from UTF-16 code units to Unicode code points/graphemes, leading to different validation results for multi-byte characters and emojis. This breaking change appears to be an accidental side effect unrelated to the PR's goal of fixing recursive embedded structs.
zod.go#L939-L970
Lines 939 to 970 in 924b7cd
Was this report helpful? Give feedback by reacting with 👍 or 👎