Problem
validate_rows() in runtime/validator.py assumes its input is a list[dict] but never checks. A builder that returns None, a plain dict, or any non-list type will produce a confusing TypeError or AttributeError deep in iteration rather than a clear validation error.
Scope
- File:
builders/server/runtime/validator.py (30 lines total)
- Change: ~3 lines added to
validate_rows()
- No other files need to change
Good test to add: a unit test in builders/server/tests/runtime/test_validator.py asserting that validate_rows(None, schema) and validate_rows({}, schema) both raise ValidationError with a descriptive message.
Problem
validate_rows()inruntime/validator.pyassumes its input is alist[dict]but never checks. A builder that returnsNone, a plain dict, or any non-list type will produce a confusingTypeErrororAttributeErrordeep in iteration rather than a clear validation error.Scope
builders/server/runtime/validator.py(30 lines total)validate_rows()Good test to add: a unit test in
builders/server/tests/runtime/test_validator.pyasserting thatvalidate_rows(None, schema)andvalidate_rows({}, schema)both raiseValidationErrorwith a descriptive message.