Open lesson

Mission: the ghost row

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

Diagnose a reappearing row with hypotheses, logs, and measures, then verify a safe repair.

Voss says the new line proves a fresh authorization by you. Imani asks whether the database really changed; Noor protects logs before repair. Mara wants a diagnosis another team can repeat. The uncertainty is urgent in the story; the exercise has no timer.

Your mission

  1. Write three hypotheses and the observation predicted by each.
  2. Compare the two P0/42 positions and healthy CDC log with no new write.
  3. Propose a safe test and controlled repair.
  4. Give two post-repair checks and an attribution limit.

How to check your work

  • New write, replay, and cache distinguished.
  • Same position and no new write with healthy CDC support replay.
  • Copy test, preserved evidence, rebuilt view with deduplication.
  • AUTH-9 absent from view, log preserved; human author not inferred.

Course example

view=[
 {"row":"AUTH-9","source":"P0/42","shown_at":"21:35"},
 {"row":"AUTH-9","source":"P0/42","shown_at":"03:10"},
]
cdc_new_writes=[]
cdc_healthy=True
print("view_rows",len(view))
print("same_source_position",view[0]["source"]==view[1]["source"])
print("new_database_writes",len(cdc_new_writes))
print("cdc_healthy",cdc_healthy)
print("replay_hypothesis_supported",
      view[0]["source"]==view[1]["source"] and not cdc_new_writes and cdc_healthy)
repaired_view=[]  # rebuilt from the retained post-delete source on a copy
print("repaired_current_rows",len(repaired_view))
print("raw_log_preserved",True)

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.

# Write three hypotheses and the observation predicted by each.
# Compare the two P0/42 positions and healthy CDC log with no new write.
# Propose a safe test and controlled repair.
# Give two post-repair checks and an attribution limit.

exemple.py

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

view=[
 {"row":"AUTH-9","source":"P0/42","shown_at":"21:35"},
 {"row":"AUTH-9","source":"P0/42","shown_at":"03:10"},
]
cdc_new_writes=[]
cdc_healthy=True
print("view_rows",len(view))
print("same_source_position",view[0]["source"]==view[1]["source"])
print("new_database_writes",len(cdc_new_writes))
print("cdc_healthy",cdc_healthy)
print("replay_hypothesis_supported",
      view[0]["source"]==view[1]["source"] and not cdc_new_writes and cdc_healthy)
repaired_view=[]  # rebuilt from the retained post-delete source on a copy
print("repaired_current_rows",len(repaired_view))
print("raw_log_preserved",True)