๐งช Test suite
ALL 274 PASSED live pytest run of bot/tests ยท executed 03:34:03, took 99.7s
โป live re-run available on the local HQ only
Every guard on the machinery: fills and R-math, cost itemization (incl. the frozen
Dukascopy hash and the Vantage variant), kill criteria, gate fail-closed behavior, registry lineage
discipline, executor/MT5 wiring. Research scripts (scans, runners) are governed by their
pre-registrations and null batteries instead โ see engine/scans/.
test_costmodel.py 5/5
- โ test_sessions
- โ test_rollover_spread_dwarfs_london
- โ test_triple_swap_wednesday
- โ test_stop_exit_costs_more_than_target_exit
- โ test_gross_edge_can_die_net
test_costmodel_eth.py 5/5
- โ test_eth_vantage_variant_exists_with_documented_constants
- โ test_eth_vantage_flat_across_sessions
- โ test_eth_vantage_round_trip_bp_in_documented_range
- โ test_eth_vantage_costs_more_bp_than_btc_vantage
- โ test_frozen_hashes_unmoved_by_adding_eth_vantage
test_costmodel_vantage.py 3/3
- โ test_vantage_variant_exists_with_documented_constants
- โ test_vantage_round_trip_cheaper_than_dukascopy_variant
- โ test_frozen_btcusd_dukascopy_hash_unmoved
test_costmodel_xrp.py 6/6
- โ test_xrp_vantage_variant_exists_with_documented_constants
- โ test_xrp_vantage_flat_across_sessions
- โ test_xrp_vantage_round_trip_bp_in_documented_range
- โ test_xrp_vantage_costs_more_bp_than_eth_or_btc_vantage
- โ test_xrp_vantage_slippage_matches_eth_vantage_transplant
- โ test_frozen_hashes_unmoved_by_adding_xrp_vantage
test_edgelab.py 21/21
- โ test_validation_request_raises
- โ test_vault_request_raises
- โ test_unknown_symbol_raises
- โ test_research_files_never_leave_the_window
- โ test_feature_definitions_match_hand_computation
- โ test_baseline_matches_direct_rolling
- โ test_h4_ignition_columns_match_direct_computation
- โ test_close_hour_utc_matches_direct_computation
- โ test_merge_level_features_passthrough_when_no_parquet
- โ test_merge_level_features_joins_by_index
- โ test_merge_level_features_raises_on_column_collision
- โ test_random_data_yields_no_signed_signal
- โ test_config_round_trip
- โ test_variants_dict_passthrough
- โ test_ledger_append_and_cumulative
- โ test_ledger_alters_legacy_table_preserving_rows
- โ test_benjamini_hochberg_all_reject
- โ test_benjamini_hochberg_step_up_single
- โ test_benjamini_hochberg_step_up_rescues_middle
- โ test_benjamini_hochberg_empty
- โ test_ledger_pvalues_feed_fdr
test_engine.py 4/4
- โ test_breakout_long_target
- โ test_breakout_long_stopped
- โ test_one_trade_per_day
- โ test_net_always_below_gross
test_executor.py 8/8
- โ test_stopless_order_refused
- โ test_duplicate_submit_adopts_existing
- โ test_client_order_id_deterministic
- โ test_reconcile_detects_orphan_and_halts
- โ test_reconcile_missing_position_flagged_but_no_halt
- โ test_daily_loss_breaker_trips_and_unlocks_next_session
- โ test_anomaly_halt_blocks_wide_spread_and_fails_closed
- โ test_gatekeeper_breaker_outranks_everything
test_expansion.py 11/11
- โ test_detects_single_displacement_event
- โ test_trade_enters_after_pullback_with_structural_stop
- โ test_full_giveback_cancels
- โ test_no_resumption_no_trade
- โ test_stop_hit_loses_about_one_r
- โ test_baseline_mode_trades_same_event_coin_flip
- โ test_min_baseline_suppresses_zero_baseline_event
- โ test_rollover_event_end_dropped
- โ test_rollover_entry_search_cancelled
- โ test_stop_floor_binds_and_sets_flag
- โ test_v1_defaults_unchanged_no_floor_no_guard
test_failed_break_scan.py 8/8
- โ test_failed_up_fast_event
- โ test_failed_down_slow_event
- โ test_never_reenters_no_event
- โ test_reentry_outside_window_no_event
- โ test_nan_level_skipped
- โ test_debounce_skips_break_in_horizon_window
- โ test_debounce_default_horizon_is_max_tested
- โ test_causality_truncation_identity
test_gate.py 11/11
- โ test_pass_decision
- โ test_resize_down_clamped_to_valid_range
- โ test_api_error_fails_closed
- โ test_slow_response_fails_closed
- โ test_garbage_output_fails_closed
- โ test_null_size_factor_on_pass_is_not_garbage
- โ test_refusal_fails_closed
- โ test_version_changes_with_prompt_and_model
- โ test_shadow_hits_target
- โ test_shadow_hits_stop_with_slippage
- โ test_shadow_no_bars_returns_none
test_gatestate.py 37/37
- โ test_spread_ratio_arithmetic
- โ test_drag_estimate_matches_hand_computed
- โ test_minutes_since_last_bar_and_scheduled_events_passthrough
- โ test_event_rate_ratio_arithmetic
- โ test_zero_events_gives_zero_rate_and_null_atr_ratio_not_corrupt
- โ test_strategy_rolling_net_r_passthrough_and_optional
- โ test_none_book_gives_null_level_fields_not_corrupt
- โ test_book_present_populates_level_fields
- โ test_stop_side_level_between_detects_a_level_in_the_stop_band
- โ test_session_block_boundaries[0-asia-False]
- โ test_session_block_boundaries[7-asia-False]
- โ test_session_block_boundaries[8-europe-True]
- โ test_session_block_boundaries[15-europe-True]
- โ test_session_block_boundaries[16-us-False]
- โ test_session_block_boundaries[23-us-False]
- โ test_weekend_flag
- โ test_h4_boundary_window_edges[0-True]
- โ test_h4_boundary_window_edges[14-True]
- โ test_h4_boundary_window_edges[15-False]
- โ test_h4_boundary_window_edges[16-False]
- โ test_h4_boundary_window_edges[30-False]
- โ test_h4_boundary_window_edges[59-False]
- โ test_h4_window_false_off_boundary_hour
- โ test_displacement_multiple_and_streak_computed
- โ test_streak_sign_follows_direction
- โ test_documented_failure_modes_passthrough
- โ test_empty_bars_corrupt
- โ test_none_bars_corrupt
- โ test_missing_now_corrupt
- โ test_negative_spread_corrupt
- โ test_zero_session_median_corrupt
- โ test_zero_stop_distance_corrupt
- โ test_bad_direction_corrupt
- โ test_missing_minutes_since_last_bar_corrupt
- โ test_nan_research_baseline_corrupt
- โ test_short_window_nan_displacement_corrupt
- โ test_now_before_any_bar_close_corrupt
test_goldenset.py 9/9
- โ test_scenarios_file_well_formed
- โ test_perfect_gate_is_deployable
- โ test_one_regression_blocks_deployment
- โ test_v2_scenarios_file_well_formed
- โ test_v2_scenario_classes_present
- โ test_v1_still_12_and_independently_runnable
- โ test_v2_perfect_gate_deployable_via_checker
- โ test_v2_multi_decision_tolerance_enforced_by_existing_checker
- โ test_timeout_counts_as_veto_but_reported_distinctly
test_htf_level_features.py 4/4
- โ test_efficiency_ratio_hand_fixtures
- โ test_htf_book_excludes_m15_and_round_minor
- โ test_htf_batch_matches_per_bar_oracle
- โ test_causality_truncation_identity
test_killcriteria.py 8/8
- โ test_edge_kill_needs_sample_first
- โ test_edge_kill_triggers_at_threshold
- โ test_drawdown_halt_multiplier
- โ test_drawdown_halt_fails_closed_without_mentor_figure
- โ test_baseline_kill_only_on_complete_window
- โ test_gate_kill_deletes_worthless_gate
- โ test_gate_kill_waits_for_sample_and_window
- โ test_evaluate_all_reports_every_criterion
test_ledger.py 7/7
- โ test_pass_row_roundtrips
- โ test_veto_without_counterfactual_refused
- โ test_timeout_veto_and_resize_also_need_counterfactual
- โ test_bad_enums_refused
- โ test_gate_attribution_view
- โ test_fill_drift
- โ test_persists_across_reopen
test_levels.py 12/12
- โ test_decay_weight_halflife
- โ test_round_grid_steps_at_declared_price_points
- โ test_largest_step_le_family_boundaries
- โ test_round_grid_lines_are_exact_multiples_within_10pct
- โ test_causality_a_truncated_rebuild_matches_full
- โ test_causality_b_pivot_born_at_exact_confirmation
- โ test_fixture_a_pivot_plus_touch_hand_computed_score
- โ test_fixture_b_break_sets_broken_at_and_keeps_level
- โ test_fixture_c_two_pivots_merge_with_weighted_center
- โ test_standing_prior_day_and_week_levels
- โ test_features_at_scenario
- โ test_batch_level_features_matches_per_timestamp_reference
test_montecarlo.py 20/20
- โ test_determinism_under_seed
- โ test_different_seed_gives_different_draws
- โ test_block_bootstrap_shows_wider_drawdown_tail_than_iid_shuffle
- โ test_max_drawdown_hand_computed
- โ test_longest_losing_streak_hand_computed
- โ test_time_under_water_hand_computed
- โ test_max_drawdown_zero_for_monotonic_gains
- โ test_max_drawdown_empty_array
- โ test_ruin_probability_monotone_in_risk_fraction
- โ test_ruin_probability_zero_when_risk_is_tiny_and_losses_are_bounded
- โ test_percentiles_collapse_to_a_point_when_block_is_the_whole_sequence
- โ test_observed_percentile_is_between_0_and_100
- โ test_empty_trades_handled_gracefully
- โ test_single_trade_handled_gracefully
- โ test_missing_column_raises_clear_error
- โ test_missing_timestamp_column_raises_clear_error
- โ test_integer_block_length_chunks_in_original_order
- โ test_week_blocks_group_by_iso_week
- โ test_invalid_block_spec_raises
- โ test_summary_is_json_serializable_on_a_realistic_sequence
test_mt5bridge.py 7/7
- โ test_place_maps_identity_and_stop
- โ test_stopless_order_never_reaches_terminal
- โ test_place_timeout_raises_not_resends
- โ test_comment_mangling_broker_falls_back_to_magic
- โ test_idempotent_submitter_adopts_after_timeout_retry
- โ test_reconcile_sees_bridge_positions
- โ test_pending_orders_are_not_positions
test_paper_daemon.py 10/10
- โ test_streakfollow_atr_bars_matches_feature_store
- โ test_streakfollow_stats_match_build_features
- โ test_daemon_replay_matches_registered_runner
- โ test_bar_integrity_gap_fails_closed
- โ test_staleness_fails_closed_no_new_entries
- โ test_idempotent_restep_no_double_processing
- โ test_session_row_is_shadow_not_shakedown
- โ test_daemon_never_writes_registry
- โ test_catchup_pagination_backfills_gap_over_999_bars
- โ test_catchup_pagination_runaway_cap_logs_event
test_paperloop.py 21/21
- โ test_replay_feed_returns_bars_in_order_then_none
- โ test_livefeed_rejects_stale_bar_fail_closed
- โ test_livefeed_accepts_fresh_bar_and_dedups_on_repeat_poll
- โ test_livefeed_handles_microsecond_timestamps
- โ test_livefeed_retries_with_backoff_then_fails_closed
- โ test_livefeed_clamps_poll_below_floor
- โ test_m5_aggregation_matches_batch_resample
- โ test_floor_5min
- โ test_shadow_displacement_matches_batch_events_for
- โ test_shadow_displacement_silent_while_in_position
- โ test_costmodel_constants_used_are_as_expected
- โ test_broker_stop_gap_pessimism_long
- โ test_broker_stop_gap_pessimism_short
- โ test_broker_same_bar_stop_out_is_exactly_minus_one_r
- โ test_broker_time_exit
- โ test_broker_refuses_stopless_intent
- โ test_broker_one_position_at_a_time
- โ test_broker_writes_fills_to_dedicated_db_never_registry
- โ test_session_writes_heartbeat
- โ test_session_daily_breaker_trips_and_halts_session
- โ test_session_summary_counts_m5_events_from_adapter
test_pipeline.py 5/5
- โ test_walkforward_produces_oos
- โ test_baseline_runs_on_windows
- โ test_verdict_fails_on_random_walk
- โ test_load_pair_roundtrip
- โ test_load_pair_refuses_partial_dataset
test_pipeline_e2e.py 4/4
- โ test_full_session_every_path
- โ test_breaker_outranks_gate_pass
- โ test_no_gate_runs_core_alone
- โ test_gate_timeout_fails_closed_with_counterfactual
test_portfolio.py 13/13
- โ test_empty_trades_give_empty_curve_and_deposit_summary
- โ test_flat_mode_is_exactly_deposit_plus_cumsum
- โ test_summary_change_and_drawdown
- โ test_compound_scales_risk_off_running_equity
- โ test_compound_ignores_simulated_dollars_and_reads_r
- โ test_window_is_relative_to_the_curves_own_end_not_today
- โ test_window_carries_the_opening_balance_in
- โ test_period_table_measures_each_window_from_its_own_opening_balance
- โ test_period_table_flags_spans_longer_than_the_run_as_partial
- โ test_percent_is_undefined_once_the_opening_balance_is_not_positive
- โ test_ruin_is_flagged_with_the_date_it_happened
- โ test_headline_states_winning_losing_flat
- โ test_series_is_strictly_increasing_in_time
test_registry.py 8/8
- โ test_same_run_updates_in_place
- โ test_gate_change_is_a_separate_run
- โ test_kinds_do_not_collide
- โ test_bad_kind_refused
- โ test_version_hash_tracks_rule_constants
- โ test_cost_version_tracks_the_charged_costs
- โ test_lineage_is_mandatory_and_validated
- โ test_same_rules_different_lineage_are_separate_runs
test_streak_regime_scan.py 3/3
- โ test_add_vol_regime_matches_hand_computation
- โ test_add_vol_regime_min_periods_one_costs_no_early_events
- โ test_dry_run_local_matches_variant_event_counts
test_tde_events.py 5/5
- โ test_tde_mult_and_body_fraction_hand_computed
- โ test_event_selection_and_wick_veto
- โ test_debounce_rule
- โ test_h4_in_m5_threshold_is_prior_mean
- โ test_truncation_identity_causality
test_tracking.py 4/4
- โ test_fingerprint_missing_file_is_exploratory
- โ test_fingerprint_changes_when_prereg_edited
- โ test_log_run_writes_to_isolated_store
- โ test_log_run_swallows_tracking_failure
test_watchdog.py 5/5
- โ test_fresh_heartbeat_is_ok_and_silent
- โ test_missing_heartbeat_alerts_once_then_cooldown
- โ test_recovery_notice_and_reset
- โ test_beat_roundtrip_and_boundary
- โ test_garbage_heartbeat_file_treated_as_missing
test_xauusd_wiring.py 10/10
- โ test_for_symbol_xauusd_frozen_params
- โ test_for_symbol_case_insensitive
- โ test_for_symbol_fx_matches_legacy_construction[GBPUSD]
- โ test_for_symbol_fx_matches_legacy_construction[EURUSD]
- โ test_for_symbol_fx_matches_legacy_construction[USDJPY]
- โ test_fx_cost_version_stable[GBPUSD]
- โ test_fx_cost_version_stable[EURUSD]
- โ test_fx_cost_version_pinned
- โ test_load_pair_xauusd_frame
- โ test_run_expansion_gold_pip_conversion