Repository navigation
fix(bot): persist bump notice across rolling updates - #331
Merged
Merged
Conversation
The 2-hour bump-availability reminder was scheduled with a bare setTimeout in BumpCommand, so a rolling update's pod restart silently dropped any pending notice. Persist the job (channel, content, role, fireAt) to Redis alongside arming the timer, and re-arm every pending job from Redis on clientReady, same pattern as Tts's voice session restore. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Preview deployed to: https://ThunLights.github.io/distopia/storybook/pr-preview-331 |
|
Add Carrot credits or activate Agent usage billing to use Autopilot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setTimeoutinsideBumpCommand, so a rolling update's pod restart silently dropped any pending notice.Guild.saveBumpNotice/clearBumpNotice/getAllBumpNotices(app-core) to persist the notice job (channel, content, role, commandId, fire time) to Redis, TTL'd to match.presentation-bot/src/utils/bump/notice.tswithscheduleBumpNotice/restoreBumpNotices, mirroring the existing TTS voice-session restore pattern —client.ts'sclientReadyhandler now re-arms every pending notice on boot (firing immediately if already past due).BumpCommandnow persists the job before arming the timer instead of only holding it in memory.Test plan
bun run typecheck -- --filter=app-core --filter=presentation-botbun run lint -- --filter=app-core --filter=presentation-botbun run test -- --filter=app-core --filter=presentation-bot🤖 Generated with Claude Code