SpeakTrue

Legacy Runtime Seam Deletion Inventory

Milestone: M013-2hi504
Generated: 2026-05-01
Purpose: Track remaining legacy_runtime_adapter users while deleting the compatibility seam in safe batches.

S01 Adapter Usage Map

Current production users after the first S01 migration:

File Adapter imports Status Notes
web/python-web-app/src/app.py 0 migrated Uses legacy_runtime_state_service.get_legacy_runtime_state() directly.
web/python-web-app/src/jobs/job_store.py 0 migrated Calls persistent_job_service using process runtime state directly.
web/python-web-app/src/routes/tts.py 0 migrated Uses speech_route_dependencies; provider bridges runtime state and transitional public monkeypatch overrides without importing the adapter.
web/python-web-app/src/routes/stt.py 0 migrated Uses speech_route_dependencies; STT preprocessing/runtime values come from runtime state with transitional public overrides.
web/python-web-app/src/routes/voice_clone.py 0 migrated Uses voice_clone_route_dependencies; provider owns upload-rate constants/signatures, runtime state, storage/provider access, auth resolution, and temporary public monkeypatch overrides.
web/python-web-app/src/routes/settings.py 0 migrated Uses settings_route_dependencies; settings/user-settings wrappers read runtime state and transitional public monkeypatch overrides without importing the adapter.
web/python-web-app/src/routes/categories.py 0 migrated Uses category_route_dependencies; category runtime helpers read focused services/runtime state and transitional public monkeypatch overrides without importing the adapter.
web/python-web-app/src/routes/soundboard.py 0 migrated Uses soundboard_route_dependencies; the route context reads runtime state and transitional public monkeypatch overrides without importing the adapter.
web/python-web-app/src/routes/legacy.py 0 migrated Uses legacy_route_dependencies; legacy compatibility routes read the historical public surface and runtime state without importing the adapter.

S01 Migration Decision

S01 introduced src.services.legacy_runtime_state_service as the shared process-state owner. This lets startup and focused wrappers consume the existing bootstrap state without importing gb_tts_app.py, src.legacy_runtime, or legacy_runtime_adapter.

Migrated in S01:

Migrated in S02:

Migrated in S03:

Migrated in S04:

Migrated in S05:

Migrated in S06:

Migrated in S07:

Deferred after S07:

Verification Hooks

python3 scripts/verify_m013_s01_adapter_allowlist.py
PYTHONPATH=web/python-web-app web/python-web-app/venv/bin/python - <<'PY'
from src.app import create_app
app = create_app()
client = app.test_client()
assert client.get('/health').status_code == 200
assert client.get('/').status_code == 200
print('wsgi smoke OK')
PY
web/python-web-app/venv/bin/pytest \
  web/python-web-app/tests/unit/test_runtime_import_boundaries.py \
  web/python-web-app/tests/unit/test_persistent_job_service.py \
  web/python-web-app/tests/api/test_runtime_entrypoint_closure.py \
  web/python-web-app/tests/api/test_tts.py \
  web/python-web-app/tests/api/test_stt.py \
  web/python-web-app/tests/api/test_models.py \
  web/python-web-app/tests/api/test_voices.py \
  web/python-web-app/tests/api/test_speech_contract_hardening.py \
  web/python-web-app/tests/api/test_voice_clone.py \
  web/python-web-app/tests/unit/test_legacy_runtime_speech_service_delegation.py -q