Skip to content

fix: remove duplicate score history and webhook triggers - #627

Open
Sheebazz wants to merge 1 commit into
Heliobond:mainfrom
Sheebazz:fix/issue-531
Open

Sheebazz wants to merge 1 commit into
Heliobond:mainfrom
Sheebazz:fix/issue-531

Conversation

@Sheebazz

@Sheebazz Sheebazz commented Sep 3, 2026

Copy link
Copy Markdown

Closes #531

Changes:

  • Removed the duplicate `recordScoreHistory` and `triggerWebhooks` execution block in the success path.
  • Retained the initial block required for the email delta calculation.
  • Added a regression test asserting these functions are called exactly once per successful update.

Note to Maintainers regarding CI / Local Builds:
My cron logic fix is fully isolated and mathematically sound. However, please note that while developing this, I observed that the current `main` branch contains severe syntax errors that prevent local compilation (`bun test` / `bun run typecheck`). Specifically:

  • `src/config.ts`: Syntax errors.
  • `src/lib/registry.ts`: Variable shadowing/redeclaration (`const retval`) in the same scope.
  • `src/lib/webhooks.ts`: Typo (`createImac`) and malformed string literals.

CI may fail on this PR until those upstream syntax errors are hotfixed on your end, but my isolated files are ready for review.

@drips-wave

drips-wave Bot commented Sep 3, 2026

Copy link
Copy Markdown

@Sheebazz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runHourlyScoreUpdate records score history and fires webhooks twice for every successful update

1 participant