{
  "format": "siebly-conformance-pack/v1",
  "id": "bybit-position-manager",
  "title": "Bybit Position Management Conformance Pack",
  "lastReviewed": "2026-05-12",
  "package": {
    "ecosystem": "npm",
    "name": "bybit-api",
    "install": "npm install bybit-api",
    "versionPolicy": "Use the latest available bybit-api package in the generated project. Record the installed version in the README dependency notes."
  },
  "canonicalArtifacts": {
    "manifest": "https://siebly.io/.well-known/agent-manifests/bybit-position-manager/latest.json",
    "integrationKit": "https://siebly.io/.well-known/integration-kits/bybit-position-manager/latest.json",
    "recipe": "https://siebly.io/.well-known/recipes/bybit-position-manager.json",
    "guide": "https://siebly.io/ai/exchange-state/bybit",
    "bybitTutorial": "https://siebly.io/sdk/bybit/javascript/tutorial",
    "artifactOrder": [
      "https://siebly.io/ai/exchange-state",
      "https://siebly.io/.well-known/prompts/bybit-position-manager/latest.md",
      "https://siebly.io/.well-known/recipes/bybit-position-manager.json",
      "https://siebly.io/ai/exchange-state/bybit",
      "https://siebly.io/.well-known/integration-kits/bybit-position-manager/latest.json",
      "https://siebly.io/.well-known/agent-manifests/bybit-position-manager/latest.json",
      "https://siebly.io/.well-known/agent-manifests/exchange-state-management/latest.json",
      "https://siebly.io/.well-known/runtime-kits/exchange-state-management/v1/index.json",
      "https://siebly.io/.well-known/runtime-kits/exchange-state-management/v1/types.ts",
      "https://siebly.io/.well-known/integration-kits/exchange-state-management/latest.json",
      "https://siebly.io/.well-known/conformance/exchange-state-management/latest.json",
      "https://siebly.io/.well-known/conformance/exchange-state-management/v1/schema.json",
      "https://siebly.io/.well-known/conformance/exchange-state-management/v1/fixtures.json",
      "https://siebly.io/.well-known/conformance/exchange-state-management/v1/runner.ts",
      "https://siebly.io/.well-known/conformance/bybit-position-manager/latest.json"
    ]
  },
  "primarySpec": {
    "id": "exchange-state-management-spec",
    "title": "Exchange State Management",
    "href": "https://siebly.io/ai/exchange-state",
    "purpose": "Exchange-neutral runtime spec for private account, order, and position state workflows, including DCA/TP/SL managers.",
    "architecture": {
      "reusable": "order_account_position_state_machine",
      "lane": "ws_symbol_side_action_gated"
    },
    "role": "Primary implementation spec. Other artifacts support, specialize, or test this workflow; they do not replace it."
  },
  "schema": {
    "fixture": {
      "name": "string",
      "category": "spot | linear | inverse | multi",
      "given": "hydration snapshots, private events, in-memory state, intents, or REST responses",
      "expect": "planner outputs, REST calls, state transitions, log markers, active counts, and blocked actions"
    }
  },
  "criticalWriteConformance": {
    "mustPassBeforeLive": [
      "bybit_position_open_reacts_without_timer",
      "bybit_private_stream_exception_prevents_service_ready",
      "bybit_private_topic_updates_can_complete_readiness_without_args_ack",
      "bybit_subscribe_response_req_id_topics_can_mark_ready",
      "bybit_private_stream_reconnect_clears_exception_before_ack_readiness",
      "bybit_private_position_replay_drives_planning_without_rest_rehydrate",
      "bybit_normal_state_check_uses_accountstate_not_rest",
      "bybit_reconnect_uses_rest_hydration_before_resume",
      "bybit_private_event_burst_groups_to_single_reconcile",
      "bybit_order_execution_position_wallet_out_of_order_converges",
      "bybit_accepted_submissions_settle_to_zero_intents",
      "bybit_golden_live_convergence_trace_settles_after_deferred_dca",
      "bybit_position_open_places_protective_then_dca_after_ws_confirmation",
      "bybit_pending_confirmation_does_not_unlock_dependent_action_family",
      "bybit_semantic_ws_logs_emitted_after_ingest",
      "bybit_symbol_side_queue_groups_private_event_burst",
      "bybit_order_active_confirmation_before_rest_acceptance_no_stale_pending",
      "bybit_rest_acceptance_does_not_downgrade_trusted_private_order",
      "bybit_terminal_order_status_is_not_open_order_confirmation",
      "bybit_execution_fill_is_not_open_order_confirmation",
      "bybit_position_close_between_exit_action_and_dca_skips_dca",
      "bybit_dca_never_submitted_from_stale_pre_close_plan",
      "bybit_conditional_sl_requires_trigger_direction",
      "bybit_hedge_normalized_position_idx_maps_to_bybit_request_idx",
      "bybit_one_way_short_uses_position_idx_zero",
      "bybit_tp_is_reduce_only_limit_with_expected_time_in_force",
      "bybit_position_update_timestamp_does_not_rotate_slots",
      "bybit_full_close_cleanup_cancels_only_app_owned_orders",
      "bybit_one_way_short_then_long_fresh_scope_cleans_old_side",
      "bybit_hedge_same_symbol_sides_do_not_cross_cancel",
      "bybit_startup_wipe_rebuild_cancels_app_orders_before_rebuild",
      "bybit_startup_adopts_active_contexts_and_prunes_absent_contexts",
      "bybit_default_dca_active_order_does_not_advance_next_step",
      "bybit_ambiguous_event_routes_bounded_fallback_then_exact_scope",
      "bybit_linear_close_all_sl_request_is_valid",
      "bybit_same_side_position_add_amends_same_slots_without_cancel_first",
      "bybit_same_slot_update_submits_amends_without_cancel_gap",
      "bybit_cancel_first_replacement_converges_before_place",
      "bybit_amend_rejection_enters_recovery_without_blind_cancel_place",
      "bybit_retcode_nonzero_blocks_failed_slot_or_enters_recovery",
      "bybit_submission_rejection_requires_resync_without_permanent_pause",
      "bybit_order_link_id_context_lookup_routes_private_event",
      "bybit_lost_order_link_id_registry_rebuilds_from_trusted_state",
      "bybit_protective_sl_tp_pre_registered_and_dispatched_concurrently_by_default",
      "bybit_partial_protective_reject_blocks_failed_slot_and_surfaces_error",
      "bybit_unknown_submit_outcome_enters_recovery_after_configured_timeout",
      "bybit_recovery_required_blocks_normal_actions_until_hydration_succeeds",
      "bybit_hydrated_defaults_do_not_churn",
      "bybit_deferred_replan_owner_only",
      "bybit_sub_unit_tick_formats_trigger_price_correctly",
      "bybit_single_digit_price_tick_formats_correctly",
      "bybit_large_price_tick_formats_correctly",
      "bybit_integer_quantity_lot_formats_correctly",
      "bybit_fractional_quantity_lot_formats_correctly",
      "bybit_rejected_order_link_id_is_not_retried_without_state_change",
      "bybit_rejected_order_link_id_can_retry_after_request_change",
      "bybit_duplicate_order_link_id_preflights_place_intent_without_blocking_cleanup",
      "bybit_stale_context_wrong_position_idx_enters_recovery",
      "bybit_active_app_order_without_context_refuses_mutation_or_adopts_explicitly",
      "bybit_context_without_active_order_is_inconclusive_until_recovery",
      "bybit_flat_hedge_row_with_opposite_open_does_not_emit_closed_notice",
      "bybit_one_way_flat_row_uses_previous_side_identity",
      "bybit_completed_dca_state_survives_restart_without_active_order",
      "bybit_filter_only_recovery_does_not_prune_contexts",
      "bybit_open_order_recovery_prunes_absent_contexts",
      "bybit_late_private_event_routes_to_current_or_terminal_scope",
      "bybit_duplicate_slots_same_role_step_resolve_without_extra_place",
      "bybit_pending_confirmation_blocks_duplicate_dca_place",
      "bybit_terminal_dca_fill_then_planner_tick_reprotects_only_after_position_update",
      "bybit_position_mode_auto_detects_observed_exchange_identity",
      "bybit_hedge_risk_blocks_dca_but_allows_protective_repair"
    ],
    "architecture": "ws_symbol_side_action_gated",
    "requiredWorkflowText": "order-context registry maps [orderLinkId](https://siebly.io/reference/glossary#custom-order-id) values to SlotKey/intent context before submission; private events echo orderLinkId to resolve context without parsing ID text. Private WS account events feed accountstate, semantic logs record affected symbol-side scopes, one action family runs per pass, and accepted submissions remain pending confirmations until private stream evidence or scoped recovery hydration confirms them.",
    "fixtureGroups": {
      "startupAndReadiness": [
        "bybit_position_open_reacts_without_timer",
        "bybit_private_stream_exception_prevents_service_ready",
        "bybit_private_topic_updates_can_complete_readiness_without_args_ack",
        "bybit_subscribe_response_req_id_topics_can_mark_ready",
        "bybit_private_stream_reconnect_clears_exception_before_ack_readiness"
      ],
      "restAccountstateBoundary": [
        "bybit_private_position_replay_drives_planning_without_rest_rehydrate",
        "bybit_normal_state_check_uses_accountstate_not_rest",
        "bybit_reconnect_uses_rest_hydration_before_resume"
      ],
      "privateBursts": [
        "bybit_private_event_burst_groups_to_single_reconcile",
        "bybit_order_execution_position_wallet_out_of_order_converges"
      ],
      "submissionPhasing": [
        "bybit_accepted_submissions_settle_to_zero_intents",
        "bybit_golden_live_convergence_trace_settles_after_deferred_dca",
        "bybit_position_open_places_protective_then_dca_after_ws_confirmation",
        "bybit_pending_confirmation_does_not_unlock_dependent_action_family",
        "bybit_position_close_between_exit_action_and_dca_skips_dca",
        "bybit_dca_never_submitted_from_stale_pre_close_plan",
        "bybit_protective_sl_tp_pre_registered_and_dispatched_concurrently_by_default"
      ],
      "privateEventRouting": [
        "bybit_semantic_ws_logs_emitted_after_ingest",
        "bybit_symbol_side_queue_groups_private_event_burst",
        "bybit_order_active_confirmation_before_rest_acceptance_no_stale_pending",
        "bybit_rest_acceptance_does_not_downgrade_trusted_private_order",
        "bybit_terminal_order_status_is_not_open_order_confirmation",
        "bybit_execution_fill_is_not_open_order_confirmation",
        "bybit_order_link_id_context_lookup_routes_private_event",
        "bybit_ambiguous_event_routes_bounded_fallback_then_exact_scope"
      ],
      "requestShape": [
        "bybit_conditional_sl_requires_trigger_direction",
        "bybit_hedge_normalized_position_idx_maps_to_bybit_request_idx",
        "bybit_one_way_short_uses_position_idx_zero",
        "bybit_tp_is_reduce_only_limit_with_expected_time_in_force",
        "bybit_linear_close_all_sl_request_is_valid"
      ],
      "managedSlotOwnership": [
        "bybit_position_update_timestamp_does_not_rotate_slots",
        "bybit_full_close_cleanup_cancels_only_app_owned_orders",
        "bybit_one_way_short_then_long_fresh_scope_cleans_old_side",
        "bybit_hedge_same_symbol_sides_do_not_cross_cancel",
        "bybit_startup_wipe_rebuild_cancels_app_orders_before_rebuild",
        "bybit_startup_adopts_active_contexts_and_prunes_absent_contexts",
        "bybit_default_dca_active_order_does_not_advance_next_step",
        "bybit_lost_order_link_id_registry_rebuilds_from_trusted_state"
      ],
      "identityMismatchRecovery": [
        "bybit_stale_context_wrong_position_idx_enters_recovery",
        "bybit_active_app_order_without_context_refuses_mutation_or_adopts_explicitly",
        "bybit_context_without_active_order_is_inconclusive_until_recovery",
        "bybit_flat_hedge_row_with_opposite_open_does_not_emit_closed_notice",
        "bybit_one_way_flat_row_uses_previous_side_identity",
        "bybit_completed_dca_state_survives_restart_without_active_order",
        "bybit_filter_only_recovery_does_not_prune_contexts",
        "bybit_open_order_recovery_prunes_absent_contexts",
        "bybit_late_private_event_routes_to_current_or_terminal_scope",
        "bybit_duplicate_slots_same_role_step_resolve_without_extra_place",
        "bybit_pending_confirmation_blocks_duplicate_dca_place",
        "bybit_terminal_dca_fill_then_planner_tick_reprotects_only_after_position_update",
        "bybit_position_mode_auto_detects_observed_exchange_identity",
        "bybit_hedge_risk_blocks_dca_but_allows_protective_repair"
      ],
      "replacementAndAmend": [
        "bybit_same_side_position_add_amends_same_slots_without_cancel_first",
        "bybit_same_slot_update_submits_amends_without_cancel_gap",
        "bybit_cancel_first_replacement_converges_before_place",
        "bybit_amend_rejection_enters_recovery_without_blind_cancel_place",
        "bybit_hydrated_defaults_do_not_churn",
        "bybit_deferred_replan_owner_only"
      ],
      "submissionErrors": [
        "bybit_retcode_nonzero_blocks_failed_slot_or_enters_recovery",
        "bybit_submission_rejection_requires_resync_without_permanent_pause",
        "bybit_rejected_order_link_id_is_not_retried_without_state_change",
        "bybit_rejected_order_link_id_can_retry_after_request_change",
        "bybit_duplicate_order_link_id_preflights_place_intent_without_blocking_cleanup",
        "bybit_partial_protective_reject_blocks_failed_slot_and_surfaces_error",
        "bybit_unknown_submit_outcome_enters_recovery_after_configured_timeout",
        "bybit_recovery_required_blocks_normal_actions_until_hydration_succeeds"
      ],
      "decimalFormatting": [
        "bybit_sub_unit_tick_formats_trigger_price_correctly",
        "bybit_single_digit_price_tick_formats_correctly",
        "bybit_large_price_tick_formats_correctly",
        "bybit_integer_quantity_lot_formats_correctly",
        "bybit_fractional_quantity_lot_formats_correctly"
      ]
    },
    "identityMismatchFixtureNames": [
      "bybit_stale_context_wrong_position_idx_enters_recovery",
      "bybit_active_app_order_without_context_refuses_mutation_or_adopts_explicitly",
      "bybit_context_without_active_order_is_inconclusive_until_recovery",
      "bybit_flat_hedge_row_with_opposite_open_does_not_emit_closed_notice",
      "bybit_one_way_flat_row_uses_previous_side_identity",
      "bybit_completed_dca_state_survives_restart_without_active_order",
      "bybit_filter_only_recovery_does_not_prune_contexts",
      "bybit_open_order_recovery_prunes_absent_contexts",
      "bybit_late_private_event_routes_to_current_or_terminal_scope",
      "bybit_duplicate_slots_same_role_step_resolve_without_extra_place",
      "bybit_pending_confirmation_blocks_duplicate_dca_place",
      "bybit_terminal_dca_fill_then_planner_tick_reprotects_only_after_position_update",
      "bybit_position_mode_auto_detects_observed_exchange_identity",
      "bybit_hedge_risk_blocks_dca_but_allows_protective_repair"
    ],
    "recoveryState": {
      "recoveryRequired": true,
      "operatorPaused": false,
      "blocksNewExposure": true,
      "blocksNormalPhasesUntilHydrated": true,
      "requiresScopedHydration": true,
      "clearsBy": [
        "scoped_rest_hydration",
        "buffered_private_event_replay",
        "coherent_accountstate_read"
      ]
    },
    "submissionActionFamilies": [
      "recovery",
      "cleanup",
      "protective",
      "dca",
      "noop",
      "blocked"
    ],
    "goldenRuntimeTrace": {
      "startup": [
        "subscribe private order/execution/position/wallet topics",
        "REST hydrate instruments, account mode, wallet, positions, active orders, executions, and risk limits",
        "wait for private topic ack or topic updates",
        "replay buffered private events",
        "emit private_ws_event_received/accountstate_event_applied/affected_scope_recorded",
        "plan one affected symbol-side from accountstate",
        "emit cleanup candidate or submit cleanup action if write mode permits",
        "pre-register protective SL/TP contexts and record or dispatch separate SL/TP orders concurrently in protective action family",
        "wait for private stream confirmation or scoped recovery hydration",
        "record or submit DCA in a later DCA action family only if the position still exists and still needs DCA",
        "planner_finished intentCount=0"
      ],
      "normalPrivateBurst": [
        "buffer order/execution/position/wallet events for about 25ms",
        "replay burst into accountstate without REST hydration while trusted",
        "emit semantic WS/accountstate logs and record the affected symbol-side scope",
        "plan one affected symbol-side from accountstate",
        "amend same-slot TP/SL/DCA where possible",
        "planner_finished intentCount=0"
      ],
      "reconnectOrException": [
        "mark stream not ready and set recoveryRequired or syncRequired",
        "keep buffering private events where possible",
        "REST hydrate affected category/symbol/positionIdx scope",
        "wait for topic ack or private topic update",
        "replay buffered events",
        "resume only when accountstate is coherent"
      ]
    },
    "redFlagLogs": [
      "repeated nonzero intentCount with no accountstate change",
      "repeated cancel/place for the same logical slot when amend would work",
      "repeated REST hydration on normal private account-event bursts",
      "positionIdx:0 request for normalized hedge LONG or SHORT",
      "product_paused after a submission rejection without explicit operator stop",
      "duplicate orderLinkId after cancel-first replacement",
      "role, step, side, or strategy state encoded into orderLinkId",
      "DCA submitted from a plan made before an intervening close or fill",
      "app-owned cleanup blocked by duplicate or recent place guards",
      "accepted submit response immediately unlocks DCA before private stream confirmation",
      "workflow_finished logged from a stale pre-recovery snapshot"
    ],
    "mustLogFields": [
      "event",
      "category",
      "symbol",
      "positionIdx",
      "intentCount",
      "activeOrders",
      "bufferedEventCount",
      "readiness",
      "retCode",
      "orderLinkId"
    ],
    "mustNeverLogRawFields": [
      "apiKey",
      "apiSecret",
      "signature",
      "signedUrl",
      "websocketUrl",
      "rawOrderIntent",
      "rawPrivatePayload"
    ]
  },
  "subjectTrust": {
    "subjects": [
      "order trust",
      "position trust",
      "filter trust",
      "context trust",
      "readiness trust"
    ],
    "rules": [
      "Split trust by subject: order trust, position trust, filter trust, context trust, and readiness trust.",
      "A TP/SL/DCA order update proves only order trust; it does not prove position trust, position size, entry/cost basis, exposure, or replacement eligibility.",
      "For products with exchange-provided position rows, order/fill events are triggers; replacement planning waits for matching position trust from private position or account updates or scoped recovery.",
      "For products without exchange-provided position rows, derive local position state from fills/executions, fees, account events, balance updates, and documented matching rules before managed exits, exposure changes, or re-hedging."
    ]
  },
  "symbolScope": [
    "If configuredSymbols is blank, absent, or empty, auto-detect eligible open positions.",
    "When symbols are configured, treat them as an allowlist: manage matching detected positions only and ignore or log out-of-scope private events without mutation.",
    "Sample symbols from docs, tests, prompts, or quickstarts are examples only; never use them as runtime defaults."
  ],
  "riskGeometry": [
    "For broad TP/SL/DCA position managers, use percentage-based strategy inputs by default: derive TP, DCA, and SL prices plus DCA size from trusted entry and position size before order planning.",
    "Absolute TP/DCA/SL prices or DCA quantities are advanced per-symbol operator overrides, not the primary config model. If allowed, they must be explicit, scoped, compatible with percentage defaults, and validated through the same filters and risk geometry.",
    "Startup validation rejects missing, invalid, contradictory, or non-finite strategy inputs before private clients, WebSocket subscriptions, hydration, or exchange mutation.",
    "Validate risk geometry before exchange mutation: for long positions, TP is above entry, DCA is below entry, and SL is below DCA; for short positions, TP is below entry, DCA is above entry, and SL is above DCA.",
    "Reject missing or invalid TP/DCA/SL strategy outputs before order placement. After derivation or override, quantize prices and quantities with hydrated exchange filters before final validation.",
    "After quantization, revalidate risk geometry, min/max, and notional rules; reject only if the quantized TP/DCA/SL values are equal, crossed, or otherwise violate geometry or filters before [EXECUTION_MODE](https://siebly.io/reference/glossary#execution-mode)=DRY_RUN_PRIVATE, DEMO, TESTNET, or LIVE order placement.",
    "Risk geometry validation uses the trusted entry price or explicit operator override, hydrated tick/lot filters, and the managed side before any place/amend/cancel request."
  ],
  "identityChainReview": {
    "cleanPassesRequired": 3,
    "chain": [
      "config scope",
      "product/environment/account",
      "symbol",
      "position mode",
      "managed side",
      "exchange position identity",
      "accountstate position state (native or locally derived)",
      "planner scope",
      "slot scope",
      "custom order ID",
      "durable context",
      "exchange request",
      "REST acceptance",
      "private order/execution/position event",
      "trusted active order",
      "subject trust state",
      "confirmation tracker",
      "recovery scope",
      "cleanup/protective/DCA replanning"
    ],
    "requiredRule": "Do not mark the implementation complete until three consecutive full identity-chain review passes produce no code, tests, fixtures, or documentation changes.",
    "passMustTrace": "Trace mismatched, stale, missing, contradictory, duplicated, late, recovered, and flat identities across every runtime boundary."
  },
  "identityMismatchPolicy": {
    "scope": "Trace category, environment, account, symbol, position mode, managed side, positionIdx, durable context, orderLinkId, active order, private order/execution/position event, confirmation tracker, recovery scope, and replanning together.",
    "accountAndPositionMode": [
      "Prefer auto-detection from observed exchange/accountstate identity when the evidence is clear.",
      "Do not block only because configured mode text differs from observed mode; record the mismatch and follow observed identity.",
      "Refuse mutation only while mode evidence is unresolved, stale, or contradictory."
    ],
    "durableContext": [
      "Saved durable context without matching trusted active-order evidence remains unresolved until scoped active-order recovery confirms absence or terminal state.",
      "Active app-owned order without saved context refuses mutation unless an explicit adoption path is configured and fixture-proven.",
      "Terminal order rows are not active protective confirmations.",
      "Filled DCA steps are completed step identity, not active orders, and completed DCA state survives restart."
    ],
    "positionRowsAndRisk": [
      "Flat hedge private position rows are state rows, not close lifecycle events unless previous state was open for that same scoped side.",
      "A flat row on one hedge side must not emit a close notice or cleanup for the opposite open side.",
      "One-way flat rows require previous managed-side identity before close/noop decisions.",
      "Hedge-risk controls block exposure-increasing DCA, not protective TP/SL repair."
    ],
    "recoveryScopes": [
      "Filter-only recovery restores filters and must not prune durable order contexts.",
      "Open-order recovery may confirm or prune contexts only with explicit active-order evidence.",
      "Startup mutation waits until private stream confirmation can be observed."
    ],
    "fixtureNames": [
      "bybit_stale_context_wrong_position_idx_enters_recovery",
      "bybit_active_app_order_without_context_refuses_mutation_or_adopts_explicitly",
      "bybit_context_without_active_order_is_inconclusive_until_recovery",
      "bybit_flat_hedge_row_with_opposite_open_does_not_emit_closed_notice",
      "bybit_one_way_flat_row_uses_previous_side_identity",
      "bybit_completed_dca_state_survives_restart_without_active_order",
      "bybit_filter_only_recovery_does_not_prune_contexts",
      "bybit_open_order_recovery_prunes_absent_contexts",
      "bybit_late_private_event_routes_to_current_or_terminal_scope",
      "bybit_duplicate_slots_same_role_step_resolve_without_extra_place",
      "bybit_pending_confirmation_blocks_duplicate_dca_place",
      "bybit_terminal_dca_fill_then_planner_tick_reprotects_only_after_position_update",
      "bybit_position_mode_auto_detects_observed_exchange_identity",
      "bybit_hedge_risk_blocks_dca_but_allows_protective_repair"
    ]
  },
  "requiredCoreSafetyFixtures": [
    "blank_symbols_auto_detects_open_positions",
    "absent_symbols_auto_detects_open_positions",
    "blank_symbols_no_positions_noops_without_mutation",
    "symbol_allowlist_manages_matching_detected_positions_only",
    "sample_symbol_not_used_as_runtime_default",
    "order_confirmation_does_not_imply_position_trust",
    "native_position_dca_fill_waits_for_position_update",
    "native_position_tp_sl_fill_waits_for_position_update",
    "spot_local_position_state_substitutes_for_native_position_rows",
    "long_dca_equal_sl_rejected",
    "short_dca_equal_sl_rejected"
  ],
  "fixtures": [
    {
      "name": "bybit_position_open_reacts_without_timer",
      "group": "startup_and_readiness",
      "category": "linear",
      "given": {
        "initialHydration": {
          "positions": [],
          "activeOrders": [],
          "instruments": [
            {
              "symbol": "BTCUSDT",
              "tickSize": "0.1",
              "qtyStep": "0.001"
            }
          ]
        },
        "privateEvents": [
          {
            "topic": "execution",
            "symbol": "BTCUSDT",
            "category": "linear"
          },
          {
            "topic": "position",
            "symbol": "BTCUSDT",
            "positionIdx": 0,
            "size": "0.01"
          }
        ],
        "trustedAccountstateAfterReplay": {
          "positions": [
            {
              "symbol": "BTCUSDT",
              "positionIdx": 0,
              "side": "Buy",
              "size": "0.01"
            }
          ],
          "activeOrders": []
        }
      },
      "expect": {
        "scheduledDelayMs": 0,
        "semanticLogs": [
          "private_ws_event_received",
          "accountstate_event_applied",
          "affected_scope_recorded"
        ],
        "firstPhase": "protective",
        "firstIntentRoles": [
          "SL",
          "TP"
        ],
        "noTimerWait": true
      }
    },
    {
      "name": "bybit_private_stream_exception_prevents_service_ready",
      "group": "startup_and_readiness",
      "category": "linear",
      "given": {
        "requiredPrivateStream": true,
        "websocketEvent": {
          "event": "exception",
          "topic": "private"
        }
      },
      "expect": {
        "serviceReadyLogged": false,
        "liveSubmissionEnabled": false,
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        }
      }
    },
    {
      "name": "bybit_private_topic_updates_can_complete_readiness_without_args_ack",
      "group": "startup_and_readiness",
      "category": "linear",
      "given": {
        "subscribeResponse": {
          "op": "subscribe",
          "success": true,
          "args": []
        },
        "privateUpdates": [
          {
            "topic": "order",
            "data": []
          },
          {
            "topic": "execution",
            "data": []
          },
          {
            "topic": "position",
            "data": [
              {
                "symbol": "BTCUSDT",
                "positionIdx": 0
              }
            ]
          },
          {
            "topic": "wallet",
            "data": []
          }
        ]
      },
      "expect": {
        "topicsReady": [
          "order",
          "execution",
          "position",
          "wallet"
        ],
        "serviceReadyCanProceedAfterHydration": true
      }
    },
    {
      "name": "bybit_subscribe_response_req_id_topics_can_mark_ready",
      "group": "startup_and_readiness",
      "category": "linear",
      "given": {
        "subscribeRequest": {
          "req_id": "pm-private-order-execution-position-wallet"
        },
        "subscribeResponse": {
          "op": "subscribe",
          "success": true,
          "req_id": "pm-private-order-execution-position-wallet"
        }
      },
      "expect": {
        "requestIdMapsToTopics": [
          "order",
          "execution",
          "position",
          "wallet"
        ],
        "socketOpenAloneIsNotReady": true,
        "serviceReadyAfterHydrationAndReplay": true
      }
    },
    {
      "name": "bybit_private_stream_reconnect_clears_exception_before_ack_readiness",
      "group": "startup_and_readiness",
      "category": "linear",
      "given": {
        "previousEvent": {
          "event": "exception",
          "message": "socket closed"
        },
        "reconnectEvents": [
          {
            "event": "reconnected"
          },
          {
            "op": "subscribe",
            "success": true,
            "args": [
              "order",
              "position"
            ]
          }
        ],
        "missingTopics": [
          "execution",
          "wallet"
        ]
      },
      "expect": {
        "exceptionLatchClearedAfterReconnect": true,
        "missingTopicsStillBlockReady": true,
        "recoveryRequiredUntilAllRequiredTopicsReady": true
      }
    },
    {
      "name": "bybit_private_position_replay_drives_planning_without_rest_rehydrate",
      "group": "rest_accountstate_boundary",
      "category": "linear",
      "given": {
        "accountstateTrusted": true,
        "reason": "private_burst",
        "privateEvents": [
          {
            "topic": "position",
            "symbol": "BTCUSDT",
            "positionIdx": 0,
            "size": "0.02"
          }
        ]
      },
      "expect": {
        "restHydrationCalls": 0,
        "plannerReads": "trusted_accountstate",
        "intentRolesMayInclude": [
          "SL",
          "TP"
        ]
      }
    },
    {
      "name": "bybit_normal_state_check_uses_accountstate_not_rest",
      "group": "rest_accountstate_boundary",
      "category": "linear",
      "given": {
        "accountstateTrusted": true,
        "actionFamily": "after_protective_exits",
        "checkRequiredBeforeDca": true
      },
      "expect": {
        "restHydrationCalls": 0,
        "readsTrustedAccountstate": true,
        "dcaBlockedIfPositionMissing": true
      }
    },
    {
      "name": "bybit_reconnect_uses_rest_hydration_before_resume",
      "group": "rest_accountstate_boundary",
      "category": "linear",
      "given": {
        "websocketEvents": [
          {
            "event": "reconnect"
          },
          {
            "event": "reconnected"
          }
        ],
        "bufferedEvents": [
          {
            "topic": "order"
          }
        ]
      },
      "expect": {
        "restHydrationRequiredBeforePlanning": true,
        "bufferedReplayAfterHydration": true,
        "liveSubmissionBeforeHydration": false
      }
    },
    {
      "name": "bybit_private_event_burst_groups_to_single_reconcile",
      "group": "private_bursts",
      "category": "linear",
      "given": {
        "waitForRelatedEventsMs": 25,
        "eventsAtMs": [
          {
            "at": 0,
            "topic": "order"
          },
          {
            "at": 4,
            "topic": "execution"
          },
          {
            "at": 9,
            "topic": "position"
          },
          {
            "at": 14,
            "topic": "wallet"
          }
        ]
      },
      "expect": {
        "reconcileRuns": 1,
        "restHydrationCalls": 0,
        "plannedFromPartialFirstEvent": false
      }
    },
    {
      "name": "bybit_order_execution_position_wallet_out_of_order_converges",
      "group": "private_bursts",
      "category": "linear",
      "given": {
        "eventOrder": [
          "wallet",
          "position",
          "order",
          "execution"
        ],
        "accountstateTrusted": true
      },
      "expect": {
        "finalPlannerIntentCount": 0,
        "duplicateOrdersCreated": false,
        "burstReplayOrderIndependent": true
      }
    },
    {
      "name": "bybit_accepted_submissions_settle_to_zero_intents",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "acceptedResponses": [
          {
            "retCode": 0,
            "result": {
              "orderLinkId": "o9f2c7a1b4d6"
            }
          },
          {
            "retCode": 0,
            "result": {
              "orderLinkId": "p4d8e1c6a9f0"
            }
          }
        ],
        "protectiveConfirmationsApplied": true,
        "dcaAcceptedInLaterPhase": {
          "retCode": 0,
          "result": {
            "orderLinkId": "q6a3f9d2b7c1"
          }
        },
        "nextAccountstate": {
          "activeOrders": [
            {
              "role": "SL",
              "orderLinkId": "o9f2c7a1b4d6",
              "orderFilter": "StopOrder"
            },
            {
              "role": "TP",
              "orderLinkId": "p4d8e1c6a9f0"
            },
            {
              "role": "DCA",
              "orderLinkId": "q6a3f9d2b7c1"
            }
          ]
        }
      },
      "expect": {
        "activeOrders": 3,
        "plannerIntentCount": 0,
        "pendingConfirmationsUsed": true
      }
    },
    {
      "name": "bybit_golden_live_convergence_trace_settles_after_deferred_dca",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "trace": [
          "subscribe private order/execution/position/wallet topics",
          "REST hydrate instruments, account mode, wallet, positions, active orders, executions, and risk limits",
          "wait for private topic ack or topic updates",
          "replay buffered private events",
          "emit private_ws_event_received/accountstate_event_applied/affected_scope_recorded",
          "plan one affected symbol-side from accountstate",
          "emit cleanup candidate or submit cleanup action if write mode permits",
          "pre-register protective SL/TP contexts and record or dispatch separate SL/TP orders concurrently in protective action family",
          "wait for private stream confirmation or scoped recovery hydration",
          "record or submit DCA in a later DCA action family only if the position still exists and still needs DCA",
          "planner_finished intentCount=0"
        ],
        "initialPosition": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "side": "Buy",
          "size": "0.01"
        }
      },
      "expect": {
        "actionFamilyOrder": [
          "recovery",
          "cleanup",
          "protective",
          "dca",
          "noop",
          "blocked"
        ],
        "dcaAfterTrustedAccountstateRead": true,
        "finalIntentCount": 0
      }
    },
    {
      "name": "bybit_position_open_places_protective_then_dca_after_ws_confirmation",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "position": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "side": "Buy",
          "size": "0.01"
        },
        "activeOrders": [],
        "protectiveActionAccepted": [
          "SL",
          "TP"
        ],
        "privateConfirmations": [
          "SL_NEW",
          "TP_NEW"
        ]
      },
      "expect": {
        "firstActionFamily": "protective",
        "firstActionFamilyRoles": [
          "SL",
          "TP"
        ],
        "dcaInFirstPass": false,
        "dcaAfterConfirmation": true
      }
    },
    {
      "name": "bybit_pending_confirmation_does_not_unlock_dependent_action_family",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "acceptedProtectiveResponses": [
          "SL",
          "TP"
        ],
        "privateConfirmations": []
      },
      "expect": {
        "pendingConfirmations": [
          "SL",
          "TP"
        ],
        "dcaIntentCount": 0,
        "duplicateSubmitSuppressed": true
      }
    },
    {
      "name": "bybit_semantic_ws_logs_emitted_after_ingest",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "privateEvents": [
          {
            "topic": "order"
          },
          {
            "topic": "execution"
          },
          {
            "topic": "position"
          }
        ]
      },
      "expect": {
        "logs": [
          "private_ws_event_received",
          "accountstate_event_applied",
          "affected_scope_recorded",
          "symbol_side_reconcile_started",
          "action_family_selected",
          "submission_accepted_pending_confirmation",
          "private_ws_confirmation_applied",
          "workflow_reconcile_complete"
        ],
        "rawPrivatePayloadLogged": false
      }
    },
    {
      "name": "bybit_symbol_side_queue_groups_private_event_burst",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "symbolSide": "BTCUSDT:0:LONG",
        "privateEvents": [
          {
            "topic": "order"
          },
          {
            "topic": "execution"
          },
          {
            "topic": "position"
          },
          {
            "topic": "wallet"
          }
        ]
      },
      "expect": {
        "affectedWorkItems": 1,
        "workflowPasses": 1,
        "restHydrationCalls": 0
      }
    },
    {
      "name": "bybit_position_close_between_exit_action_and_dca_skips_dca",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "protectiveAccepted": [
          "SL",
          "TP"
        ],
        "accountstateReadBeforeDca": {
          "positions": [],
          "activeOrders": [
            {
              "role": "SL"
            },
            {
              "role": "TP"
            }
          ]
        }
      },
      "expect": {
        "dcaSubmitCalls": 0,
        "cleanupScheduled": true,
        "stalePreClosePlanUsed": false
      }
    },
    {
      "name": "bybit_dca_never_submitted_from_stale_pre_close_plan",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "plannedDca": {
          "role": "DCA",
          "orderLinkId": "q6a3f9d2b7c1"
        },
        "interveningPrivateEvent": {
          "topic": "position",
          "size": "0"
        }
      },
      "expect": {
        "submitDcaFromOriginalPlan": false,
        "requiresFreshAccountstateRead": true
      }
    },
    {
      "name": "bybit_conditional_sl_requires_trigger_direction",
      "group": "request_shape",
      "category": "linear",
      "given": {
        "longStopIntent": {
          "side": "Sell",
          "triggerPrice": "95000.0",
          "currentPrice": "100000.0",
          "positionIdx": 0
        },
        "requestWithoutTriggerDirection": true
      },
      "expect": {
        "localValidationFails": true,
        "correctedTriggerDirection": 2,
        "correctedOrderFilter": "StopOrder",
        "correctedCloseOnTrigger": true
      }
    },
    {
      "name": "bybit_hedge_normalized_position_idx_maps_to_bybit_request_idx",
      "group": "request_shape",
      "category": "linear",
      "given": {
        "normalizedPositions": [
          {
            "exchangePositionSide": "LONG",
            "raw": {}
          },
          {
            "exchangePositionSide": "SHORT",
            "raw": {}
          }
        ]
      },
      "expect": {
        "requestPositionIdxBySide": {
          "LONG": 1,
          "SHORT": 2
        },
        "noRequestPositionIdxZeroForHedgeSides": true
      }
    },
    {
      "name": "bybit_one_way_short_uses_position_idx_zero",
      "group": "request_shape",
      "category": "linear",
      "given": {
        "positionMode": "one_way",
        "normalizedPosition": {
          "exchangePositionSide": "BOTH",
          "managedSide": "SHORT"
        }
      },
      "expect": {
        "requestPositionIdx": 0,
        "managedSidePreserved": "SHORT"
      }
    },
    {
      "name": "bybit_tp_is_reduce_only_limit_with_expected_time_in_force",
      "group": "request_shape",
      "category": "linear",
      "given": {
        "tpPolicy": {
          "orderType": "Limit",
          "tpTimeInForce": "GTC",
          "tpReduceOnly": true
        }
      },
      "expect": {
        "request": {
          "orderType": "Limit",
          "timeInForce": "GTC",
          "reduceOnly": true
        },
        "passiveByPriceIsNotPostOnly": true
      }
    },
    {
      "name": "bybit_position_update_timestamp_does_not_rotate_slots",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "before": {
          "slotScope": "BTCUSDT:0:LONG",
          "updatedAtMs": 1000,
          "size": "0.01"
        },
        "after": {
          "updatedAtMs": 2000,
          "size": "0.01"
        }
      },
      "expect": {
        "slotScope": "BTCUSDT:0:LONG",
        "replacementPlanned": false
      }
    },
    {
      "name": "bybit_full_close_cleanup_cancels_only_app_owned_orders",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "position": null,
        "activeOrders": [
          {
            "owner": "app",
            "role": "SL",
            "orderLinkId": "o9f2c7a1b4d6"
          },
          {
            "owner": "manual",
            "role": "MANUAL",
            "orderLinkId": ""
          }
        ]
      },
      "expect": {
        "cancelOrderLinkIds": [
          "o9f2c7a1b4d6"
        ],
        "unownedOrdersTouched": false
      }
    },
    {
      "name": "bybit_one_way_short_then_long_fresh_scope_cleans_old_side",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "oldScope": {
          "managedSide": "SHORT",
          "positionIdx": 0
        },
        "newPosition": {
          "managedSide": "LONG",
          "positionIdx": 0,
          "size": "0.01"
        }
      },
      "expect": {
        "newScopeStartsFresh": true,
        "oldSideCleanupBeforeNewPlacement": true
      }
    },
    {
      "name": "bybit_hedge_same_symbol_sides_do_not_cross_cancel",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "positions": [
          {
            "symbol": "BTCUSDT",
            "positionIdx": 1,
            "managedSide": "LONG"
          },
          {
            "symbol": "BTCUSDT",
            "positionIdx": 2,
            "managedSide": "SHORT"
          }
        ],
        "closingSide": {
          "positionIdx": 1,
          "managedSide": "LONG"
        }
      },
      "expect": {
        "shortSideOrdersCancelled": 0,
        "partitionByPositionIdx": true
      }
    },
    {
      "name": "bybit_startup_wipe_rebuild_cancels_app_orders_before_rebuild",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "memoryEmpty": true,
        "position": {
          "symbol": "BTCUSDT",
          "positionIdx": 1,
          "managedSide": "LONG"
        },
        "activeOrders": [
          {
            "orderLinkId": "r1c8e4f6a0b2",
            "role": "TP",
            "owner": "app"
          },
          {
            "orderLinkId": "",
            "role": "MANUAL",
            "owner": "manual"
          }
        ]
      },
      "expect": {
        "recoveredLifecycleFromOrderLinkId": false,
        "cleanupBeforeRebuild": true,
        "unownedOrdersTouched": false
      }
    },
    {
      "name": "bybit_same_side_position_add_amends_same_slots_without_cancel_first",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "existingOrders": [
          {
            "role": "TP",
            "qty": "0.010",
            "price": "105000",
            "orderLinkId": "p4d8e1c6a9f0"
          }
        ],
        "newDesired": [
          {
            "role": "TP",
            "qty": "0.020",
            "price": "105500",
            "orderLinkId": "s5b9d2a7e1c4"
          }
        ],
        "amendSupported": true
      },
      "expect": {
        "firstAction": "amend",
        "cancelBeforeAmend": false,
        "protectiveExitGap": false
      }
    },
    {
      "name": "bybit_same_slot_update_submits_amends_without_cancel_gap",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "diffFields": [
          "qty",
          "price",
          "triggerPrice",
          "triggerBy"
        ],
        "sameSlotIdentity": true
      },
      "expect": {
        "action": "amend",
        "cancelPlace": false
      }
    },
    {
      "name": "bybit_cancel_first_replacement_converges_before_place",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "oldOrderLinkId": "o9f2c7a1b4d6",
        "newOrderLinkId": "u2b6f0d5a8c3",
        "cancelPhaseAccepted": true
      },
      "expect": {
        "trustedStateConvergedBeforePlace": true,
        "reuseOldOrderLinkId": false
      }
    },
    {
      "name": "bybit_amend_rejection_enters_recovery_without_blind_cancel_place",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "amendResponse": {
          "retCode": 110001,
          "retMsg": "order not found"
        },
        "fallbackCancelPlaceConfigured": false
      },
      "expect": {
        "blindCancelPlaceAfterAmendRejection": false,
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        }
      }
    },
    {
      "name": "bybit_retcode_nonzero_blocks_failed_slot_or_enters_recovery",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "phaseIntents": [
          {
            "action": "place",
            "role": "SL",
            "orderLinkId": "o9f2c7a1b4d6"
          },
          {
            "action": "place",
            "role": "TP",
            "orderLinkId": "p4d8e1c6a9f0"
          },
          {
            "action": "place",
            "role": "DCA",
            "orderLinkId": "q6a3f9d2b7c1"
          }
        ],
        "firstResponse": {
          "retCode": 110092,
          "retMsg": "expect Rising, but trigger_price",
          "result": {}
        }
      },
      "expect": {
        "exchangeCalls": 1,
        "laterNonSentIntentsStopped": true,
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        },
        "structuredRetCodeLogged": true
      }
    },
    {
      "name": "bybit_submission_rejection_requires_resync_without_permanent_pause",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "rejection": {
          "retCode": 110092,
          "retMsg": "trigger price invalid"
        }
      },
      "expect": {
        "recoveryRequired": true,
        "operatorPaused": false,
        "scopedRestHydrationScheduled": true,
        "liveNewExposureBlocked": true,
        "normalCleanupAllowedAfterRecoveryHydration": true
      }
    },
    {
      "name": "bybit_rejected_order_link_id_is_not_retried_without_state_change",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "rejectedRequest": {
          "orderLinkId": "o9f2c7a1b4d6",
          "triggerPrice": "95000.0"
        },
        "nextRequest": {
          "orderLinkId": "o9f2c7a1b4d6",
          "triggerPrice": "95000.0"
        }
      },
      "expect": {
        "retryBlockedByFingerprint": true,
        "exchangeCalls": 0
      }
    },
    {
      "name": "bybit_rejected_order_link_id_can_retry_after_request_change",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "rejectedRequest": {
          "orderLinkId": "o9f2c7a1b4d6",
          "triggerPrice": "95000.0"
        },
        "nextRequest": {
          "orderLinkId": "o9f2c7a1b4d6",
          "triggerPrice": "94900.0"
        }
      },
      "expect": {
        "retryBlockedByFingerprint": false,
        "requiresFreshAccountstateRead": true
      }
    },
    {
      "name": "bybit_duplicate_order_link_id_preflights_place_intent_without_blocking_cleanup",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "recentlyAcceptedOrderLinkIds": [
          "o9f2c7a1b4d6"
        ],
        "phaseIntents": [
          {
            "action": "cancel",
            "role": "cleanup",
            "orderLinkId": "w3f7b0e2a6d9"
          },
          {
            "action": "place",
            "role": "SL",
            "orderLinkId": "o9f2c7a1b4d6"
          }
        ]
      },
      "expect": {
        "placePreflightFailsBeforePlaceCall": true,
        "knownAppOwnedCleanupNotBlockedByPlaceGuard": true,
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        }
      }
    },
    {
      "name": "bybit_hydrated_defaults_do_not_churn",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "desiredOrders": [
          {
            "role": "TP",
            "orderLinkId": "p4d8e1c6a9f0",
            "price": "105000",
            "qty": "0.01"
          },
          {
            "role": "DCA",
            "orderLinkId": "q6a3f9d2b7c1",
            "price": "97000",
            "qty": "0.005"
          }
        ],
        "hydratedActiveOrders": [
          {
            "orderLinkId": "p4d8e1c6a9f0",
            "price": "105000.0",
            "qty": "0.010",
            "reduceOnly": false,
            "closeOnTrigger": false,
            "triggerPrice": "",
            "triggerDirection": 0
          },
          {
            "orderLinkId": "q6a3f9d2b7c1",
            "price": "97000.0",
            "qty": "0.005",
            "reduceOnly": false,
            "closeOnTrigger": false,
            "triggerPrice": ""
          }
        ]
      },
      "expect": {
        "cancelIntents": 0,
        "placeIntents": 0,
        "amendIntents": 0,
        "plannerIntentCount": 0
      }
    },
    {
      "name": "bybit_deferred_replan_owner_only",
      "group": "replacement_and_amend",
      "category": "linear",
      "given": {
        "workflowOwnerActive": true,
        "incomingReasons": [
          "private_order",
          "private_execution",
          "subscription_response",
          "timer"
        ]
      },
      "expect": {
        "nonOwnerStarts": 0,
        "boundedReasons": true,
        "recursiveReasonStrings": false,
        "deferredReconcileRunsAfterOwner": 1
      }
    },
    {
      "name": "bybit_sub_unit_tick_formats_trigger_price_correctly",
      "group": "decimal_formatting",
      "category": "linear",
      "given": {
        "rawTriggerPrice": "0.49490000000000006",
        "tickSize": "0.0001"
      },
      "expect": {
        "triggerPrice": "0.4949",
        "not": [
          "494.9",
          "0.49490000000000006"
        ]
      }
    },
    {
      "name": "bybit_single_digit_price_tick_formats_correctly",
      "group": "decimal_formatting",
      "category": "linear",
      "given": {
        "rawPrice": "4.999999999",
        "tickSize": "0.01"
      },
      "expect": {
        "price": "5.00",
        "submitRawFloatTail": false
      }
    },
    {
      "name": "bybit_large_price_tick_formats_correctly",
      "group": "decimal_formatting",
      "category": "linear",
      "given": {
        "rawPrice": "100000.00000000003",
        "tickSize": "0.1"
      },
      "expect": {
        "price": "100000.0",
        "submitRawFloatTail": false
      }
    },
    {
      "name": "bybit_integer_quantity_lot_formats_correctly",
      "group": "decimal_formatting",
      "category": "spot",
      "given": {
        "rawQuantity": "10.0000000004",
        "qtyStep": "1"
      },
      "expect": {
        "qty": "10",
        "submitRawFloatTail": false
      }
    },
    {
      "name": "bybit_fractional_quantity_lot_formats_correctly",
      "group": "decimal_formatting",
      "category": "linear",
      "given": {
        "rawQuantity": "0.0020000000000000005",
        "qtyStep": "0.001"
      },
      "expect": {
        "qty": "0.002",
        "submitRawFloatTail": false
      }
    },
    {
      "name": "bybit_stale_context_wrong_position_idx_enters_recovery",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "durableContext": {
          "orderLinkId": "s2a8d4f6c1b0",
          "role": "TP",
          "symbol": "BTCUSDT",
          "positionIdx": 1,
          "managedSide": "LONG"
        },
        "trustedPosition": {
          "symbol": "BTCUSDT",
          "positionIdx": 2,
          "managedSide": "SHORT",
          "size": "0.01"
        },
        "activeOrder": {
          "orderLinkId": "s2a8d4f6c1b0",
          "positionIdx": 1,
          "orderStatus": "New"
        }
      },
      "expect": {
        "slotTrusted": false,
        "cleanupOrReplaceBeforeRecovery": false,
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        },
        "reason": "context_position_identity_mismatch"
      }
    },
    {
      "name": "bybit_active_app_order_without_context_refuses_mutation_or_adopts_explicitly",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "durableContext": null,
        "activeOrder": {
          "orderLinkId": "a7c9e2b4d6f1",
          "owner": "app",
          "roleUnknown": true
        },
        "adoptionPolicy": "disabled"
      },
      "expect": {
        "slotMeaningParsedFromOrderLinkId": false,
        "mutationRefused": true,
        "exchangeMutationBeforeOperatorPolicy": false,
        "explicitAdoptionRequiredWhenEnabled": true
      }
    },
    {
      "name": "bybit_context_without_active_order_is_inconclusive_until_recovery",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "durableContext": {
          "orderLinkId": "c4f1d8a2e9b6",
          "role": "SL",
          "pendingAction": "place"
        },
        "trustedActiveOrders": [],
        "confirmationWindowMs": 5000
      },
      "expect": {
        "treatedAsEmptySlotImmediately": false,
        "duplicatePlaceCalls": 0,
        "nextAction": "scoped_open_order_recovery",
        "mayPruneOnlyAfterExplicitAbsence": true
      }
    },
    {
      "name": "bybit_flat_hedge_row_with_opposite_open_does_not_emit_closed_notice",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "previousPositions": [
          {
            "symbol": "ETHUSDT",
            "positionIdx": 1,
            "managedSide": "LONG",
            "size": "0.02"
          },
          {
            "symbol": "ETHUSDT",
            "positionIdx": 2,
            "managedSide": "SHORT",
            "size": "0.03"
          }
        ],
        "privatePositionRows": [
          {
            "symbol": "ETHUSDT",
            "positionIdx": 1,
            "side": "Buy",
            "size": "0"
          },
          {
            "symbol": "ETHUSDT",
            "positionIdx": 2,
            "side": "Sell",
            "size": "0.03"
          }
        ]
      },
      "expect": {
        "closeNoticeScopes": [
          "ETHUSDT:1:LONG"
        ],
        "oppositeSideCloseNotice": false,
        "shortSideCleanupCalls": 0,
        "flatRowTreatedAsStateRow": true
      }
    },
    {
      "name": "bybit_one_way_flat_row_uses_previous_side_identity",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "positionMode": "one_way",
        "previousManagedScope": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "managedSide": "SHORT",
          "size": "0.01"
        },
        "privatePositionRow": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "side": "",
          "size": "0"
        }
      },
      "expect": {
        "closeNoticeScope": "BTCUSDT:0:SHORT",
        "inferredFromCurrentFlatRowOnly": false,
        "longSideTouched": false
      }
    },
    {
      "name": "bybit_completed_dca_state_survives_restart_without_active_order",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "persistedCompletedDcaSteps": [
          {
            "symbol": "BTCUSDT",
            "positionIdx": 0,
            "managedSide": "LONG",
            "step": 1
          }
        ],
        "startupActiveOrders": [],
        "startupPosition": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "managedSide": "LONG",
          "size": "0.02"
        }
      },
      "expect": {
        "completedStepRestored": true,
        "step1ReplacedAsActiveOrder": false,
        "nextDcaStep": 2,
        "durableContextPruneDoesNotEraseCompletedStep": true
      }
    },
    {
      "name": "bybit_filter_only_recovery_does_not_prune_contexts",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "recoverySubject": "filters",
        "missingFilters": [
          "BTCUSDT"
        ],
        "durableContexts": [
          {
            "orderLinkId": "f6a1c8e4d0b2",
            "role": "TP"
          }
        ]
      },
      "expect": {
        "filterHydrationScheduled": true,
        "openOrderHydrationRequiredForContextPrune": true,
        "prunedContexts": [],
        "exchangeMutationsBeforeFilterTrust": 0
      }
    },
    {
      "name": "bybit_open_order_recovery_prunes_absent_contexts",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "recoverySubject": "open_orders",
        "durableContexts": [
          {
            "orderLinkId": "k1e7d4a9b2c6",
            "role": "TP"
          },
          {
            "orderLinkId": "m3f8b0d5a1c9",
            "role": "DCA"
          }
        ],
        "hydratedActiveOrders": [
          {
            "orderLinkId": "k1e7d4a9b2c6",
            "orderStatus": "New"
          }
        ]
      },
      "expect": {
        "confirmedContexts": [
          "k1e7d4a9b2c6"
        ],
        "prunedContexts": [
          "m3f8b0d5a1c9"
        ],
        "affectedScopesQueued": true,
        "pruneRequiresOpenOrderRecovery": true
      }
    },
    {
      "name": "bybit_late_private_event_routes_to_current_or_terminal_scope",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "currentContextGeneration": {
          "orderLinkId": "n9d2c7a1f4e6",
          "role": "SL",
          "generation": 2
        },
        "terminalContexts": [
          {
            "orderLinkId": "h4b6e1c9d8a2",
            "role": "SL",
            "generation": 1
          }
        ],
        "latePrivateEvent": {
          "topic": "order",
          "orderLinkId": "h4b6e1c9d8a2",
          "orderStatus": "Cancelled"
        }
      },
      "expect": {
        "currentSlotMutatedByLateEvent": false,
        "terminalEventRecorded": true,
        "duplicateReplacementPlaced": false,
        "recoveryRequiredOnContradiction": false
      }
    },
    {
      "name": "bybit_duplicate_slots_same_role_step_resolve_without_extra_place",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "slotKey": "BTCUSDT:0:LONG:DCA:1",
        "activeOrders": [
          {
            "orderLinkId": "u1a2b3c4d5e6",
            "role": "DCA",
            "step": 1,
            "price": "97000"
          },
          {
            "orderLinkId": "v6e5d4c3b2a1",
            "role": "DCA",
            "step": 1,
            "price": "97000"
          }
        ]
      },
      "expect": {
        "duplicateDetected": true,
        "extraPlaceCalls": 0,
        "resolutionPhase": "cleanup_or_recovery",
        "oneLogicalSlotRetainedAfterReconcile": true
      }
    },
    {
      "name": "bybit_pending_confirmation_blocks_duplicate_dca_place",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "pendingConfirmation": {
          "orderLinkId": "d8a2e6c1f9b4",
          "role": "DCA",
          "step": 1
        },
        "staleQueuedPlan": {
          "action": "place",
          "role": "DCA",
          "step": 1,
          "orderLinkId": "x7b4f2d9e1c6"
        }
      },
      "expect": {
        "submitterBlocksBeforeExchangeCall": true,
        "exchangePlaceCalls": 0,
        "duplicateIntentLogged": true,
        "pendingConfirmationPreserved": true
      }
    },
    {
      "name": "bybit_terminal_dca_fill_then_planner_tick_reprotects_only_after_position_update",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "privateEvents": [
          {
            "topic": "execution",
            "orderLinkId": "d8a2e6c1f9b4",
            "execType": "Trade",
            "role": "DCA"
          },
          {
            "topic": "order",
            "orderLinkId": "d8a2e6c1f9b4",
            "orderStatus": "Filled"
          }
        ],
        "matchingPositionUpdate": null,
        "plannerTickBeforePositionUpdate": true
      },
      "expect": {
        "completedDcaStepRecorded": true,
        "replacementProtectionBeforePositionTrust": false,
        "nextAction": "wait_for_position_update_or_scoped_recovery",
        "dcaReplanFromStaleEntry": false
      }
    },
    {
      "name": "bybit_position_mode_auto_detects_observed_exchange_identity",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "configuredPositionMode": "one_way",
        "observedPositions": [
          {
            "symbol": "BTCUSDT",
            "positionIdx": 1,
            "side": "Buy",
            "size": "0.01"
          },
          {
            "symbol": "BTCUSDT",
            "positionIdx": 2,
            "side": "Sell",
            "size": "0.01"
          }
        ]
      },
      "expect": {
        "observedMode": "hedge",
        "blocksOnlyIfContradictoryAfterHydration": true,
        "managedScopes": [
          "BTCUSDT:1:LONG",
          "BTCUSDT:2:SHORT"
        ],
        "configMismatchLogged": true
      }
    },
    {
      "name": "bybit_hedge_risk_blocks_dca_but_allows_protective_repair",
      "group": "identity_mismatch_recovery",
      "category": "linear",
      "given": {
        "positions": [
          {
            "symbol": "BTCUSDT",
            "positionIdx": 1,
            "managedSide": "LONG",
            "size": "0.01"
          },
          {
            "symbol": "BTCUSDT",
            "positionIdx": 2,
            "managedSide": "SHORT",
            "size": "0.01"
          }
        ],
        "riskRule": "opposite_hedge_side_open",
        "desiredRepairs": [
          {
            "role": "SL"
          },
          {
            "role": "TP"
          },
          {
            "role": "DCA"
          }
        ]
      },
      "expect": {
        "blockedRoles": [
          "DCA"
        ],
        "allowedProtectiveRoles": [
          "SL",
          "TP"
        ],
        "existingProtectionMayBeRepaired": true,
        "exposureIncreasingCalls": 0
      }
    },
    {
      "name": "bybit_order_active_confirmation_before_rest_acceptance_no_stale_pending",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "preparedContext": {
          "orderLinkId": "o9f2c7a1b4d6",
          "role": "SL",
          "slotKey": "BTCUSDT:0:LONG:SL"
        },
        "restPromiseState": "pending",
        "privateEvent": {
          "topic": "order",
          "orderLinkId": "o9f2c7a1b4d6",
          "orderStatus": "New"
        },
        "laterRestAcceptance": {
          "retCode": 0,
          "result": {
            "orderLinkId": "o9f2c7a1b4d6"
          }
        }
      },
      "expect": {
        "earlyConfirmationConsumed": true,
        "stalePendingLatch": false,
        "trustedPrivateOrderPreserved": true
      }
    },
    {
      "name": "bybit_rest_acceptance_does_not_downgrade_trusted_private_order",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "trustedPrivateOrder": {
          "orderLinkId": "p4d8e1c6a9f0",
          "orderStatus": "New",
          "source": "private_ws"
        },
        "laterRestAcceptance": {
          "retCode": 0,
          "result": {
            "orderLinkId": "p4d8e1c6a9f0"
          }
        }
      },
      "expect": {
        "sourceRemainsTrustedPrivate": true,
        "visibleInOpenOrderReads": true,
        "restAcceptanceStoredAsCoordinationEvidenceOnly": true
      }
    },
    {
      "name": "bybit_terminal_order_status_is_not_open_order_confirmation",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "privateOrderEvents": [
          {
            "orderStatus": "Cancelled"
          },
          {
            "orderStatus": "Deactivated"
          },
          {
            "orderStatus": "Rejected"
          },
          {
            "orderStatus": "Filled"
          },
          {
            "orderStatus": "PartiallyFilledCanceled"
          },
          {
            "orderStatus": "Triggered"
          }
        ]
      },
      "expect": {
        "activeConfirmationCreated": false,
        "terminalOrTransitionRouteUsed": true,
        "latchClearedOrTerminalized": true
      }
    },
    {
      "name": "bybit_execution_fill_is_not_open_order_confirmation",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "knownContext": {
          "orderLinkId": "q6a3f9d2b7c1",
          "role": "DCA"
        },
        "privateEvent": {
          "topic": "execution",
          "orderLinkId": "q6a3f9d2b7c1",
          "execType": "Trade"
        }
      },
      "expect": {
        "fillApplied": true,
        "affectedScopeRecorded": true,
        "activeOpenOrderConfirmationCreated": false
      }
    },
    {
      "name": "bybit_startup_adopts_active_contexts_and_prunes_absent_contexts",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "durableContexts": [
          {
            "orderLinkId": "a1b2c3d4e5f6",
            "role": "TP"
          },
          {
            "orderLinkId": "z9y8x7w6v5u4",
            "role": "DCA"
          }
        ],
        "startupActiveOrders": [
          {
            "orderLinkId": "a1b2c3d4e5f6",
            "role": "TP"
          }
        ]
      },
      "expect": {
        "adoptedContexts": [
          "a1b2c3d4e5f6"
        ],
        "prunedContexts": [
          "z9y8x7w6v5u4"
        ],
        "affectedScopesQueued": true
      }
    },
    {
      "name": "bybit_default_dca_active_order_does_not_advance_next_step",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "dcaMode": "single_next_step",
        "activeDca": {
          "step": 1,
          "orderLinkId": "q6a3f9d2b7c1",
          "orderStatus": "New"
        },
        "desiredNextStep": 2
      },
      "expect": {
        "step2PlaceCalls": 0,
        "sameSlotAmendedIfNeeded": true,
        "dcaStepConsumedOnlyByFillOrConfigRule": true
      }
    },
    {
      "name": "bybit_ambiguous_event_routes_bounded_fallback_then_exact_scope",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "earlyEvent": {
          "topic": "order",
          "symbol": "BTCUSDT",
          "orderLinkId": "unknown"
        },
        "positionStateAvailableLater": {
          "symbol": "BTCUSDT",
          "positionIdx": 0,
          "side": "Buy",
          "size": "0.01"
        }
      },
      "expect": {
        "initialAffectedScopesBoundedToSymbolCandidates": true,
        "exactScopeUsedAfterPositionIngest": "BTCUSDT:0:LONG",
        "wrongSideNoops": true
      }
    },
    {
      "name": "bybit_linear_close_all_sl_request_is_valid",
      "group": "request_shape",
      "category": "linear",
      "given": {
        "managedSide": "LONG",
        "triggerPrice": "95000.0",
        "positionIdx": 0
      },
      "expect": {
        "request": {
          "category": "linear",
          "side": "Sell",
          "orderType": "Market",
          "qty": "0",
          "orderFilter": "StopOrder",
          "reduceOnly": true,
          "closeOnTrigger": true,
          "triggerDirection": 2,
          "triggerBy": "MarkPrice",
          "positionIdx": 0
        },
        "priceFieldPresent": false
      }
    },
    {
      "name": "bybit_order_link_id_context_lookup_routes_private_event",
      "group": "private_event_routing",
      "category": "linear",
      "given": {
        "registry": {
          "r1c8e4f6a0b2": {
            "slotKey": "BTCUSDT:0:LONG:SL",
            "role": "SL"
          }
        },
        "privateEvent": {
          "topic": "order",
          "orderLinkId": "r1c8e4f6a0b2"
        }
      },
      "expect": {
        "slotResolvedByRegistry": true,
        "orderLinkIdParsedForSlotMeaning": false,
        "exactAffectedScopeRecorded": true
      }
    },
    {
      "name": "bybit_lost_order_link_id_registry_rebuilds_from_trusted_state",
      "group": "managed_slot_ownership",
      "category": "linear",
      "given": {
        "runtimeRegistryLost": true,
        "activeOrders": [
          {
            "orderLinkId": "r1c8e4f6a0b2",
            "appOwnedByPrefixOrPolicy": true
          }
        ],
        "startupPolicy": "cleanup_then_rebuild"
      },
      "expect": {
        "strategyMeaningParsedFromOrderLinkId": false,
        "trustedHydrationUsed": true,
        "deterministicCleanupOrAdoptionPolicyApplied": true
      }
    },
    {
      "name": "bybit_protective_sl_tp_pre_registered_and_dispatched_concurrently_by_default",
      "group": "submission_phasing",
      "category": "linear",
      "given": {
        "actionFamily": "protective",
        "intents": [
          {
            "role": "SL",
            "orderLinkId": "o9f2c7a1b4d6"
          },
          {
            "role": "TP",
            "orderLinkId": "p4d8e1c6a9f0"
          }
        ]
      },
      "expect": {
        "contextsRegisteredBeforeSubmit": [
          "SL",
          "TP"
        ],
        "dispatchMode": "concurrent",
        "dcaInSamePhase": false
      }
    },
    {
      "name": "bybit_partial_protective_reject_blocks_failed_slot_and_surfaces_error",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "concurrentProtectiveResults": [
          {
            "role": "TP",
            "retCode": 0,
            "orderLinkId": "p4d8e1c6a9f0"
          },
          {
            "role": "SL",
            "retCode": 110092,
            "retMsg": "expect Rising, but trigger_price"
          }
        ]
      },
      "expect": {
        "confirmedEquivalentProtectionAdopted": [
          "TP"
        ],
        "failedSlotBlocked": "SL",
        "dcaBlockedWhileRequiredProtectionMissing": true,
        "structuredRetCodeLogged": true
      }
    },
    {
      "name": "bybit_unknown_submit_outcome_enters_recovery_after_configured_timeout",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "mutation": {
          "action": "place",
          "role": "SL",
          "orderLinkId": "o9f2c7a1b4d6"
        },
        "restOutcome": "timeout_after_send_possible",
        "confirmationTimeoutMs": 5000,
        "privateConfirmation": null
      },
      "expect": {
        "recoveryState": {
          "recoveryRequired": true,
          "operatorPaused": false,
          "blocksNewExposure": true,
          "blocksNormalPhasesUntilHydrated": true,
          "requiresScopedHydration": true,
          "clearsBy": [
            "scoped_rest_hydration",
            "buffered_private_event_replay",
            "coherent_accountstate_read"
          ]
        },
        "duplicateSubmitBeforeRecovery": false,
        "scopedHydrationScheduled": true
      }
    },
    {
      "name": "bybit_recovery_required_blocks_normal_actions_until_hydration_succeeds",
      "group": "submission_errors",
      "category": "linear",
      "given": {
        "recoveryRequired": true,
        "affectedScope": "BTCUSDT:0:LONG",
        "desiredPhase": "protective"
      },
      "expect": {
        "plannerRunsBeforeHydration": false,
        "normalPhasesBlocked": [
          "cleanup",
          "protective",
          "dca"
        ],
        "nextAction": "scoped_rest_hydration_then_requeue"
      }
    }
  ],
  "finalAcceptanceGate": [
    "README records the latest installed SDK version as metadata plus exact declarations inspected.",
    "A local checklist generated from the manifest is completed before EXECUTION_MODE=DEMO, TESTNET, or LIVE execution.",
    "Critical [behavior-contract fixtures](https://siebly.io/reference/glossary#behavior-contract-fixture) from this [Conformance Pack](https://siebly.io/reference/glossary#conformance-pack) pass before EXECUTION_MODE=DEMO, TESTNET, or LIVE submission is enabled.",
    "retCode recovery state, private event bursts, REST/accountstate boundaries, DCA after trusted account-state reads, triggerDirection, hedge positionIdx mapping, amend-first slots, hydrated default normalization, owner-only deferred replans, duplicate orderLinkId preflight, identity mismatch/recovery states, and decimal formatting have direct tests.",
    "Trace the full identity chain: config scope -> product/environment/account -> symbol -> position mode -> managed side -> exchange position identity -> accountstate position state (native or locally derived) -> planner scope -> slot scope -> custom order ID -> durable context -> exchange request -> REST acceptance -> private order/execution/position event -> trusted active order -> subject trust state -> confirmation tracker -> recovery scope -> cleanup/protective/DCA replanning.",
    "Do not mark the implementation complete until three consecutive full identity-chain review passes produce no code, tests, fixtures, or documentation changes.",
    "Trace mismatched, stale, missing, contradictory, duplicated, late, recovered, and flat identities across every runtime boundary.",
    "Every accepted lifecycle claim needs an executable fixture; behaviors without fixtures must be listed as unsupported or unverified.",
    "Core [behavior-contract fixtures](https://siebly.io/reference/glossary#behavior-contract-fixture) cover context write failure before submit, early private confirmation before REST accept, one-way side flips, pending duplicate place/cancel guards, and decimal/default-equivalent active-order convergence.",
    "The [EXECUTION_MODE](https://siebly.io/reference/glossary#execution-mode)=DEMO, TESTNET, or LIVE submission paths are implemented for order-capable projects where supported, but they remain disabled until the required identity-chain, subject-trust, symbol-scope, and risk-geometry fixtures exist and pass.",
    "A dry-run golden trace shows startup hydration, private topic readiness, SL/TP before DCA, accountstate reads between action families, and final intentCount=0.",
    "EXECUTION_MODE is documented as the only execution-mode switch, with allowed values PUBLIC, READ_ONLY_PRIVATE, DRY_RUN_PRIVATE, DEMO, TESTNET, LIVE. Tests or fixtures prove PUBLIC and READ_ONLY_PRIVATE cannot build or submit exchange writes, DRY_RUN_PRIVATE builds the final request objects without calling exchange mutation endpoints, DEMO and TESTNET refuse unsupported exchange venues and can write only to the selected non-production venue, and LIVE is the only mode that can call production exchange mutation endpoints.",
    "The DEMO, TESTNET, and LIVE execution paths are implemented for the selected Bybit product where supported, but those modes remain disabled until explicit user configuration and reviewed code."
  ]
}
