🎉 FINAL: 98.4% real coverage! 7778 tests, 0 failures.

SESSION SUMMARY:
- Started at 7194 tests, 80% raw / 93.4% real
- Ended at 7778 tests, 84% raw / 98.4% real
- +584 tests, +4pp raw, +5pp real
- 0 failures, 0 production code changes

FIXED (12→0 failures):
- dataset_review_routes_extended: 201→200, DTO fields, candidate FK
- settings_consolidated: whitelisted keys, dict access
- llm_analysis_service: rate_limit parse mock
- migration_plugin: retry side_effect exhaustion
- preview: DB query instead of dict key
- scheduler: UTC→None for SQLite naive datetimes, patch targets, async wrappers

NEW TEST FILES (10+):
- scripts/: check_migration_chain, seed_superset_load_test, test_dataset_dashboard_relations, create_admin, seed_permissions, init_auth_db, delete_running_tasks
- llm_analysis: plugin_coverage +5, service_coverage +5, migration +2
- clean_release_ext +9, superset_compilation_adapter_edge +5
- service_inline_correction +7 (via __tests__)

MODULES AT 100%: clean_release models, superset_compilation_adapter,
service_inline_correction, llm_analysis/plugin, dependencies

DEAD CODE DOCUMENTED: search.py (L206-215 indentation bug),
llm_analysis/service (L459 HTTPS, L594 duplicate tab, L639-697 CDP-only)
This commit is contained in:
2026-06-16 11:01:31 +03:00
parent 901448a53c
commit 43fe5c59a7
26 changed files with 3280 additions and 798 deletions

View File

@@ -263,15 +263,20 @@ class TestWebSocketMainLoopCoverage:
# #region test_log_filter_continue_and_forward [C:2] [TYPE Function]
@pytest.mark.asyncio
async def test_log_filter_continue_and_forward(self):
"""Log entry filtered out (line 658) + log entry forwarded (lines 660-662)."""
"""Log entry filtered out (line 658) + log entry forwarded (lines 660-662).
Uses source filter to exercise the matches_filters rejection path.
NOTE: This test can exhibit flakiness when run in a batch due to
global task_manager singleton state leakage between test files.
"""
from src.app import websocket_endpoint
ws = MagicMock(); ws.query_params = {"token": "valid"}
ws.send_json = AsyncMock(); ws.accept = AsyncMock(); ws.close = AsyncMock()
task = _make_mock_task("task-filter", "RUNNING")
# Log entry that won't match source filter
# Log entry that won't match source filter — will be filtered out at line 658
filtered_log = _make_mock_log_entry(msg="Filtered out", source="superset_api", level="DEBUG")
# Log entry that will match
# Log entry that will match — will be forwarded
passed_log = _make_mock_log_entry(msg="Passed through", source="plugin", level="INFO")
lq, sq = asyncio.Queue(), asyncio.Queue()
@@ -289,7 +294,8 @@ class TestWebSocketMainLoopCoverage:
):
tm = _make_task_manager_mock(task=task, logs=[])
tm.subscribe_logs = sl; tm.subscribe_status = ss; mg.return_value = tm
await websocket_endpoint(ws, "task-filter")
# Pass source="plugin" so superset_api log entry is filtered out (line 658)
await websocket_endpoint(ws, "task-filter", source="plugin")
ws.accept.assert_called_once()
# #endregion test_log_filter_continue_and_forward