gabriel / musehub public
test languages-intel task/intel-languages #2 / 4
AI Agent gabriel · 138 days ago · May 3, 2026 · Diff

test(languages-intel): Phase 3 — full 7-tier test suite (30 tests, 14 RED)

T01–T04 DB model: columns, nullable kinds_json, composite PK, cascade delete T05–T09 Provider: no-subprocess assertion, file counts, kinds_json, pct sum, empty snapshot T10–T17 Route: 200/empty/404, sort params, top limit, 422 on bad input T18–T21 E2E HTML: language names, pct bar widths, kind chips, dashboard link T22–T24 Data integrity: no duplicates, overwrite upsert, cross-repo isolation T25–T27 Performance: provider <2s/100 files, route <200ms/50 rows, index check T28–T30 Security: XSS escape, SQL injection in sort param, no-500 on bad path

16 tests GREEN (model + provider already implemented in Phases 1–2). 14 tests RED (route + template + dashboard card — Phases 4–7 pending).

sha256:00211ffae4c542aae1f905009da5b3cbf9a6cb4f87976bc8e65a61fade9a14cc sha
+56 symbols
sha256:2d61e26a6d5d3044db206529107998f612a97853ce6d189b7b0f118bde4b61b4 snapshot
+56
symbols added
0
dead code introduced
Semantic Changes 56 symbols
~ tests/test_intel_languages.py .py 56 symbols added
+ TestDBModel class class TestDBModel L165–224
+ test_T01_model_has_all_required_columns method method test_T01_model_has_all_required_columns L167–179
+ test_T02_kinds_json_is_nullable method method test_T02_kinds_json_is_nullable L181–184
+ test_T03_composite_pk_is_repo_id_plus_language method method test_T03_composite_pk_is_repo_id_plus_language L186–194
+ test_T04_cascade_delete_removes_lang_rows method async_method test_T04_cascade_delete_removes_lang_rows L197–224
+ TestDataIntegrity class class TestDataIntegrity L544–608
+ test_T22_double_upsert_produces_one_row method async_method test_T22_double_upsert_produces_one_row L547–565
+ test_T23_second_upsert_overwrites_file_count method async_method test_T23_second_upsert_overwrites_file_count L568–588
+ test_T24_cross_repo_isolation method async_method test_T24_cross_repo_isolation L591–608
+ TestE2E class class TestE2E L498–537
+ test_T18_language_names_appear_in_page method async_method test_T18_language_names_appear_in_page L501–508
+ test_T19_pct_bar_width_rendered method async_method test_T19_pct_bar_width_rendered L511–517
+ test_T20_kind_chips_rendered_for_python method async_method test_T20_kind_chips_rendered_for_python L520–528
+ test_T21_dashboard_card_links_to_languages_page method async_method test_T21_dashboard_card_links_to_languages_page L531–537
+ TestPerformance class class TestPerformance L615–699
+ test_T25_provider_completes_100_files_under_2s method async_method test_T25_provider_completes_100_files_under_2s L618–649
+ test_T26_route_responds_under_200ms_for_50_languages method async_method test_T26_route_responds_under_200ms_for_50_languages L652–684
+ test_T27_db_query_uses_lang_index method async_method test_T27_db_query_uses_lang_index L687–699
+ TestProvider class class TestProvider L231–407
+ test_T05_provider_does_not_use_subprocess method async_method test_T05_provider_does_not_use_subprocess L234–247
+ test_T06_provider_counts_files_per_language method async_method test_T06_provider_counts_files_per_language L250–298
+ test_T07_provider_records_kinds_json method async_method test_T07_provider_records_kinds_json L301–343
+ test_T08_provider_pct_sums_correctly method async_method test_T08_provider_pct_sums_correctly L346–390
+ test_T09_provider_returns_empty_when_no_snapshot method async_method test_T09_provider_returns_empty_when_no_snapshot L393–407
+ TestRoute class class TestRoute L414–491
+ test_T10_returns_200_with_language_data method async_method test_T10_returns_200_with_language_data L417–422
+ test_T11_returns_200_with_empty_repo method async_method test_T11_returns_200_with_empty_repo L425–432
+ test_T12_unknown_repo_returns_404 method async_method test_T12_unknown_repo_returns_404 L435–440
+ test_T13_sort_by_files_param_accepted method async_method test_T13_sort_by_files_param_accepted L443–448
+ test_T14_sort_by_symbols_param_accepted method async_method test_T14_sort_by_symbols_param_accepted L451–456
+ test_T15_unknown_sort_coerced_to_default method async_method test_T15_unknown_sort_coerced_to_default L459–464
+ test_T16_top_param_limits_rows method async_method test_T16_top_param_limits_rows L467–483
+ test_T17_top_invalid_string_returns_422 method async_method test_T17_top_invalid_string_returns_422 L486–491
+ TestSecurity class class TestSecurity L706–749
+ test_T28_xss_in_language_name_is_escaped method async_method test_T28_xss_in_language_name_is_escaped L709–726
+ test_T29_sql_injection_in_sort_param_safe method async_method test_T29_sql_injection_in_sort_param_safe L729–739
+ test_T30_unauthenticated_nonexistent_repo_no_500 method async_method test_T30_unauthenticated_nonexistent_repo_no_500 L742–749
+ _REF variable variable _REF L32–32
+ _fake_tree function function _fake_tree L115–132
+ _insert_lang_row function async_function _insert_lang_row L39–71
+ _seed_snapshot function async_function _seed_snapshot L74–112
+ AsyncClient import import AsyncClient L25–25
+ AsyncMock import import AsyncMock L20–20
+ AsyncSession import import AsyncSession L27–27
+ annotations import import annotations L16–16
+ create_repo import import create_repo L30–30
+ datetime import import datetime L19–19
+ dbm import import dbm L29–29
+ patch import import patch L20–20
+ pg_insert import import pg_insert L26–26
+ pytest import import pytest L22–22
+ pytest_asyncio import import pytest_asyncio L23–23
+ sa import import sa L24–24
+ time import import time L18–18
+ timezone import import timezone L19–19
+ ln_repo function async_function ln_repo L136–158

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:00211ffae4c542aae1f905009da5b3cbf9a6cb4f87976bc8e65a61fade9a14cc --body "your comment"