#0052 SQL Validation #142

Merged
fuzzy merged 1 commit from feature/0052-sql-validation into main 2026-07-06 06:51:51 +00:00
Owner

Implements SQL validation module for ActionRecord integrity checks.

Changes:

  • src/hottea/validate.pyvalidate_record(), validate_records(), ValidationError
  • tests/test_validate.py — 18 tests covering all validation rules

Validation rules:

  • repo_id must be > 0
  • act_user_id must be > 0
  • user_id must be >= 0 (0 is valid for public visibility)
  • created_unix must be > 0
  • op_type must be in range 0-27 (2 for push commits)
  • created_unix date must not exceed end_date if provided
  • All errors reported at once per record

Closes: #0052, #0048, #0049, #0050, #0051

Implements SQL validation module for ActionRecord integrity checks. **Changes:** - `src/hottea/validate.py` — `validate_record()`, `validate_records()`, `ValidationError` - `tests/test_validate.py` — 18 tests covering all validation rules **Validation rules:** - `repo_id` must be > 0 - `act_user_id` must be > 0 - `user_id` must be >= 0 (0 is valid for public visibility) - `created_unix` must be > 0 - `op_type` must be in range 0-27 (2 for push commits) - `created_unix` date must not exceed `end_date` if provided - All errors reported at once per record **Closes:** #0052, #0048, #0049, #0050, #0051
feat(validate): implement SQL validation for ActionRecords
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m27s
22b9b2db87
Add validation module that checks ActionRecord integrity
before SQL generation.

- validate_record(): checks all fields, timestamps, op_type range
- validate_records(): filter valid records, skip invalid with warning
- Reports all errors at once for each invalid record

Closes #48, #49, #50, #51, #52
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 06:51:01 +00:00
the.auditor left a comment

Audit Review — PR #142

Clean SQL validation module. All 5 issues (#0048-#0052) addressed. Comprehensive validation rules with proper error aggregation (all errors reported at once per record). Thorough tests covering boundaries, edge cases, and the filter behavior of validate_records.

No suggestions — clean, well-tested PR.

Summary

Result: COMMENT — no issues found.

## Audit Review — PR #142 Clean SQL validation module. All 5 issues (#0048-#0052) addressed. Comprehensive validation rules with proper error aggregation (all errors reported at once per record). Thorough tests covering boundaries, edge cases, and the filter behavior of `validate_records`. No suggestions — clean, well-tested PR. ## Summary **Result:** COMMENT — no issues found.
the.auditor left a comment

APPROVED. Comprehensive validation with thorough test coverage. Merge when ready.

APPROVED. Comprehensive validation with thorough test coverage. Merge when ready.
fuzzy merged commit 22b9b2db87 into main 2026-07-06 06:51:51 +00:00
fuzzy deleted branch feature/0052-sql-validation 2026-07-06 06:51:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea!142
No description provided.