{
  "schema_version": "2.1",
  "measured_at": "2026-11-07T14:11:51.051971+00:00",
  "kind": "local_synthetic_benchmark",
  "environment": {
    "cpu": "Apple M2",
    "ram_bytes": 17179869184,
    "os": "Darwin",
    "architecture": "arm64",
    "php": "8.5.12",
    "postgresql": "postgres (PostgreSQL) 18.6 (Homebrew)",
    "php_memory_limit": "1536M",
    "http_max_execution_seconds": 180,
    "sql_instrumentation": "pg_stat_statements, track=all"
  },
  "full_exchange_profiles": [
    {
      "plan_id": "01a1b658-a384-7a0b-b02b-8925e740b711",
      "workspace_id": "4b63ebbe61342cbc416a268bade79871f3a8b6bc597d7471124f6271913c40a9",
      "profile": "pilot",
      "orders": 100,
      "resources": 20,
      "operations_per_route": 10,
      "operations": 1000,
      "export_bytes": 238391,
      "data": "synthetic",
      "sql_stage_deltas": {
        "snapshot_export_delivery": {
          "erp_acceptance": {
            "calls": 343,
            "execution_ms": 3.657533999999984
          },
          "aps_acceptance": {
            "calls": 2674,
            "execution_ms": 13.03638399999997
          }
        },
        "workspace_read": {
          "erp_acceptance": {
            "calls": 8,
            "execution_ms": 0.056290999999987434
          },
          "aps_acceptance": {
            "calls": 8,
            "execution_ms": 1.3858740000000012
          }
        },
        "calculation_with_db": {
          "erp_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          },
          "aps_acceptance": {
            "calls": 5038,
            "execution_ms": 34.57465299999993
          }
        },
        "approval_stream_download_staging": {
          "erp_acceptance": {
            "calls": 86,
            "execution_ms": 18.34879099999995
          },
          "aps_acceptance": {
            "calls": 44,
            "execution_ms": 4.050585999999981
          }
        },
        "dispatcher_login": {
          "erp_acceptance": {
            "calls": 27,
            "execution_ms": 0.8040399999999863
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "erp_preview_apply": {
          "erp_acceptance": {
            "calls": 614,
            "execution_ms": 14.517781000000099
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "receipt_delivery": {
          "erp_acceptance": {
            "calls": 34,
            "execution_ms": 1.0216609999999946
          },
          "aps_acceptance": {
            "calls": 13,
            "execution_ms": 0.3875410000000272
          }
        }
      },
      "transport_protocol": "aps-plan-compact/2",
      "export_and_delivery_seconds": 0.9433216250000003,
      "aps_calculation_with_db_seconds": 0.4148226250000002,
      "approval_and_download_seconds": 1.1408113329999994,
      "erp_preview_and_apply_seconds": 0.1879095409999998,
      "receipt_delivery_seconds": 0.41939579199999955,
      "scope": "Real PostgreSQL, HTTP, durable workers and automated dispatcher forms; excludes human review time",
      "sum_measured_stage_seconds": 3.106260915999999,
      "samples": 1,
      "full_erp_exchange_verified": true,
      "independent_equivalence_verification": {
        "aps": {
          "copy_round_trip_lossless": true,
          "copy_constraints_and_rollback_preserved": true,
          "receipt_matches_legacy_hash": true,
          "plan_id": "01a1b658-a384-7a0b-b02b-8925e740b711",
          "legacy_payload_hash": "d0191b126e5e861431ec519bd76405e8cac9d94bc83c6cf7559cdaa99757359c",
          "compact_payload_hash": "d0191b126e5e861431ec519bd76405e8cac9d94bc83c6cf7559cdaa99757359c",
          "assignments": 1000,
          "demands": 100,
          "segments": 1000,
          "all_legacy_fields_preserved": true
        },
        "erp": {
          "orders_checked": 100,
          "operations_checked": 1000,
          "segments_checked": 1000,
          "explanation_records_preserved": 3556,
          "legacy_payload_hash": "d0191b126e5e861431ec519bd76405e8cac9d94bc83c6cf7559cdaa99757359c",
          "full_staging_equals_aps_legacy_export": true,
          "all_applied_business_fields_match": true,
          "explanations_retained_in_full_staging": true,
          "outside_timed_stages": true
        }
      }
    },
    {
      "plan_id": "01a1b658-d2a0-739e-96cc-a3248c3b595e",
      "workspace_id": "4b63ebbe61342cbc416a268bade79871f3a8b6bc597d7471124f6271913c40a9",
      "profile": "medium",
      "orders": 1000,
      "resources": 100,
      "operations_per_route": 15,
      "operations": 15000,
      "export_bytes": 3019399,
      "data": "synthetic",
      "sql_stage_deltas": {
        "snapshot_export_delivery": {
          "erp_acceptance": {
            "calls": 2413,
            "execution_ms": 12.497307000000063
          },
          "aps_acceptance": {
            "calls": 15824,
            "execution_ms": 73.65846100000033
          }
        },
        "workspace_read": {
          "erp_acceptance": {
            "calls": 8,
            "execution_ms": 0.0669979999999839
          },
          "aps_acceptance": {
            "calls": 8,
            "execution_ms": 6.460539999999995
          }
        },
        "calculation_with_db": {
          "erp_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          },
          "aps_acceptance": {
            "calls": 75062,
            "execution_ms": 515.6857509999872
          }
        },
        "approval_stream_download_staging": {
          "erp_acceptance": {
            "calls": 114,
            "execution_ms": 172.83386100000007
          },
          "aps_acceptance": {
            "calls": 57,
            "execution_ms": 44.54337799999985
          }
        },
        "dispatcher_login": {
          "erp_acceptance": {
            "calls": 27,
            "execution_ms": 2.256084000000101
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "erp_preview_apply": {
          "erp_acceptance": {
            "calls": 4730,
            "execution_ms": 193.307092
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "receipt_delivery": {
          "erp_acceptance": {
            "calls": 34,
            "execution_ms": 2.5359979999999496
          },
          "aps_acceptance": {
            "calls": 13,
            "execution_ms": 1.5734199999999419
          }
        }
      },
      "transport_protocol": "aps-plan-compact/2",
      "export_and_delivery_seconds": 1.753031375,
      "aps_calculation_with_db_seconds": 2.122486167000001,
      "approval_and_download_seconds": 2.014704291000001,
      "erp_preview_and_apply_seconds": 1.366243291,
      "receipt_delivery_seconds": 0.4364863330000013,
      "scope": "Real PostgreSQL, HTTP, durable workers and automated dispatcher forms; excludes human review time",
      "sum_measured_stage_seconds": 7.692951457000003,
      "samples": 1,
      "full_erp_exchange_verified": true,
      "independent_equivalence_verification": {
        "aps": {
          "copy_round_trip_lossless": true,
          "copy_constraints_and_rollback_preserved": true,
          "receipt_matches_legacy_hash": true,
          "plan_id": "01a1b658-d2a0-739e-96cc-a3248c3b595e",
          "legacy_payload_hash": "a710c5c7da021d543a5bdfa01892e23851ac4d4f9fb96e6d858eaf52c943a92c",
          "compact_payload_hash": "a710c5c7da021d543a5bdfa01892e23851ac4d4f9fb96e6d858eaf52c943a92c",
          "assignments": 15000,
          "demands": 1000,
          "segments": 15000,
          "all_legacy_fields_preserved": true
        },
        "erp": {
          "orders_checked": 1000,
          "operations_checked": 15000,
          "segments_checked": 15000,
          "explanation_records_preserved": 51329,
          "legacy_payload_hash": "a710c5c7da021d543a5bdfa01892e23851ac4d4f9fb96e6d858eaf52c943a92c",
          "full_staging_equals_aps_legacy_export": true,
          "all_applied_business_fields_match": true,
          "explanations_retained_in_full_staging": true,
          "outside_timed_stages": true
        }
      }
    },
    {
      "plan_id": "01a1b659-3db5-7310-ba13-496d8ff4091e",
      "workspace_id": "4b63ebbe61342cbc416a268bade79871f3a8b6bc597d7471124f6271913c40a9",
      "profile": "large",
      "orders": 5000,
      "resources": 500,
      "operations_per_route": 20,
      "operations": 100000,
      "export_bytes": 20720501,
      "data": "synthetic",
      "sql_stage_deltas": {
        "snapshot_export_delivery": {
          "erp_acceptance": {
            "calls": 11675,
            "execution_ms": 53.31859600000024
          },
          "aps_acceptance": {
            "calls": 78718,
            "execution_ms": 374.5281059999985
          }
        },
        "workspace_read": {
          "erp_acceptance": {
            "calls": 8,
            "execution_ms": 0.05829100000005383
          },
          "aps_acceptance": {
            "calls": 8,
            "execution_ms": 37.97175199999998
          }
        },
        "calculation_with_db": {
          "erp_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          },
          "aps_acceptance": {
            "calls": 500151,
            "execution_ms": 3655.1555500006384
          }
        },
        "approval_stream_download_staging": {
          "erp_acceptance": {
            "calls": 308,
            "execution_ms": 1722.0694650000014
          },
          "aps_acceptance": {
            "calls": 82,
            "execution_ms": 287.8073779999995
          }
        },
        "dispatcher_login": {
          "erp_acceptance": {
            "calls": 27,
            "execution_ms": 12.598793000001024
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "erp_preview_apply": {
          "erp_acceptance": {
            "calls": 23191,
            "execution_ms": 2046.761428999996
          },
          "aps_acceptance": {
            "calls": 0,
            "execution_ms": 0.0
          }
        },
        "receipt_delivery": {
          "erp_acceptance": {
            "calls": 34,
            "execution_ms": 10.00554800000009
          },
          "aps_acceptance": {
            "calls": 13,
            "execution_ms": 8.776918999998998
          }
        }
      },
      "transport_protocol": "aps-plan-compact/2",
      "export_and_delivery_seconds": 5.818052375,
      "aps_calculation_with_db_seconds": 12.281962916000001,
      "approval_and_download_seconds": 8.313019874999998,
      "erp_preview_and_apply_seconds": 8.566287583999994,
      "receipt_delivery_seconds": 0.5878931250000008,
      "scope": "Real PostgreSQL, HTTP, durable workers and automated dispatcher forms; excludes human review time",
      "sum_measured_stage_seconds": 35.567215874999995,
      "samples": 1,
      "full_erp_exchange_verified": true,
      "independent_equivalence_verification": {
        "aps": {
          "copy_round_trip_lossless": true,
          "copy_constraints_and_rollback_preserved": true,
          "receipt_matches_legacy_hash": true,
          "plan_id": "01a1b659-3db5-7310-ba13-496d8ff4091e",
          "legacy_payload_hash": "d1026c25563fd46d9cadb8589be4d585e397f2602fda12c49713664f4841d9ce",
          "compact_payload_hash": "d1026c25563fd46d9cadb8589be4d585e397f2602fda12c49713664f4841d9ce",
          "assignments": 100000,
          "demands": 5000,
          "segments": 100000,
          "all_legacy_fields_preserved": true
        },
        "erp": {
          "orders_checked": 5000,
          "operations_checked": 100000,
          "segments_checked": 100000,
          "explanation_records_preserved": 378142,
          "legacy_payload_hash": "d1026c25563fd46d9cadb8589be4d585e397f2602fda12c49713664f4841d9ce",
          "full_staging_equals_aps_legacy_export": true,
          "all_applied_business_fields_match": true,
          "explanations_retained_in_full_staging": true,
          "outside_timed_stages": true
        }
      }
    }
  ],
  "large_comparison_against_jsonl_v1": {
    "export_and_delivery_seconds": {
      "before": 8.455196416,
      "after": 5.818052375,
      "reduction_percent": 31.189624832483613
    },
    "aps_calculation_with_db_seconds": {
      "before": 15.082501334000003,
      "after": 12.281962916000001,
      "reduction_percent": 18.56812975502172
    },
    "approval_and_download_seconds": {
      "before": 43.409243375,
      "after": 8.313019874999998,
      "reduction_percent": 80.84965498434008
    },
    "erp_preview_and_apply_seconds": {
      "before": 31.5072605,
      "after": 8.566287583999994,
      "reduction_percent": 72.81170292796483
    },
    "receipt_delivery_seconds": {
      "before": 7.085329540999993,
      "after": 0.5878931250000008,
      "reduction_percent": 91.70267068598439
    },
    "sum_measured_stage_seconds": {
      "before": 105.539531166,
      "after": 35.567215874999995,
      "reduction_percent": 66.29962680139504
    },
    "export_bytes": {
      "before": 198960744,
      "after": 20720501,
      "reduction_percent": 89.58563353582956
    }
  },
  "target_seconds": [
    15,
    20
  ],
  "target_achieved": false,
  "scheduler_implementation_unchanged": true,
  "verification": {
    "erp_unit_tests": 74,
    "aps_unit_tests": 105,
    "phpstan": "Both projects pass",
    "functional_checks": 72,
    "production_checks": 112,
    "independent_full_field_equivalence": true
  },
  "required_caption": "Локальный синтетический тест Apple M2 / 16 ГиБ, PHP 8.5.12, PostgreSQL 18.6. По одному финальному прогону на 1000 / 15000 / 100000 операций. Сумма измеренных этапов исключает человеческое согласование и ожидание опроса. Полная независимая сверка данных выполнена отдельно от таймера. Не SLA.",
  "limitations": [
    "15–20 секунд пока не достигнуты; сохранены простые оптимизации без новой инфраструктуры и без изменения алгоритма расписания.",
    "Рабочие расписания ERP содержат проекцию производственных данных; полные объяснения не дублируются в ней и сохранены в полном staging-результате, проверенном по прежнему legacy-хешу.",
    "В большом профиле новые 5000 заказов ещё не запущены, 100000 существующих заданий здесь не испытывались. НЗП и запуск проверены отдельным малым функциональным сценарием.",
    "Не измерены реальные данные предприятия, параллельные большие расчёты, VPS/Linux/FrankenPHP.",
    "COPY сохраняет ограничения и транзакции. В статистике pg_stat_statements track=all присутствуют вложенные проверки внешних ключей.",
    "Результат расчёта ядра по-прежнему находится в памяти; артефакты на диске требуют политики хранения."
  ],
  "provenance": {
    "baseline": "aps-landing-metrics-before-compact.json",
    "reports": "compact/",
    "sources_manifest": "compact/sources.json"
  }
}
