Roundup scheduler rebuild + role mention + render fixes#109
Merged
Conversation
…able evaluateTick
…row on send failure
…l backslash-paren)
… when seasons exist
…ntion under 1.5.5" This reverts commit b9c7c81.
…-safe legacy migration
Replace the Role-ID text input with a <select> populated from /api/discord-roles
when the bot is running. Keeps the same WEEKLY_ROUNDUP_ROLE_ID config field
(snowflake string), so server-side validation and the role-mention send path
are unchanged. Adds the missing config.weekly_roundup_role_{label,help,none}
keys to en/de/sv/template.
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
Rebuild of the Weekly Roundup scheduler addressing v1.5.5 beta feedback (scheduler did not trigger even with TZ set; no observability into why). Also bundles the open render fixes and the optional role-mention feature request.
Scheduler
bot/roundupScheduler.jsowns the hourly tick loop and exposesevaluateTick(now)which returns{ action: "post" | "skip", reason }with explicit reasons (not-enabled,no-channel,wrong-weekday,before-target-hour,already-posted-this-week,circuit-open). Every tick is logged at info level — no more silent scheduler.setTimeout(msUntilNextHour)so they re-align across DST instead of drifting on a fixedsetInterval.bot/weeklyRoundup.jsis now post-rendering only; scheduler/idempotency/circuit-breaker live in their own modules.bot/roundupState.jsextended withlastPostedAt+ per-week failure list (3 failures → circuit opens). LegacyWEEKLY_ROUNDUP_LAST_POSTED_ATis silently migrated on first boot, wrapped in try/catch so a corrupt state file cannot crash the bot.getDay()/getHours(). SetTZ=Europe/Berlin(or your zone) indocker-compose.yml— single source of truth, replaces the unreleasedWEEKLY_ROUNDUP_TZfield that never reached the dashboard.WEEKLY_ROUNDUP_ENABLED=truebut no channel configured, or ifWEEKLY_ROUNDUP_ROLE_IDis set but malformed.Render fixes (beta feedback)
(/)—Hoppers (2026)rendered asHoppers \(2026\)because parens aren't markdown control chars inside masked-link labels.DateCreated.Role mention
WEEKLY_ROUNDUP_ROLE_ID(dashboard field under Weekly Roundup). When set to a valid Discord role snowflake (17–20 digits), the post pings that role via<@&id>content +allowedMentions: { parse: ["roles"] }so it cannot escalate to@everyone. Skipped in test mode.