Skip to content

Fix lost achievement announcements and retry exact-message forwards - #263

Merged
Fillll merged 2 commits into
masterfrom
fix/achievement-announcement-reliability
Oct 17, 2026
Merged

Fillll merged 2 commits into
masterfrom
fix/achievement-announcement-reliability

Conversation

@Fillll

@Fillll Fillll commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Milestones were saved as completed before posting to @reddit2telegram. A failed post was then skipped permanently, and a later retry could no longer detect the crossing after subscriber history advanced. Forwarding was an empty method. Missing/zero history, one bad channel, or a failed status report could also interrupt the sweep; starting it depended on fetching Reddit content.

Persist each new crossing before advancing statistics, then retry pending deliveries on subsequent six-hour sweeps. Record confirmed message IDs as each part is sent and resume forwarding those exact IDs without publishing another announcement. Use atomic history updates and an expiring sweep lease. Run maintenance directly, isolate individual failures, and establish a baseline for new channels. Preserve the Reddit promotion format with the channel/milestone first; fall back to milestone text if Reddit is unavailable before a posting attempt or has no usable candidate. Separate promotion formatting from daily promotion selection.

Existing achievement history is preserved; no migration or historical replay is performed because previous records do not establish that a post was sent. New settings records include delivery attempts, confirmed IDs, and failure types. Telegram does not provide send idempotency: a lost response or a crash between acknowledgment and persistence can still produce a duplicate on retry. A partially published gallery keeps and forwards its confirmed announcement instead of reposting it.

Validation:

  • Full offline suite: 82 passed, 19 opt-in live tests skipped, 21 subtests passed; includes 24 new achievement regression cases using MongoDB-compatible in-memory collections and a unique settings index.
  • Release tooling: 12 tests passed; patch release validation passed against origin/master.
  • Live smoke test used only @r_channels_test: acknowledged message 4084 and successfully forwarded it as 4085. No announcement was sent to production channels.
  • Reviewed the complete diff. Unrelated local edits remain in the original checkout.

Patch bump to 1.0.7 covers compatible delivery/recovery fixes and internal state, with no migration.

SemVer: patch

@Fillll
Fillll merged commit c463f0c into master Oct 17, 2026
3 checks passed
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.

2 participants