A deliberately buggy Python project for testing automated code refactoring with Managed Agents.
uc1-legacy-app/
├── src/
│ ├── __init__.py
│ ├── utils.py ← Utility functions (has bugs)
│ └── models.py ← Data models (has bugs)
├── tests/
│ ├── __init__.py
│ ├── test_utils.py ← 6 tests (some will fail)
│ └── test_models.py ← 4 tests (some will fail)
└── requirements.txt
There are 3 root-cause bugs across the codebase (causing 6 test failures):
utils.py—calculate_total()does arithmetic on a stringtax_ratewithout converting to floatutils.py—normalize_name()crashes onNoneinput (no null check)models.py—Invoice.summary()referencesself.total(method object) instead ofself.total()(method call)
pip install -r requirements.txt
pytest -vExpected: 10 tests, 6 failures before fixes, 10 tests, 0 failures after.