Open lesson

Mission: follow the page through the corridors

Command palette

This mission workspace keeps code and notes in this browser tab. Export them before closing it. Running code is practice, not an automatic grade for the mission.

Brief

Locate a pipeline discrepancy by connecting logs, metrics, and a trace without destroying evidence.

Voss says TRANSFER-7 'never arrived.' Imani sets the R42 counts on the table, and Mara wants an answer before the fictional meeting. Follow the row like a detective following doors: intake, validation, publication. Do not change original systems. Time is short in the story; the exercise has no timer.

Your mission

  1. Describe what a log, metric, and trace each contribute.
  2. Find where the publishable count falls from two rows to one.
  3. Assess hypotheses A and B using the counts.
  4. Write a conclusion that separates an observed fact from an unknown cause.

How to check your work

  • Log = dated event; metric = number; trace = R42's path.
  • Break at validate, with one row quarantined.
  • A contradicted; B supported by the counts.
  • Why the field was missing and who caused it remain unknown.

Course example

records = [
    {"run_id": "R42", "stage": "intake", "time": "21:34", "in": 2, "out": 2, "quarantine": 0},
    {"run_id": "R42", "stage": "validate", "time": "21:35", "in": 2, "out": 1, "quarantine": 1},
    {"run_id": "R42", "stage": "publish", "time": "21:36", "in": 1, "out": 1, "quarantine": 0},
]
for record in records:
    print(record["stage"], record["in"], record["out"], record["quarantine"])
print("same_run", len({record["run_id"] for record in records}) == 1)
print("lost_at_validation", records[0]["out"] - records[1]["out"])

Code

Use Tab to leave the editor. Ctrl+Enter runs the source. The lines beginning with # are task reminders. Python ignores them. Write your code beneath them.

Python console

Loading laboratory…

Explore Python or SQL here; this is not an operating-system shell.

This is a disposable browser experiment. The code run here is not recorded as a completed mission.

Each command starts a fresh disposable worker: it runs a captured copy of your current source, then your command with the lesson fixtures. Changes are discarded afterward. Commands never save source or award XP. Ctrl+Enter executes the command.

Virtual workspace files

Source and declarative assets are readable here without JavaScript. Python input files are created at runtime; SQL setup initializes the disposable database.

source.py

Current editor source. Inspection shows your current edits.

# Describe what a log, metric, and trace each contribute.
# Find where the publishable count falls from two rows to one.
# Assess hypotheses A and B using the counts.
# Write a conclusion that separates an observed fact from an unknown cause.

exemple.py

Declarative lesson asset; this is not a file created in the Python filesystem.

records = [
    {"run_id": "R42", "stage": "intake", "time": "21:34", "in": 2, "out": 2, "quarantine": 0},
    {"run_id": "R42", "stage": "validate", "time": "21:35", "in": 2, "out": 1, "quarantine": 1},
    {"run_id": "R42", "stage": "publish", "time": "21:36", "in": 1, "out": 1, "quarantine": 0},
]
for record in records:
    print(record["stage"], record["in"], record["out"], record["quarantine"])
print("same_run", len({record["run_id"] for record in records}) == 1)
print("lost_at_validation", records[0]["out"] - records[1]["out"])