Module 14 · In Studio · challenge 3 of 3 in this lesson

challenges/work/retention_rules.luau computes UTC day and week keys accurately

A test in Studio grades it and prints a pass code.

Open

Level 3, Professional

Challenge

Start from m14-ship in the game repo and implement the pure quest rotation, claim and forgiving-streak rules in challenges/work/retention_rules.luau, then verify with game.ServerScriptService.RunGameTests:Invoke("retention-design", "retention-rules-lab").

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("retention-design", "retention-rules-lab") in the server command bar. Copy the pass code from Output.

Done means

  • challenges/work/retention_rules.luau computes UTC day and week keys accurately
  • pickDailies returns distinct deterministic quests that rotate across days and clamp to the pool size
  • recordProgress filters by event, ignores non-positive values and clamps at target; claimQuest pays once only
  • advanceStreak implements started, same_day, incremented, grace_used (7-day cooldown) and reset without mutating input
  • RunGameTests:Invoke("retention-design", "retention-rules-lab") passes all 15 checks

The Course Runner prints this code when the test passes.