gabriel / musehub public
test velocity task/velocity-tests #1 / 1
AI Agent gabriel · 135 days ago · May 3, 2026 · Diff

test(velocity): 50-case TDD spec VL_01–VL_50 (Phase 5)

Seven tiers covering VelocityProvider end-to-end: VL_01–08 unit — module derivation + accel helpers VL_09–18 integration — op counting, net, active_commits, new columns VL_19–25 e2e — ranking, two modules, stagnant, prior window, acceleration VL_26–32 performance — timing bounds (20-commit window < 5 s) VL_33–38 state — idempotency, purge, incremental, no duplicates VL_39–44 security — injection, XSS, repo isolation, unicode VL_45–50 stress — TOP cap, truncated flag, 500 commits, count match, BFS cap

All 50 tests pass.

sha256:62f70e90629a10c3cd2324d91a402c4c519a3d36d033c94e9d51572fea7f4580 sha
+80 symbols
sha256:17122d81be8e15bb6ffd063b600bc935983a09b5e19547cfeb6f78a277b1626f snapshot
+80
symbols added
0
dead code introduced
Semantic Changes 80 symbols
~ tests/test_velocity_provider.py .py 80 symbols added
+ TestVelocityE2E class class TestVelocityE2E L335–472
+ test_VL_19_hottest_module_ranked_first method async_method test_VL_19_hottest_module_ranked_first L338–358
+ test_VL_20_two_modules_produce_two_rows method async_method test_VL_20_two_modules_produce_two_rows L361–374
+ test_VL_21_stagnant_commit_detected method async_method test_VL_21_stagnant_commit_detected L377–391
+ test_VL_22_non_stagnant_commit_not_counted method async_method test_VL_22_non_stagnant_commit_not_counted L394–405
+ test_VL_23_prior_window_populates_prior_fields method async_method test_VL_23_prior_window_populates_prior_fields L408–428
+ test_VL_24_positive_acceleration_when_current_more_active method async_method test_VL_24_positive_acceleration_when_current_more_active L431–457
+ test_VL_25_module_only_in_current_has_zero_prior method async_method test_VL_25_module_only_in_current_has_zero_prior L460–472
+ TestVelocityIntegration class class TestVelocityIntegration L176–328
+ test_VL_09_empty_repo_returns_empty method async_method test_VL_09_empty_repo_returns_empty L179–185
+ test_VL_10_no_history_entries_returns_empty method async_method test_VL_10_no_history_entries_returns_empty L188–196
+ test_VL_11_add_op_counted_as_added method async_method test_VL_11_add_op_counted_as_ L199–213
+ test_VL_12_delete_op_counted_as_removed method async_method test_VL_12_delete_op_counted_as_ L216–228
+ test_VL_13_modify_op_counted_as_modified method async_method test_VL_13_modify_op_counted_as_ L231–243
+ test_VL_14_net_equals_added_minus_removed method async_method test_VL_14_net_equals_added_minus_ L246–259
+ test_VL_15_active_commits_counts_distinct_commits method async_method test_VL_15_active_commits_counts_distinct_commits L262–278
+ test_VL_16_window_size_column_populated method async_method test_VL_16_window_size_column_populated L281–292
+ test_VL_17_commits_analysed_column_populated method async_method test_VL_17_commits_analysed_column_populated L295–310
+ test_VL_18_result_key_correct method async_method test_VL_18_result_key_correct L313–328
+ TestVelocityPerformance class class TestVelocityPerformance L479–602
+ test_VL_26_ten_commits_five_modules_under_500ms method async_method test_VL_26_ten_commits_five_modules_under_500ms L482–499
+ test_VL_27_forty_commits_ten_modules_under_2s method async_method test_VL_27_forty_commits_ten_modules_under_2s L502–519
+ test_VL_28_empty_repo_fast_path_under_50ms method async_method test_VL_28_empty_repo_fast_path_under_50ms L522–528
+ test_VL_29_rerun_not_5x_slower method async_method test_VL_29_rerun_not_5x_slower L531–541
+ test_VL_30_point_lookup_under_10ms method async_method test_VL_30_point_lookup_under_10ms L544–555
+ test_VL_31_top20_leaderboard_query_fast method async_method test_VL_31_top20_leaderboard_query_fast L558–581
+ test_VL_32_dashboard_preview_query_fast method async_method test_VL_32_dashboard_preview_query_fast L584–602
+ TestVelocitySecurity class class TestVelocitySecurity L721–808
+ test_VL_39_sql_injection_stored_verbatim method async_method test_VL_39_sql_injection_stored_verbatim L724–734
+ test_VL_40_xss_payload_stored_safely method async_method test_VL_40_xss_payload_stored_safely L737–747
+ test_VL_41_repo_isolation_strict method async_method test_VL_41_repo_isolation_strict L750–760
+ test_VL_42_two_repos_independent_rows method async_method test_VL_42_two_repos_independent_rows L763–778
+ test_VL_43_rerun_updates_ref_column method async_method test_VL_43_rerun_updates_ref_column L781–795
+ test_VL_44_unicode_in_path_handled method async_method test_VL_44_unicode_in_path_handled L798–808
+ TestVelocityState class class TestVelocityState L609–714
+ test_VL_33_idempotent_two_runs method async_method test_VL_33_idempotent_two_runs L612–626
+ test_VL_34_stale_rows_purged_on_rerun method async_method test_VL_34_stale_rows_purged_on_rerun L629–647
+ test_VL_35_incremental_new_module_appears method async_method test_VL_35_incremental_new_module_appears L650–667
+ test_VL_36_no_duplicate_modules_after_three_runs method async_method test_VL_36_no_duplicate_modules_after_three_runs L670–682
+ test_VL_37_active_commits_increases_with_new_commits method async_method test_VL_37_active_commits_increases_with_new_commits L685–701
+ test_VL_38_truncated_false_when_under_cap method async_method test_VL_38_truncated_false_when_under_cap L704–714
+ TestVelocityStress class class TestVelocityStress L815–934
+ test_VL_45_top_cap_respected method async_method test_VL_45_top_cap_respected L818–832
+ test_VL_46_truncated_true_over_top_cap method async_method test_VL_46_truncated_true_over_top_cap L835–848
+ test_VL_47_500_commits_completes_without_error method async_method test_VL_47_500_commits_completes_without_error L851–867
+ test_VL_48_result_count_matches_stored_rows method async_method test_VL_48_result_count_matches_stored_rows L870–888
+ test_VL_49_bfs_walk_cap_never_exceeded method async_method test_VL_49_bfs_walk_cap_never_exceeded L891–908
+ test_VL_50_all_extended_columns_non_null method async_method test_VL_50_all_extended_columns_non_null L911–934
+ TestVelocityUnit class class TestVelocityUnit L132–169
+ test_VL_01_module_from_deep_symbol_address method method test_VL_01_module_from_deep_symbol_address L135–137
+ test_VL_02_module_from_shallow_symbol_address method method test_VL_02_module_from_shallow_symbol_address L139–141
+ test_VL_03_module_from_bare_file_no_slash method method test_VL_03_module_from_bare_file_no_slash L143–145
+ test_VL_04_module_from_bare_path_with_slash method method test_VL_04_module_from_bare_path_with_slash L147–149
+ test_VL_05_accel_class_positive class method test_VL_05_accel_class_positive L151–154
+ test_VL_06_accel_class_negative class method test_VL_06_accel_class_negative L156–159
+ test_VL_07_accel_class_zero class method test_VL_07_accel_class_zero L161–163
+ test_VL_08_accel_fmt_positive_negative_zero method method test_VL_08_accel_fmt_positive_negative_zero L165–169
+ _cid function function _cid L42–43
+ _fetch function async_function _fetch L95–101
+ _module function function _module L104–109
+ _run function async_function _run L91–92
+ _seed_commit function async_function _seed_commit L46–66
+ _seed_history function async_function _seed_history L69–88
+ AsyncSession import import AsyncSession L30–30
+ VelocityProvider import import VelocityProvider L33–33
+ _vel_accel_class class import _vel_accel_class L34–34
+ _vel_accel_fmt import import _vel_accel_fmt L34–34
+ annotations import import annotations L20–20
+ create_repo import import create_repo L35–35
+ datetime import import datetime L24–24
+ db import import db L32–32
+ pg_insert import import pg_insert L29–29
+ pytest import import pytest L26–26
+ pytest_asyncio import import pytest_asyncio L27–27
+ sa import import sa L28–28
+ secrets import import secrets L22–22
+ time import import time L23–23
+ timezone import import timezone L24–24
+ repo function async_function repo L117–118
+ two_repos function async_function two_repos L122–125
← Older Oldest on task/velocity-tests
All commits
Newer → Latest on task/velocity-tests

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:62f70e90629a10c3cd2324d91a402c4c519a3d36d033c94e9d51572fea7f4580 --body "your comment"