fix: QA issues — composite index, anchors, fallbacks

- Add composite index ix_translation_records_run_source_hash
  for NOT EXISTS dedup subquery performance + Alembic migration
- Remove duplicate #endregion in orchestrator.py (INV_3)
- Replace hardcoded RU fallback 'Статус' with 'Status'
- Add early return guard to loadMoreRecords()
- Show records summary always when recordsTotal > 0
This commit is contained in:
2026-06-04 13:33:17 +03:00
parent 15d47450a3
commit 339f4e0695
4 changed files with 43 additions and 3 deletions

View File

@@ -142,6 +142,8 @@ class TranslationRecord(Base):
__table_args__ = (
Index("ix_translation_records_run_status", "run_id", "status"),
Index("ix_translation_records_source_hash_status", "source_hash", "status"),
Index("ix_translation_records_run_source_hash", "run_id", "source_hash",
comment="Composite index for NOT EXISTS dedup subquery"),
)
# #endregion TranslationRecord

View File

@@ -173,4 +173,3 @@ class TranslationOrchestrator:
# endregion get_run_history
# #endregion TranslationOrchestrator
# #endregion TranslationOrchestrator