Skip to content

fix(collect): only send Pushover on genuine failure, not partial - #1

Merged
sigmanor merged 1 commit into
mainfrom
fix/collect-pushover-only-on-failure
Jul 28, 2026
Merged

fix(collect): only send Pushover on genuine failure, not partial#1
sigmanor merged 1 commit into
mainfrom
fix/collect-pushover-only-on-failure

Conversation

@sigmanor

Copy link
Copy Markdown
Member

Problem

The collect cron sent a Pushover notification on every non-ok result, including partial. In practice a partial collect run just means a few repositories hit transient errors (or were skipped) while the rest were collected successfully — normal operation that shouldn't page the user.

This pairs with think-root/content-alchemist#4: after that fix, quality-skipped repos no longer inflate the failure count, but partial runs (real transient per-repo errors) can still occur and shouldn't notify.

Fix

In CollectJob, send NotifyCronResult only when status == 0 (all repositories failed, or the job panicked). Notifications now fire only on genuine failure.

  • LogCronExecution still records every status (0/1/2), so the UI/history is unchanged.
  • The panic path still notifies (it passes status = 0).
  • The message cron is intentionally left as-is: there partial means a post published to some platforms but failed on others, which is worth a notification.

Scope

One file, internal/schedule/collect-schedule.go. Builds clean (go build ./...).

The collect job fired a Pushover notification on every non-ok result,
including "partial" runs. After the content-alchemist fix, a partial
collect just means a few repos hit transient errors while the rest were
collected successfully - that is normal operation and shouldn't page.

Send the collect notification only when status == 0 (all repos failed or
the job panicked). LogCronExecution still records every status, so the
UI/history is unchanged. The message cron keeps notifying on partial,
where it means a post published to some platforms but failed on others.
@sigmanor
sigmanor merged commit 49fee62 into main Jul 28, 2026
1 check passed
@sigmanor
sigmanor deleted the fix/collect-pushover-only-on-failure branch July 28, 2026 15:19
@sigmanor

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 3.7.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant