The Metric Mars Mission

Easy

· Backend

Incident

SEV-3

BUG-MCO-99

Priority: $327M · reported by nav team

Time to fix: 10 min

Failing checks on the shipped build

  • the conversion factor is applied

    expected 444.822 but got 100

  • unit impulse converts exactly

    expected 4.448 but got 1

How to work this incident

  1. Read the report: write down the expected behaviour and the actual one in a sentence each.
  2. Reproduce it: run the visible tests and find the failing check that matches the report.
  3. Read the logs and the failing checks for the first value that is wrong — the earliest wrong value is nearer the cause than the loudest error.
  4. Follow the request through the handler, the validation and the service it calls; find the first step whose output disagrees with the report.
  5. Fix the cause rather than the symptom, run the visible tests again, and submit against the hidden ones — then write the root cause down.

Inspired by

NASA · Mars Climate Orbiter

Inspired by the Mars Climate Orbiter, lost in 1999 because one team produced thruster data in pound-force seconds and the other consumed it as newton seconds. No conversion, no Mars.

thrust.py ingests ground-software impulse readings (lbf·s) for the navigation stack (N·s). It currently forwards the raw number.

Code map

# Converts ground-software impulse (pound-force seconds) to newton seconds.

LBF_TO_N = 4.448222

def to_newton_seconds(lbf_s):
    return lbf_s

Sign in to edit the file, run the tests and submit a fix

A free account — no card, no trial clock. You come straight back here.

The Metric Mars Mission — Python Bug Hunt

Inspired by the Mars Climate Orbiter, lost in 1999 because one team produced thruster data in pound-force seconds and the other consumed it as newton seconds.

  • Language: Python
  • Layer: Backend
  • Difficulty: Easy
  • Concepts: Units, Conversion
  • Modelled on: NASA · Mars Climate Orbiter
  • Visible tests: the conversion factor is applied; unit impulse converts exactly
  • Reward: 50 XP for a complete fix

Incident

  • Severity: SEV-3 (priority: $327M)
  • Ticket: BUG-MCO-99
  • Reported by: nav team
  • Time to fix: 10 minutes, the target for an easy incident

Failing checks on the shipped build

  • the conversion factor is applied — expected 444.822 but got 100
  • unit impulse converts exactly — expected 4.448 but got 1

How to work this incident

  1. Read the report: write down the expected behaviour and the actual one in a sentence each.
  2. Reproduce it: run the visible tests and find the failing check that matches the report.
  3. Read the logs and the failing checks for the first value that is wrong — the earliest wrong value is nearer the cause than the loudest error.
  4. Follow the request through the handler, the validation and the service it calls; find the first step whose output disagrees with the report.
  5. Fix the cause rather than the symptom, run the visible tests again, and submit against the hidden ones — then write the root cause down.

Briefing

Inspired by the Mars Climate Orbiter, lost in 1999 because one team produced thruster data in pound-force seconds and the other consumed it as newton seconds. No conversion, no Mars.

thrust.py ingests ground-software impulse readings (lbf·s) for the navigation stack (N·s). It currently forwards the raw number.

Bug report

BUG-MCO-99 · Priority: $327M · Reported by: nav team

to_newton_seconds(lbf_s) must convert using 1 lbf = 4.448222 N and round to 3 decimal places.

Observed: the value passes through unconverted — every burn is ~4.45x weaker than commanded, and the trajectory sinks into the atmosphere.

Logs

[nav] AMD file impulse=100 -> burn planned with 100 N·s (expected 444.822)

The code as shipped

src/nav/thrust.py (editable)

# Converts ground-software impulse (pound-force seconds) to newton seconds.

LBF_TO_N = 4.448222

def to_newton_seconds(lbf_s):
    return lbf_s

Open the hunt to start the incident clock, edit the files, run the visible tests and submit against the hidden ones, then write the root cause down. More Python bug hunts.