Problem
routers/score_sets.py is about 2,800 lines, and its handlers mix HTTP handling with domain logic: creation, variant upload, publishing and supersession. The logic can only be tested through the routes, and the three long-lived branches conflict in this file.
Scope
Acceptance criteria
Problem
routers/score_sets.pyis about 2,800 lines, and its handlers mix HTTP handling with domain logic: creation, variant upload, publishing and supersession. The logic can only be tested through the routes, and the three long-lived branches conflict in this file.Scope
lib/score_sets/service functions that take a session and the calling user and return domain objects.Acceptance criteria
routers/score_sets.pyis longer than about 40 lines.