{
  "format": "siebly-conformance-pack/v1",
  "id": "position-manager-core",
  "title": "Exchange State Management Conformance Pack",
  "lastReviewed": "2026-05-03",
  "canonicalArtifacts": {
    "criticalPathGuide": "https://siebly.io/ai/position-manager/critical-path",
    "manifest": "https://siebly.io/.well-known/agent-manifests/position-manager-core/latest.json",
    "runtimeKit": "https://siebly.io/.well-known/runtime-kits/position-manager-core/v1/index.json",
    "runtimeTypes": "https://siebly.io/.well-known/runtime-kits/position-manager-core/v1/types.ts",
    "integrationKit": "https://siebly.io/.well-known/integration-kits/position-manager-core/latest.json",
    "recipe": "https://siebly.io/.well-known/recipes/position-manager-critical-path.json",
    "schema": "https://siebly.io/.well-known/conformance/position-manager/v1/schema.json",
    "fixtures": "https://siebly.io/.well-known/conformance/position-manager/v1/fixtures.json",
    "runner": "https://siebly.io/.well-known/conformance/position-manager/v1/runner.ts"
  },
  "runnerContract": {
    "language": "typescript",
    "fixtureSource": "TypeScript fixture definitions with JSON projections for docs and cross-language use",
    "entrypoint": "https://siebly.io/.well-known/conformance/position-manager/v1/runner.ts",
    "exportedTypes": [
      "PositionManagerFixture",
      "PositionManagerFixtureStep",
      "PositionManagerFixtureExpectation",
      "PositionManagerHarness",
      "PositionManagerFixtureReport",
      "runPositionManagerFixtures"
    ],
    "requiredFixtureFields": [
      "name",
      "intent",
      "scope",
      "initial",
      "steps",
      "expect",
      "forbid"
    ]
  },
  "requiredChecks": [
    {
      "name": "startup_hydrated_position_queues_work_before_service_ready",
      "purpose": "REST-hydrated open positions queue work before service readiness.",
      "expected": "Hydration marks affected scopes dirty and a reconciliation pass runs before service_ready."
    },
    {
      "name": "private_event_marks_dirty_and_schedules_reconcile",
      "purpose": "Private event ingestion leads to scoped workflow scheduling.",
      "expected": "The event applies to accountstate, marks the precise or bounded scope dirty, and schedules reconciliation."
    },
    {
      "name": "private_event_burst_debounces_until_quiet_window",
      "purpose": "Accountstate ingestion is immediate while workflow execution waits for the burst to quiet.",
      "expected": "Multiple related events produce one reconcile after quietWindowMs, bounded by maxDelayMs."
    },
    {
      "name": "opaque_custom_id_registry_routes_exchange_echoes",
      "purpose": "Exchange-visible custom IDs are lookup keys into one order-context store.",
      "expected": "Private order echoes map to slot, scope, role, and pending action through the registry without parsing the ID string."
    },
    {
      "name": "pending_confirmation_does_not_unlock_dependent_phase",
      "purpose": "Accepted mutation responses are provisional and cannot unlock dependent phases.",
      "expected": "Dependent phases wait for trusted private stream state or scoped recovery hydration."
    },
    {
      "name": "private_confirmation_before_rest_accept_is_consumed",
      "purpose": "A private confirmation can arrive before the REST promise resolves.",
      "expected": "The early confirmation is retained and consumed when the REST accept path records pending state."
    },
    {
      "name": "terminal_event_during_cancel_or_amend_is_benign_race",
      "purpose": "Terminal private evidence can make later missing-target cancel/amend errors benign.",
      "expected": "The target is terminalized and no duplicate recovery loop starts when proof exists."
    },
    {
      "name": "reconnect_queues_known_scopes_for_recovery_even_when_quiet",
      "purpose": "Reconnect schedules recovery even without a later private event.",
      "expected": "Known active scopes enter scoped hydration and replan from trusted state before new exposure resumes."
    },
    {
      "name": "slot_filter_failures_are_blocked_not_silent_or_retried",
      "purpose": "Exchange filters and local sizing gates produce explicit blocks.",
      "expected": "Min quantity, min notional, zero-size, or missing-filter cases log a block reason and do not spin retries."
    },
    {
      "name": "flat_position_cleans_app_owned_orders",
      "purpose": "A flat position cleans remaining managed orders.",
      "expected": "Only app-owned orders in the affected scope are cancelled or terminalized; unowned orders are untouched."
    }
  ],
  "completeRequiredChecks": [
    "startup_hydrated_position_queues_work_before_service_ready",
    "private_event_marks_dirty_and_schedules_reconcile",
    "private_event_burst_debounces_until_quiet_window",
    "opaque_custom_id_registry_routes_exchange_echoes",
    "pending_confirmation_does_not_unlock_dependent_phase",
    "private_confirmation_before_rest_accept_is_consumed",
    "terminal_event_during_cancel_or_amend_is_benign_race",
    "reconnect_queues_known_scopes_for_recovery_even_when_quiet",
    "slot_filter_failures_are_blocked_not_silent_or_retried",
    "flat_position_cleans_app_owned_orders",
    "rest_acceptance_does_not_downgrade_trusted_private_order",
    "terminal_order_status_is_not_open_order_confirmation",
    "execution_fill_is_not_open_order_confirmation",
    "default_dca_active_order_does_not_advance_next_step",
    "startup_adopts_active_contexts_and_prunes_absent_contexts",
    "ambiguous_event_routes_bounded_fallback_then_exact_scope",
    "pending_confirmation_timeout_enters_scoped_recovery",
    "recovery_hydration_blocks_normal_phases_until_trust_restored",
    "configured_symbol_allowlist_blocks_out_of_scope_events",
    "dry_run_status_doctor_cannot_submit_live_orders"
  ],
  "exchangeOverlays": {
    "binance": "https://siebly.io/.well-known/conformance/binance-position-manager/latest.json",
    "bybit": "https://siebly.io/.well-known/conformance/bybit-position-manager/latest.json"
  }
}
