ytptube/app/tests
Jesse Bate 687c82cb32 feat: add YTP_MAX_HISTORY to cap history and prevent unbounded DB growth
Long-running instances accumulate history indefinitely. As the history
table grows, SQLite COUNT(*), paginated SELECT, and index scans degrade.

YTP_MAX_HISTORY (default: 0 = unlimited) caps the number of completed
download records kept. Enforcement is a hook in DataStore.put(): on
each insertion, the oldest excess entries are immediately evicted from
the in-memory OrderedDict and their deletes are enqueued to SQLite.
DataStore.load() also trims on startup in case the limit was lowered
between restarts. No background tasks, no DB reads needed for the check.
2026-06-10 20:29:18 +09:30
..
helpers.py refactor: update terminal api 2026-04-29 22:25:39 +03:00
test_ag_utils.py refactor: made _static.py dynamic 2026-04-18 19:26:44 +03:00
test_async_url_validation_routes.py fix: respect sleep-requests arg in specific code paths. 2026-05-07 21:35:40 +03:00
test_backgroundworker.py improve logic for codec selection 2025-09-14 01:30:34 +03:00
test_cache.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_cf_solver_handler.py refactor: made _static.py dynamic 2026-04-18 19:26:44 +03:00
test_condition_ignore.py refactor: update test functions to use tmp_path for archive file handling 2026-05-08 21:56:41 +03:00
test_datastore.py feat: add YTP_MAX_HISTORY to cap history and prevent unbounded DB growth 2026-06-10 20:29:18 +09:30
test_datastore_pagination.py refactor: use one tmp directory for tests 2026-04-27 00:31:14 +03:00
test_download.py perf: throttle item_updated WebSocket events to 500ms intervals 2026-06-10 19:32:31 +09:30
test_download_utils.py refactor: update log mesages to take advantage of JSONL 2026-05-27 23:53:42 +03:00
test_encoder.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_events.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_extractor_timeout.py refactor: implement re-extraction logic and process-safe handling for non-picklable objects. 2026-05-25 20:06:34 +03:00
test_generic_browser.py fix: use yt-dlp meta extractors methods instead of local rolled ones 2026-05-08 21:39:12 +03:00
test_history_routes.py refactor: use item guid as thumbnail name for easier cleanup 2026-05-15 16:50:13 +03:00
test_httpx_client.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_images_routes.py feat: make log level runtime managable. 2026-05-28 21:26:23 +03:00
test_itemdto.py perf: exclude unused fields from ItemDTO list and WebSocket serialization 2026-06-10 20:09:13 +09:30
test_nfo_maker.py refactor: update test functions to use tmp_path for archive file handling 2026-05-08 21:56:41 +03:00
test_operations.py refactor: made _static.py dynamic 2026-04-18 19:26:44 +03:00
test_package_installer.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_router.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_scheduler.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_services.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_singleton.py Refactor: improve linting and formatting 2025-12-30 20:42:50 +03:00
test_sqlite_store.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_static_routes.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_system_routes.py perf: lazy-load folders on demand; remove queue from config endpoint 2026-06-10 20:07:19 +09:30
test_terminal_session_manager.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_test_helpers.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_update_checker.py chore: tests clean up 2026-05-04 22:23:19 +03:00
test_utils.py refactor: update log mesages to take advantage of JSONL 2026-05-27 23:53:42 +03:00