refactor: decompose api.py into data domain modules #42
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
api.py(630 lines) is a catch-all for the label loop, IMAP fetch, config, stats, benchmark orchestration, and finetune triggers. Extract each into its own module underapp/data/.Work
app/data/label.pyapp/data/fetch.py(fromimap_fetch.py)app/data/corrections.py(fromsft.py)app/imitate.py→app/data/imitate.pyapi.pybecomes app factory only (~80 lines: imports, router mounts, SPA static files)Acceptance
api.py< 100 linesShipped in the Apr 19–May 4 sprint. api.py is now a factory-only wiring file; routes live in label.py, fetch.py, corrections.py, imitate.py, cforch.py with backward-compat redirects.