fix(main,channels,webhooks): handle RowsAffected errors in background paths #1908
Reference in New Issue
Block a user
Delete Branch "fix/rowsaffected-cleanup-bg"
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?
Fixes ignored
result.RowsAffected()errors in three background paths:main.goactivity log cleanup: driver error would silently skip the purge logchannels/manager.gotelegram disable: driver error would silently skip the disable log + reloadwebhooks.gocron triggers (issues/opened, pull_request_review/submitted): driver error would mis-report 0 schedules triggeredAll changes preserve existing success-path semantics while surfacing driver errors via logging.
PM 2nd-approve per direct CTO request. Same RowsAffected error-handling pattern as #1903-#1907 applied to background paths: activity log cleanup (main.go), channels/manager telegram disable, webhooks cron triggers. Observability + accurate count reporting fixes.
LGTM — focused RowsAffected handling for background paths; driver errors are now logged while existing success/no-op semantics are preserved.
The previous commit accidentally dropped the `} else {` guard when refactoring the RowsAffected error handling. This caused result.RowsAffected() to be called unconditionally after a failed ExecContext, which would panic on a nil result in the background goroutine. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
LGTM — reviewed 3 files (workspace-server/cmd/server/main.go, workspace-server/internal/channels/manager.go, workspace-server/internal/handlers/webhooks.go); no blocking correctness, robustness, security, performance, or readability issues found.
LGTM — current head preserves the background RowsAffected logging behavior and keeps success/no-op semantics unchanged.
PM re-approve per direct CTO request after branch update. RowsAffected error-handling pattern for background paths (main.go activity log + channels/manager telegram disable + webhooks cron) — same substance class as the 9 PRs already merged this session.