Problem Statement. app/ai-service/main.py defines _LEGACY_TO_V1 and
_LEGACY_PREFIX_MAP as Python literals. When new legacy routes accumulate, the map
becomes the de-facto registry.
Why it matters. Operationally fragile. A new legacy route can be missed.
Technical Context. main.py::_LEGACY_TO_V1.
Expected Outcome. A legacy_redirects.yaml shipped with the service; the middleware
reads from it at startup. New entries are added without code changes.
Acceptance Criteria.
- Migration of all current entries to YAML.
- A test fails if entries exist in code but not YAML (or vice versa).
- Plan: every 6 months retire legacy paths entirely.
Implementation Notes. Use pydantic-settings to load YAML; fail boot if the file is
not present.
Files or modules likely to be affected.
app/ai-service/main.py,
new app/ai-service/config/legacy_redirects.yaml,
new app/ai-service/tests/test_legacy_redirects.py.
Difficulty. Medium
Estimated effort. S
Backlog item #57 from `docs/maintainer-issue-backlog.md.
Problem Statement.
app/ai-service/main.pydefines_LEGACY_TO_V1and_LEGACY_PREFIX_MAPas Python literals. When new legacy routes accumulate, the mapbecomes the de-facto registry.
Why it matters. Operationally fragile. A new legacy route can be missed.
Technical Context.
main.py::_LEGACY_TO_V1.Expected Outcome. A
legacy_redirects.yamlshipped with the service; the middlewarereads from it at startup. New entries are added without code changes.
Acceptance Criteria.
Implementation Notes. Use
pydantic-settingsto load YAML; fail boot if the file isnot present.
Files or modules likely to be affected.
app/ai-service/main.py,new
app/ai-service/config/legacy_redirects.yaml,new
app/ai-service/tests/test_legacy_redirects.py.Difficulty. Medium
Estimated effort. S
Backlog item #57 from `docs/maintainer-issue-backlog.md.