Curriculum previewThis is not your assigned passport. No identity, answers, or completion progress are stored here.How to start your passport
Mission / Reproducible Python
02 / 0235 active minuteslocal change

Make And Verify A Reproducible Python Change

You can connect a small behavior change to a regression test, run the declared checks, inspect the diff, and explain how another contributor reproduces it.

Work herelocal / powershell or zsh or bash
  1. 1Understand
  2. 2Do
  3. 3Check
  4. 4Submit
Learn firstConcept, example, trap and recovery

Outcome#

You can connect a small behavior change to a regression test, run the declared checks, inspect the diff, and explain how another contributor reproduces it.

Concept#

“It works on my machine” is not research evidence. Code, dependencies, inputs, configuration, tests, and relevant versions must be identifiable.

Worked Example#

The hidden behavior check and the visible tests pass without committing the environment or generated files.

A correct example uses these decisions:

  • When may you record that tests passed? After you personally ran the named test command and observed success.
  • What belongs in the commit? Source, tests, and declared dependencies needed to reproduce the change.

Common Trap#

Accepting a passing command from an agent without personally running it in the intended environment.

If Blocked#

Return to the last passing baseline, inspect the first failing assertion, and reduce the problem. Do not delete tests, broaden tolerances, or install random packages merely to make the check green.

Useful references:

Understand Before Accepting AI Output#

If an agent explains the failure, independently inspect the affected source and test. Do not accept a test that only repeats the implementation or a claim that was not personally run.

Do the mission

One bounded attempt

Pass: 80% + every safety item
Action

Correct the bounded Python function, add the missing test, run the project test suite inside .venv, and review the diff.

Expected

The hidden behavior check and the visible tests pass without committing the environment or generated files.

Separate practice space

Open this mission's safe practice files

The launcher creates or validates a separate exercise folder. It stops rather than replacing an existing unrelated folder.

Run only the commands for your machine

Step 1windows / powershell
.\\.venv\\Scripts\\python.exe -m unittest discover -s tests -v

Expected: The visible project tests pass in the project environment.

Step 2macos / zsh
./.venv/bin/python -m unittest discover -s tests -v

Expected: The visible project tests pass in the project environment.

Step 3linux / bash
./.venv/bin/python -m unittest discover -s tests -v

Expected: The visible project tests pass in the project environment.

01When may you record that tests passed?
02What belongs in the commit?Safety-critical
Before submitting

The launcher will copy only this mission's declared synthetic practice files into the public submission. Review those files as well as these answers.

Open my real passport first
Preview onlyThis page can be read, but it cannot store or submit an attempt.