Stage 17: robot-nudge frequency + per-game push language #30

Merged
developer merged 1 commits from feature/nudge-fix into development 2026-06-09 06:12:11 +00:00
Owner

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], ceil ramping 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) on push.Event, and the gateway routes by it (non-game pushes still use service_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: proactiveNudgeGap unit (first 60-90 min, grows, capped 1-6 h, deterministic); retimed TestRobotProactiveNudge (none by 30 min, one by 2 h); TestVariantLanguage; emit your_turn/game_over language; TestNudgeRoutedByGameLanguage integration. gofmt/vet/build/full unit + the touched integration tests green. Docs: ARCHITECTURE, FUNCTIONAL (+ _ru), PLAN.

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]`, `ceil` ramping 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`) on `push.Event`, and the gateway routes by it (non-game pushes still use `service_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:** `proactiveNudgeGap` unit (first 60-90 min, grows, capped 1-6 h, deterministic); retimed `TestRobotProactiveNudge` (none by 30 min, one by 2 h); `TestVariantLanguage`; emit `your_turn`/`game_over` language; `TestNudgeRoutedByGameLanguage` integration. gofmt/vet/build/full unit + the touched integration tests green. Docs: ARCHITECTURE, FUNCTIONAL (+ _ru), PLAN.
developer added 1 commit 2026-06-09 06:07:13 +00:00
Stage 17: fix the robot-nudge frequency + per-game push language
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Has been skipped
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m6s
bf7dca0a09
Two owner-reported defects from a live contour game.

A. Frequency: the robot's proactive nudge fired hourly for 12h+ (a 12h idle threshold
   then the 1h cooldown, uncapped). Replaced with a lengthening, randomized schedule
   (proactiveNudgeGap): the first nudge ~60-90 min into the human's turn, each later gap
   growing toward 1-6h (uniform sample in [60min, ceil], ceil ramping 90min->6h over 12h
   of idle, measured from the previous nudge), so a long wait gets a handful of
   increasingly-spaced reminders instead of a stream.

B. Language: out-of-app push routed by the recipient's GLOBAL service_language
   (last-login-wins), so after re-logging via the RU bot an 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) on push.Event, and the gateway
   routes by it (falling back to service_language for non-game pushes). The New-Game
   variant-gating guarantees the game's bot is one the player has started, so delivery is
   never blocked.

Tests: proactiveNudgeGap unit + retimed TestRobotProactiveNudge; TestVariantLanguage;
emit your_turn/game_over language; TestNudgeRoutedByGameLanguage integration. Docs:
ARCHITECTURE (§7 nudge, §10/§13 routing), FUNCTIONAL (+ _ru), PLAN tracker.
owner approved these changes 2026-06-09 06:11:50 +00:00
developer merged commit 70e3fab512 into development 2026-06-09 06:12:11 +00:00
developer deleted branch feature/nudge-fix 2026-06-09 06:12:11 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#30