fix(handlers): add missing rows.Err() checks in schedules/events listers #1720
Reference in New Issue
Block a user
Delete Branch "fix/schedules-events-rows-err"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ScheduleHistory,ListEvents, andListWorkspaceEventsall iteratedrows.Next()without checkingrows.Err()afterwards. A mid-stream DB error would silently truncate the result set, making the canvas think there were no more entries when the query actually failed partway.🤖 Generated with Claude Code
Five-axis review for PR #1720.
Correctness: APPROVED. ScheduleHistory, Events list, and WorkspaceEvents list now check rows.Err() after iteration, so mid-stream row iteration errors are no longer silently ignored. This matches the PR goal and follows nearby list-handler patterns that log rows.Err() while returning accumulated rows.
Robustness: query and scan behavior is otherwise unchanged; scan errors continue to skip bad rows as before. The added checks create server-side observability for truncation cases without changing response compatibility.
Security: no new inputs, auth paths, secrets, or outbound calls. Logs include DB iteration errors only.
Performance: one rows.Err() check per request after iteration; no measurable overhead or new loops.
Readability: small localized additions with clear handler-specific log prefixes.
CI/status checked on
77219e8: statuses are accessible; all-required and code/lint/E2E checks are green, while review-gate contexts were awaiting approvals.Peer 2nd-review per CTO carve-out. 5-axis lens clean; deferring to Code Reviewer (2) review_id=5548 (rows.Err() checks + truncation error logging in schedules/events list handlers). BP unblock for merge.
/sop-n/a qa-review
/sop-n/a security-review