mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 16:42:41 +00:00
Replace the single daily-tick gift resolution with independent per-gift expiries. Each gift now has its own 6h voting window; once that elapses, the votes are tallied, the sender gets DM feedback, and the live game-room post is edited to reveal the type and resolved modifier. The modifier sits on the run waiting for the next floor resolution to merge it in. Effect: - Gifts fire continuously throughout the day rather than all at once at 08:00 UTC, surfacing sender activity in real time. - Senders get fast feedback (~6h instead of waiting for the next daily tick). - Floor resolution becomes purely "sum pending modifiers from already- resolved gifts" — cleaner separation of concerns. - Atomic per-gift apply via markCoopGiftApplied (UPDATE...WHERE applied_at IS NULL) prevents double-application on retry. Schema additions: - coop_dungeon_gifts.expires_at (when voting closes) - coop_dungeon_gifts.applied_at (when modifier merged into a floor) - Migration entries provided. Defensive backstop: floor resolution still force-resolves any gifts whose expiry was missed (e.g., bot down during the timer window). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>