Stage 17: robot-nudge frequency + per-game push language #30
Reference in New Issue
Block a user
Delete Branch "feature/nudge-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two defects you caught on the contour game
019ea0a9-….A — Frequency. The robot proactively nudged hourly for 12 h+ (a 12 h idle threshold, then the 1 h cooldown, uncapped — 13+ in a day). Replaced with a lengthening, randomized schedule (
proactiveNudgeGap): the first nudge ~60-90 min into the human's turn, each later gap growing toward 1-6 h the longer the wait drags (a uniform sample in[60 min, ceil],ceilramping 90 min → 6 h over 12 h of idle, measured from the previous nudge). So a long wait gets a handful of increasingly-spaced reminders, as you asked.B — Language. The push routed by the recipient's global
service_language(last-login-wins), so once you re-logged through the RU bot, the English game's nudges came from the RU bot. Now a game push (your_turn, game_over, nudge, match_found) carries the game's own language (engine.Variant.Language) onpush.Event, and the gateway routes by it (non-game pushes still useservice_language). The New-Game variant-gating means the game's bot is always one the player has started → delivery is never blocked, as you noted.Tests:
proactiveNudgeGapunit (first 60-90 min, grows, capped 1-6 h, deterministic); retimedTestRobotProactiveNudge(none by 30 min, one by 2 h);TestVariantLanguage; emityour_turn/game_overlanguage;TestNudgeRoutedByGameLanguageintegration. gofmt/vet/build/full unit + the touched integration tests green. Docs: ARCHITECTURE, FUNCTIONAL (+ _ru), PLAN.