# Which tests run each step, and each alternate path (id: <use case>.<step>, or <use case>.<step><letter>, the model's own ids).
# Written by reading each test against the step's words. The code a step names (usecases.yaml `code`) is then held to these
# tests: tests/step_trace.py runs them under a tracer, and tests/test_model.py fails a step whose named code none of its tests ran.
file: tests/test_zdt_autopilot.py
steps:
  UC-1.1: [test_impossible_exit_rules_are_refused, test_call_breakout_reaches_target]
  UC-1.2: [test_live_port_is_refused_without_live_flag, test_call_breakout_reaches_target]
  UC-1.3: [test_live_account_is_refused_without_live_flag, test_call_breakout_reaches_target]
  UC-1.4: [test_call_breakout_reaches_target, test_live_account_trades_with_live_flag]
  UC-1.5: [test_call_breakout_reaches_target, test_the_budget_starts_at_100_and_sizes_one_contract, test_the_budget_carries_over_from_the_log]
  UC-1.1a: [test_impossible_exit_rules_are_refused]
  UC-1.2a: [test_live_port_is_refused_without_live_flag]
  UC-1.3a: [test_unreachable_tws_says_so_and_exits]
  UC-1.3b: [test_live_account_is_refused_without_live_flag]
  UC-1.5a: [test_no_usd_cash_balance_stops_instead_of_using_100]
  UC-1.5b: [test_an_unreported_last_row_stops_the_bot]

  UC-2.1: [test_call_breakout_reaches_target, test_closed_day_does_nothing, test_half_day_flattens_before_the_early_close]
  UC-2.2: [test_early_start_waits_for_the_opening_bar_to_close]
  UC-2.3: [test_early_start_waits_for_the_opening_bar_to_close]
  UC-2.4: [test_call_breakout_reaches_target, test_late_start_still_reads_the_0930_bar]
  UC-2.1a: [test_closed_day_does_nothing]
  UC-2.1b: [test_unreadable_session_hours_fail_loudly]
  UC-2.2a: [test_late_start_still_reads_the_0930_bar]
  UC-2.4a: [test_no_bar_at_the_open_stops]

  UC-3.1: [test_call_breakout_reaches_target]
  UC-3.2: [test_call_breakout_reaches_target]
  UC-3.3: [test_call_breakout_reaches_target, test_put_breakdown_stops_out]
  UC-3.4: [test_call_breakout_reaches_target, test_put_breakdown_stops_out]
  UC-3.1a: [test_no_live_price_stops, test_delayed_data_stops]
  UC-3.2a: [test_late_start_still_reads_the_0930_bar]
  UC-3.2b: [test_a_feed_that_stops_mid_day_stops_the_bot]
  UC-3.3a: [test_no_new_trade_until_spy_comes_back_inside, test_put_breakdown_stops_out]

  UC-4.1: [test_call_breakout_reaches_target]
  UC-4.2: [test_call_breakout_reaches_target, test_a_tie_goes_to_the_strike_nearer_spot_plus_1_50, test_never_buys_an_in_the_money_option,
           test_unlisted_nearest_strike_takes_the_next_nearest_listed]
  UC-4.3: [test_call_breakout_reaches_target]
  UC-4.4: [test_call_breakout_reaches_target, test_original_tier_table, test_the_cash_caps_the_budget, test_the_budget_starts_at_100_and_sizes_one_contract]
  UC-4.5: [test_call_breakout_reaches_target]
  UC-4.1a: [test_no_0dte_expiry_means_no_trade_today]
  UC-4.2a: [test_no_strike_within_5_dollars_means_no_trade]
  UC-4.3a: [test_an_option_with_no_quote_is_not_traded]
  UC-4.4a: [test_cannot_afford_one_contract_means_no_trade, test_one_contract_it_cannot_afford_is_zero_not_one]
  UC-4.4b: [test_signals_only_until_the_exit_rules_are_set]
  UC-4.5a: [test_unfilled_entry_is_cancelled]
  UC-4.5b: [test_partial_fill_trades_only_what_filled]

  UC-5.1: [test_exits_are_an_oca_pair_held_at_ib]
  UC-5.2: [test_call_breakout_reaches_target]
  UC-5.3: [test_call_breakout_reaches_target, test_put_breakdown_stops_out]
  UC-5.2a: [test_flatten_ten_minutes_before_the_close, test_half_day_flattens_before_the_early_close]
  UC-5.2b: [test_ctrl_c_mid_trade_sells_logs_and_stops]
  UC-5.2c: [test_connection_lost_while_holding_says_what_is_open]
  UC-5.1a: [test_a_stop_under_one_cent_sells_at_once]

  UC-6.1: [test_call_breakout_reaches_target]
  UC-6.2: [test_call_breakout_reaches_target, test_pl_uses_ibs_commission_not_the_estimate]
  UC-6.3: [test_two_losses_in_a_row_stop_the_day]
  UC-6.4: [test_put_breakdown_stops_out]
  UC-6.1a: [test_unreported_commission_is_logged_as_unreported_and_stops]
  UC-6.1b: [test_ctrl_c_during_the_commission_wait_still_logs_the_trade]
  UC-6.3a: [test_two_losses_in_a_row_stop_the_day]

  UC-7.1: [test_a_crash_mid_trade_still_closes_everything]
  UC-7.2: [test_a_crash_mid_trade_still_closes_everything]
  UC-7.3: [test_a_crash_mid_trade_still_closes_everything, test_call_breakout_reaches_target]
  UC-7.4: [test_connection_lost_while_holding_says_what_is_open]
  UC-7.1a: [test_connection_lost_while_holding_says_what_is_open]
  UC-7.2a: [test_an_order_that_will_not_cancel_is_reported]

  UC-9.1: [test_signals_only_until_the_exit_rules_are_set]
  UC-9.2: [test_impossible_exit_rules_are_refused]
  UC-9.3: [test_call_breakout_reaches_target]
  UC-9.2a: [test_impossible_exit_rules_are_refused]

  UC-10.2: [test_call_breakout_reaches_target]
  UC-10.3: [test_call_breakout_reaches_target]
  UC-10.4: [test_call_breakout_reaches_target]
  UC-10.2a: [test_live_account_is_refused_without_live_flag]
  UC-10.3a: [test_the_budget_starts_at_100_and_sizes_one_contract]

  UC-11.2: [test_the_live_flag_reaches_the_bot_from_the_command_line]
  UC-11.3: [test_live_account_trades_with_live_flag]
  UC-11.2a: [test_live_port_is_refused_without_live_flag]
