| 1 | prompt = """metrics.py keeps a module-level counter mutated through `global`. Refactor: |
| 2 | - introduce a Counter class holding the state; independent instances must not share counts |
| 3 | - keep bump()/value()/reset() working unchanged via a module-level default instance |
| 4 | - no `global` statements remain in metrics.py""" |
| 5 | class = "refactor" |
| 6 | max_steps = 20 |
| 7 | timeout_sec = 300 |
| 8 |