Skip to main content
MediumBug fixJavaScript30 min

Ops Panel Undercounts Cold-Streak Recovery Windows

A practice debugging interview round in JavaScript. Reproduce the failure in an unfamiliar codebase, narrow down the cause, ship a minimal fix, and explain your reasoning to an AI interviewer.

The incident

Incident Report

The data-center operations panel annotates each temperature reading with how many minutes pass before that sensor reports a warmer value, using each reading's observed timestamp. After a refactor, some cold streaks show shorter or missing wait windows, so downstream alert summaries under-report how long racks ran hot.

Artifacts

  • The telemetry contract is documented in README.md.
  • The editable annotation logic is in src/temperature-alerts.js.
  • src/alert-summary.js is a shared reporting helper and should be treated as read-only.
  • Visible regression coverage is in tests/temperature-alerts.test.js.

Your Task

  1. Reproduce the failing behavior and write a hypothesis.
  2. Patch the annotation logic with the smallest code change that matches the telemetry contract.
  3. Verify the visible tests and explain what regression coverage would prevent this from returning.

What this round practices

A refactor changed how the ops panel computes wait windows, and the alerts now look calmer than reality. The round practices reading a time-series contract, building small streaks by hand to see where the numbers diverge, and checking the edge cases a refactor tends to drop.

Files you will work in

These 5 workspace files open in the in-browser editor when you start the round. Hidden tests also run when you submit.

  • task.md
  • README.md
  • src/temperature-alerts.js
  • src/alert-summary.js
  • tests/temperature-alerts.test.js

What you are assessed on

The scored report evaluates both your investigation steps and what you explain during the conversation, not only whether the final test run passes.

  • Reproduction
  • File navigation
  • Evidence gathering
  • Hypothesis
  • Root-cause understanding
  • Regression prevention
  • Patch scope
  • Verification
  • Edit control
  • Communication clarity

How the round works

You get 30 minutes in a JavaScript workspace that runs in your browser, with no setup. Talk through your plan with the AI interviewer by voice or text, run the tests as often as you like, and submit when the visible checks pass. Hidden tests run on submit, and the scored report covers what you did and what you explained.

Ready to debug this codebase?

Open the workspace, run the failing check first, and walk the AI interviewer through your findings.