Skip to main content

Guided Labs

Download the offline refactoring kit. Extract it and run in its directory with Python 3.10+ and the standard library.

python check.py --module baseline
python check.py --module starter
python check.py --module step_01
python check.py --module reference
python run_labs.py --module starter

All four supplied implementations should pass. The starter is deliberately working legacy-style code. Refactor it in small steps; keep baseline.py and the public contracts frozen. First write your own characterization cases before reading the checker or reference. Passing an untouched starter does not complete the labs.

LabWorkAcceptance evidence
L1Extract invoice arithmetic and preserve the clock seamPer-line exact rounding; deadline boundary; header, iterator, clock and sink failure traces
L2Consolidate conditional checksLazy evaluation, original order, truthy values and exception propagation
L3Split order parsing and pricingLookup-before-conversion, preserved negative quantities and old failure precedence
L4Migrate Grid APIsShared state across mixed old/new operations, overwrites, invalid inputs and independent instances
L5Refactor provider selectionExactly one selected invocation, preserved uncertain outcome and no fallback duplication

Budget 20–30 hours. Use the behavior contracts and included README. Save actual diffs and check output at each coherent step. step_01.py shows one extraction checkpoint, not a complete historical commit sequence. Evaluate one deliberate fault per lab and explain which observation rejects it.

These are offline teaching models. A passing grid or provider test does not certify a database cutover or production messaging system. Design and process require review.