busya
e07bf46b2b
test: integration + unit tests for cache fix and OUTPUT_SAFETY_FACTOR
## TestClassifyCacheSourceLang (8 tests) — regression for source-lang exclusion
- test_source_lang_in_tls_cache_all_translations: exact prod bug scenario
(detected_lang=ru, tls=[ru,en,fr,zh], cache={en,fr,zh} → pre_rows not LLM)
- test_source_lang_in_tls_cache_missing_one_translation: partial cache → LLM
- test_detected_und_tls_includes_und: und excluded correctly
- test_empty_detected_lang_no_exclusion: '' → no filtering
- test_source_lang_not_in_tls: no-op exclusion when lang not in tls
- test_multi_row_mixed_source_lang_cache: 4 rows, correct split
- test_all_same_lang_short_circuit: single target lang shortcut
- test_case_insensitive_detected_lang_matching: RU→ru
## TestBatchPipelineE2E (3 tests) — full pipeline integration
- test_warm_cache_full_pipeline_no_llm: 17 rows all cached → 0 LLM
- test_cold_cache_pipeline_all_llm: no cache → all LLM
- test_partial_cache_pipeline_split: 5 cached + 5 not → correct split
## TestOutputSafetyFactor (4 tests) — OUTPUT_SAFETY_FACTOR invariants
- test_output_safety_factor_not_above_070: ≤0.70 guard
- test_max_rows_by_output_qwen_flash_4langs: 14-24 range
- test_output_safety_factor_consistent_with_per_row: manual = actual
- test_single_lang_output_rows_above_20: ≥20 rows for 1 lang
## Semantic fixes
- Add missing #endregion TestClassifyCacheSourceLang
- Move floating @BRIEF tags inside their regions (REASONING_OVERHEAD, DICT_TOKENS_PER_ENTRY)
- Add @BRIEF to OUTPUT_PER_ROW_PER_LANG region
Verification: 705 tests pass (0 failures, 2 pre-existing warnings)
2026-06-19 14:59:05 +03:00
..
2026-05-25 08:36:33 +03:00
2026-06-11 19:12:49 +03:00
2026-05-17 14:18:02 +03:00
2026-06-19 14:59:05 +03:00
2026-06-18 23:54:57 +03:00
2026-05-26 19:18:28 +03:00
2026-05-26 19:18:28 +03:00
2026-06-15 17:31:43 +03:00
2026-06-16 09:34:10 +03:00
2026-05-26 15:28:03 +03:00
2026-06-01 16:34:07 +03:00
2026-06-10 16:38:06 +03:00
2026-06-19 14:59:05 +03:00
2026-06-16 11:15:19 +03:00
2026-05-20 14:31:37 +03:00
2026-06-11 19:12:15 +03:00
2026-05-20 23:54:53 +03:00
2026-05-14 11:20:17 +03:00