Skip to content

fix: skip already-elapsed periods when catching up - #10

Merged
joshchen-dev merged 1 commit into
mainfrom
claude/great-shannon-b4y5vi
Oct 6, 2026
Merged

joshchen-dev merged 1 commit into
mainfrom
claude/great-shannon-b4y5vi

Conversation

@joshchen-dev

@joshchen-dev joshchen-dev commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • After downtime, the scheduler generated a poll for every missed period, including ones whose raids had all already started, then closed them on the same tick. That cluttered history with polls nobody could answer.
  • PublishNext now advances past a period whose last occurrence has already started, without inserting a poll. Catching up only publishes periods members can still vote on.
  • The scheduler logs skipped elapsed period for these steps instead of a misleading poll cycle advanced with poll ID 0.
  • Bumps the version to v0.0.10.

Verification

  • New TestCatchUpSkipsElapsedPeriods: three weeks offline, then catching up creates only the current period's poll (2026-09-28), and the schedule advances to 2026-10-05. Before the fix it created four polls (09-07, 09-14, 09-21, 09-28).
  • go test ./... with TEST_DATABASE_URL run three times, plus go vet ./....

After downtime the scheduler generated a poll for every missed period,
including ones whose raids had all started, then closed them on the same
tick. PublishNext now advances past such periods without inserting a
poll, so catching up publishes only the period members can still answer.
@joshchen-dev
joshchen-dev merged commit 951444a into main Oct 6, 2026
1 check passed
@joshchen-dev
joshchen-dev deleted the claude/great-shannon-b4y5vi branch October 6, 2026 12:05
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.

1 participant