Module 15 · In Studio · challenge 2 of 2 in this lesson

Repo challenge: kill switch, triage and recovery rules

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

Open

Level 3, Professional

Challenge

The challenge files ship in every tag from m14-ship on, so you can solve it in the checkout you just built. Edit challenges/work/incident_ops.luau and run challenges/incidents.luau through the Course Runner. Solution: challenges/solutions/incidents.md.

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

Done means

  • isShopEnabled returns false immediately on boolean false and defaults to true on nil, true or non-boolean values
  • classifySeverity maps dataCorruption/joinBlocked/economyExploit to SEV-1, purchasesBroken or crashRate >= 0.05 to SEV-2, degradedFeature or crashRate >= 0.01 to SEV-3, else SEV-4
  • shouldRollback returns true only when newVersion > prevVersion, newErrorRate >= baselineErrorRate * 3 and newErrorRate >= 0.02
  • validateRecoveryPlan rejects hard_restart_first and overwrite_active_session, requires every recovery step including scope_affected, keeps kill_switch and rollback_or_fix before delayed_restart, and allows merge_restore only after delayed_restart, after scope_affected (else restore_before_scope) and after kick_affected, so the affected players are out of session (else restore_while_players_in_session)

The Course Runner prints this code when the test passes.