{
  "schema": "nodus.cache-order-result.v1",
  "synthetic": true,
  "units": "invented cost units; not seconds",
  "main_arms": [
    {
      "arm": "independent_cold",
      "order": [
        "A",
        "B"
      ],
      "reset_before_each": true,
      "prewarm": false,
      "cache_keys": {
        "A": "workload-1",
        "B": "workload-1"
      },
      "invocations": [
        {
          "invocation_id": "independent_cold:1:A",
          "arm": "independent_cold",
          "position": 1,
          "implementation": "A",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": false,
          "base_cost_units": 6,
          "miss_cost_units": 10,
          "invocation_cost_units": 16,
          "completed_model_invocation": true
        },
        {
          "invocation_id": "independent_cold:2:B",
          "arm": "independent_cold",
          "position": 2,
          "implementation": "B",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": false,
          "base_cost_units": 8,
          "miss_cost_units": 10,
          "invocation_cost_units": 18,
          "completed_model_invocation": true
        }
      ],
      "setup_ledger": [
        {
          "before_invocation": "independent_cold:1:A",
          "action": "reset",
          "cache_before": [],
          "cache_after": [],
          "cost_units": 0
        },
        {
          "before_invocation": "independent_cold:2:B",
          "action": "reset",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [],
          "cost_units": 0
        }
      ],
      "comparison_window": "invocation only; setup retained separately",
      "invocation_costs": {
        "A": 16,
        "B": 18
      },
      "B_over_A_exact": "9/8",
      "lower_invocation_cost": "A",
      "invocation_total_units": 34,
      "setup_total_units": 0,
      "full_model_total_units": 34,
      "final_cache": [
        "workload-1"
      ]
    },
    {
      "arm": "independent_warm",
      "order": [
        "A",
        "B"
      ],
      "reset_before_each": true,
      "prewarm": true,
      "cache_keys": {
        "A": "workload-1",
        "B": "workload-1"
      },
      "invocations": [
        {
          "invocation_id": "independent_warm:1:A",
          "arm": "independent_warm",
          "position": 1,
          "implementation": "A",
          "key": "workload-1",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": true,
          "base_cost_units": 6,
          "miss_cost_units": 0,
          "invocation_cost_units": 6,
          "completed_model_invocation": true
        },
        {
          "invocation_id": "independent_warm:2:B",
          "arm": "independent_warm",
          "position": 2,
          "implementation": "B",
          "key": "workload-1",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": true,
          "base_cost_units": 8,
          "miss_cost_units": 0,
          "invocation_cost_units": 8,
          "completed_model_invocation": true
        }
      ],
      "setup_ledger": [
        {
          "before_invocation": "independent_warm:1:A",
          "action": "reset",
          "cache_before": [],
          "cache_after": [],
          "cost_units": 0
        },
        {
          "before_invocation": "independent_warm:1:A",
          "action": "prewarm",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cost_units": 10
        },
        {
          "before_invocation": "independent_warm:2:B",
          "action": "reset",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [],
          "cost_units": 0
        },
        {
          "before_invocation": "independent_warm:2:B",
          "action": "prewarm",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cost_units": 10
        }
      ],
      "comparison_window": "invocation only; setup retained separately",
      "invocation_costs": {
        "A": 6,
        "B": 8
      },
      "B_over_A_exact": "4/3",
      "lower_invocation_cost": "A",
      "invocation_total_units": 14,
      "setup_total_units": 20,
      "full_model_total_units": 34,
      "final_cache": [
        "workload-1"
      ]
    },
    {
      "arm": "shared_ab",
      "order": [
        "A",
        "B"
      ],
      "reset_before_each": false,
      "prewarm": false,
      "cache_keys": {
        "A": "workload-1",
        "B": "workload-1"
      },
      "invocations": [
        {
          "invocation_id": "shared_ab:1:A",
          "arm": "shared_ab",
          "position": 1,
          "implementation": "A",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": false,
          "base_cost_units": 6,
          "miss_cost_units": 10,
          "invocation_cost_units": 16,
          "completed_model_invocation": true
        },
        {
          "invocation_id": "shared_ab:2:B",
          "arm": "shared_ab",
          "position": 2,
          "implementation": "B",
          "key": "workload-1",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": true,
          "base_cost_units": 8,
          "miss_cost_units": 0,
          "invocation_cost_units": 8,
          "completed_model_invocation": true
        }
      ],
      "setup_ledger": [
        {
          "before_invocation": "shared_ab:1:A",
          "action": "reset",
          "cache_before": [],
          "cache_after": [],
          "cost_units": 0
        }
      ],
      "comparison_window": "invocation only; setup retained separately",
      "invocation_costs": {
        "A": 16,
        "B": 8
      },
      "B_over_A_exact": "1/2",
      "lower_invocation_cost": "B",
      "invocation_total_units": 24,
      "setup_total_units": 0,
      "full_model_total_units": 24,
      "final_cache": [
        "workload-1"
      ]
    },
    {
      "arm": "shared_ba",
      "order": [
        "B",
        "A"
      ],
      "reset_before_each": false,
      "prewarm": false,
      "cache_keys": {
        "A": "workload-1",
        "B": "workload-1"
      },
      "invocations": [
        {
          "invocation_id": "shared_ba:1:B",
          "arm": "shared_ba",
          "position": 1,
          "implementation": "B",
          "key": "workload-1",
          "cache_before": [],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": false,
          "base_cost_units": 8,
          "miss_cost_units": 10,
          "invocation_cost_units": 18,
          "completed_model_invocation": true
        },
        {
          "invocation_id": "shared_ba:2:A",
          "arm": "shared_ba",
          "position": 2,
          "implementation": "A",
          "key": "workload-1",
          "cache_before": [
            "workload-1"
          ],
          "cache_after": [
            "workload-1"
          ],
          "cache_hit": true,
          "base_cost_units": 6,
          "miss_cost_units": 0,
          "invocation_cost_units": 6,
          "completed_model_invocation": true
        }
      ],
      "setup_ledger": [
        {
          "before_invocation": "shared_ba:1:B",
          "action": "reset",
          "cache_before": [],
          "cache_after": [],
          "cost_units": 0
        }
      ],
      "comparison_window": "invocation only; setup retained separately",
      "invocation_costs": {
        "B": 18,
        "A": 6
      },
      "B_over_A_exact": "3",
      "lower_invocation_cost": "A",
      "invocation_total_units": 24,
      "setup_total_units": 0,
      "full_model_total_units": 24,
      "final_cache": [
        "workload-1"
      ]
    }
  ],
  "balanced_mixture": {
    "source_invocation_ids": [
      "shared_ab:1:A",
      "shared_ab:2:B",
      "shared_ba:1:B",
      "shared_ba:2:A"
    ],
    "new_invocations": 0,
    "weights": "one of each shared order; one cold and one warm row per implementation",
    "mean_invocation_cost_units": {
      "A": "11",
      "B": "13"
    },
    "B_over_A_exact": "13/11",
    "setup_total_units": 0,
    "invocation_total_units": 48,
    "full_model_total_units": 48,
    "scope": "Authored equal-order mixture, not a universal cold or steady-state estimand."
  },
  "controls": {
    "authored_check_count": 10,
    "all_passed": true,
    "checks": [
      {
        "id": "complete_unique_main_population",
        "passed": true,
        "detail": "All four planned arms and eight distinct main invocations retained."
      },
      {
        "id": "declared_miss_hit_transitions",
        "passed": true,
        "detail": "Independent cold/cold, independent warm/warm, then shared miss/hit in both orders."
      },
      {
        "id": "full_model_cost_conservation",
        "passed": true,
        "detail": "Prewarm20 plus calls14 equals34; setup is neither hidden nor assigned to one implementation."
      },
      {
        "id": "balanced_reuses_main_records",
        "passed": true,
        "detail": "Exact comparison ratios and declared mixture; no averaged ratios or extra calls."
      },
      {
        "id": "zero_miss_penalty_removes_order_effect",
        "passed": true,
        "detail": {
          "conditional_arm_ids": [
            "zero_miss_penalty_removes_order_effect:1",
            "zero_miss_penalty_removes_order_effect:2"
          ],
          "expected_invocation_costs": {
            "A": 6,
            "B": 8
          }
        }
      },
      {
        "id": "different_keys_prevent_cross_warming",
        "passed": true,
        "detail": {
          "conditional_arm_ids": [
            "different_keys_prevent_cross_warming:1",
            "different_keys_prevent_cross_warming:2"
          ],
          "expected_invocation_costs": {
            "A": 16,
            "B": 18
          }
        }
      },
      {
        "id": "shared_prewarm_removes_order_effect_and_retains_setup",
        "passed": true,
        "detail": {
          "conditional_arm_ids": [
            "shared_prewarm_removes_order_effect_and_retains_setup:1",
            "shared_prewarm_removes_order_effect_and_retains_setup:2"
          ],
          "expected_invocation_costs": {
            "A": 6,
            "B": 8
          }
        }
      },
      {
        "id": "duplicate_implementation_order_refused",
        "passed": true,
        "detail": {
          "refusal_type": "ValueError",
          "message": "order must contain A and B exactly once"
        }
      },
      {
        "id": "negative_cost_refused",
        "passed": true,
        "detail": {
          "refusal_type": "ValueError",
          "message": "cost must be a nonnegative integer; base cost must be positive"
        }
      },
      {
        "id": "boolean_cost_refused",
        "passed": true,
        "detail": {
          "refusal_type": "ValueError",
          "message": "cost must be a nonnegative integer; base cost must be positive"
        }
      }
    ],
    "conditional_arms": [
      {
        "arm": "zero_miss_penalty_removes_order_effect:1",
        "order": [
          "A",
          "B"
        ],
        "reset_before_each": false,
        "prewarm": false,
        "cache_keys": {
          "A": "workload-1",
          "B": "workload-1"
        },
        "invocations": [
          {
            "invocation_id": "zero_miss_penalty_removes_order_effect:1:1:A",
            "arm": "zero_miss_penalty_removes_order_effect:1",
            "position": 1,
            "implementation": "A",
            "key": "workload-1",
            "cache_before": [],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": false,
            "base_cost_units": 6,
            "miss_cost_units": 0,
            "invocation_cost_units": 6,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "zero_miss_penalty_removes_order_effect:1:2:B",
            "arm": "zero_miss_penalty_removes_order_effect:1",
            "position": 2,
            "implementation": "B",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 8,
            "miss_cost_units": 0,
            "invocation_cost_units": 8,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "zero_miss_penalty_removes_order_effect:1:1:A",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "A": 6,
          "B": 8
        },
        "B_over_A_exact": "4/3",
        "lower_invocation_cost": "A",
        "invocation_total_units": 14,
        "setup_total_units": 0,
        "full_model_total_units": 14,
        "final_cache": [
          "workload-1"
        ]
      },
      {
        "arm": "zero_miss_penalty_removes_order_effect:2",
        "order": [
          "B",
          "A"
        ],
        "reset_before_each": false,
        "prewarm": false,
        "cache_keys": {
          "A": "workload-1",
          "B": "workload-1"
        },
        "invocations": [
          {
            "invocation_id": "zero_miss_penalty_removes_order_effect:2:1:B",
            "arm": "zero_miss_penalty_removes_order_effect:2",
            "position": 1,
            "implementation": "B",
            "key": "workload-1",
            "cache_before": [],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": false,
            "base_cost_units": 8,
            "miss_cost_units": 0,
            "invocation_cost_units": 8,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "zero_miss_penalty_removes_order_effect:2:2:A",
            "arm": "zero_miss_penalty_removes_order_effect:2",
            "position": 2,
            "implementation": "A",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 6,
            "miss_cost_units": 0,
            "invocation_cost_units": 6,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "zero_miss_penalty_removes_order_effect:2:1:B",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "B": 8,
          "A": 6
        },
        "B_over_A_exact": "4/3",
        "lower_invocation_cost": "A",
        "invocation_total_units": 14,
        "setup_total_units": 0,
        "full_model_total_units": 14,
        "final_cache": [
          "workload-1"
        ]
      },
      {
        "arm": "different_keys_prevent_cross_warming:1",
        "order": [
          "A",
          "B"
        ],
        "reset_before_each": false,
        "prewarm": false,
        "cache_keys": {
          "A": "private-A",
          "B": "private-B"
        },
        "invocations": [
          {
            "invocation_id": "different_keys_prevent_cross_warming:1:1:A",
            "arm": "different_keys_prevent_cross_warming:1",
            "position": 1,
            "implementation": "A",
            "key": "private-A",
            "cache_before": [],
            "cache_after": [
              "private-A"
            ],
            "cache_hit": false,
            "base_cost_units": 6,
            "miss_cost_units": 10,
            "invocation_cost_units": 16,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "different_keys_prevent_cross_warming:1:2:B",
            "arm": "different_keys_prevent_cross_warming:1",
            "position": 2,
            "implementation": "B",
            "key": "private-B",
            "cache_before": [
              "private-A"
            ],
            "cache_after": [
              "private-A",
              "private-B"
            ],
            "cache_hit": false,
            "base_cost_units": 8,
            "miss_cost_units": 10,
            "invocation_cost_units": 18,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "different_keys_prevent_cross_warming:1:1:A",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "A": 16,
          "B": 18
        },
        "B_over_A_exact": "9/8",
        "lower_invocation_cost": "A",
        "invocation_total_units": 34,
        "setup_total_units": 0,
        "full_model_total_units": 34,
        "final_cache": [
          "private-A",
          "private-B"
        ]
      },
      {
        "arm": "different_keys_prevent_cross_warming:2",
        "order": [
          "B",
          "A"
        ],
        "reset_before_each": false,
        "prewarm": false,
        "cache_keys": {
          "A": "private-A",
          "B": "private-B"
        },
        "invocations": [
          {
            "invocation_id": "different_keys_prevent_cross_warming:2:1:B",
            "arm": "different_keys_prevent_cross_warming:2",
            "position": 1,
            "implementation": "B",
            "key": "private-B",
            "cache_before": [],
            "cache_after": [
              "private-B"
            ],
            "cache_hit": false,
            "base_cost_units": 8,
            "miss_cost_units": 10,
            "invocation_cost_units": 18,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "different_keys_prevent_cross_warming:2:2:A",
            "arm": "different_keys_prevent_cross_warming:2",
            "position": 2,
            "implementation": "A",
            "key": "private-A",
            "cache_before": [
              "private-B"
            ],
            "cache_after": [
              "private-A",
              "private-B"
            ],
            "cache_hit": false,
            "base_cost_units": 6,
            "miss_cost_units": 10,
            "invocation_cost_units": 16,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "different_keys_prevent_cross_warming:2:1:B",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "B": 18,
          "A": 16
        },
        "B_over_A_exact": "9/8",
        "lower_invocation_cost": "A",
        "invocation_total_units": 34,
        "setup_total_units": 0,
        "full_model_total_units": 34,
        "final_cache": [
          "private-A",
          "private-B"
        ]
      },
      {
        "arm": "shared_prewarm_removes_order_effect_and_retains_setup:1",
        "order": [
          "A",
          "B"
        ],
        "reset_before_each": false,
        "prewarm": true,
        "cache_keys": {
          "A": "workload-1",
          "B": "workload-1"
        },
        "invocations": [
          {
            "invocation_id": "shared_prewarm_removes_order_effect_and_retains_setup:1:1:A",
            "arm": "shared_prewarm_removes_order_effect_and_retains_setup:1",
            "position": 1,
            "implementation": "A",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 6,
            "miss_cost_units": 0,
            "invocation_cost_units": 6,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "shared_prewarm_removes_order_effect_and_retains_setup:1:2:B",
            "arm": "shared_prewarm_removes_order_effect_and_retains_setup:1",
            "position": 2,
            "implementation": "B",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 8,
            "miss_cost_units": 0,
            "invocation_cost_units": 8,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "shared_prewarm_removes_order_effect_and_retains_setup:1:1:A",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          },
          {
            "before_invocation": "shared_prewarm_removes_order_effect_and_retains_setup:1:1:A",
            "action": "prewarm",
            "key": "workload-1",
            "cache_before": [],
            "cache_after": [
              "workload-1"
            ],
            "cost_units": 10
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "A": 6,
          "B": 8
        },
        "B_over_A_exact": "4/3",
        "lower_invocation_cost": "A",
        "invocation_total_units": 14,
        "setup_total_units": 10,
        "full_model_total_units": 24,
        "final_cache": [
          "workload-1"
        ]
      },
      {
        "arm": "shared_prewarm_removes_order_effect_and_retains_setup:2",
        "order": [
          "B",
          "A"
        ],
        "reset_before_each": false,
        "prewarm": true,
        "cache_keys": {
          "A": "workload-1",
          "B": "workload-1"
        },
        "invocations": [
          {
            "invocation_id": "shared_prewarm_removes_order_effect_and_retains_setup:2:1:B",
            "arm": "shared_prewarm_removes_order_effect_and_retains_setup:2",
            "position": 1,
            "implementation": "B",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 8,
            "miss_cost_units": 0,
            "invocation_cost_units": 8,
            "completed_model_invocation": true
          },
          {
            "invocation_id": "shared_prewarm_removes_order_effect_and_retains_setup:2:2:A",
            "arm": "shared_prewarm_removes_order_effect_and_retains_setup:2",
            "position": 2,
            "implementation": "A",
            "key": "workload-1",
            "cache_before": [
              "workload-1"
            ],
            "cache_after": [
              "workload-1"
            ],
            "cache_hit": true,
            "base_cost_units": 6,
            "miss_cost_units": 0,
            "invocation_cost_units": 6,
            "completed_model_invocation": true
          }
        ],
        "setup_ledger": [
          {
            "before_invocation": "shared_prewarm_removes_order_effect_and_retains_setup:2:1:B",
            "action": "reset",
            "cache_before": [],
            "cache_after": [],
            "cost_units": 0
          },
          {
            "before_invocation": "shared_prewarm_removes_order_effect_and_retains_setup:2:1:B",
            "action": "prewarm",
            "key": "workload-1",
            "cache_before": [],
            "cache_after": [
              "workload-1"
            ],
            "cost_units": 10
          }
        ],
        "comparison_window": "invocation only; setup retained separately",
        "invocation_costs": {
          "B": 8,
          "A": 6
        },
        "B_over_A_exact": "4/3",
        "lower_invocation_cost": "A",
        "invocation_total_units": 14,
        "setup_total_units": 10,
        "full_model_total_units": 24,
        "final_cache": [
          "workload-1"
        ]
      }
    ],
    "separate_conditional_invocations": 12,
    "scope": "Designed controls, not a statistical sample or exhaustive input validation."
  },
  "counts": {
    "planned_main_arms": 4,
    "retained_main_arms": 4,
    "planned_main_invocations": 8,
    "retained_main_invocations": 8,
    "excluded_main_invocations": 0
  },
  "inputs": {
    "fixture_sha256": "fa544ba6c395f1f2bfccfeed9e127da4a6c4386730f385b1c683927d97376dfd",
    "protocol_sha256": "2a134a1b67b94a78be3ea38d57776a79f8eaa9310af3fc00e6b9a494f1fbf047",
    "source_sha256": "5c4badae422850687f754e38c0ab93bbe221300048a9f4b4cdd90c954d519893"
  },
  "reproduction_environment": {
    "implementation": "CPython",
    "python": "3.9.6"
  },
  "limits": [
    "No hardware/framework timing, real cache observations, stochastic replicates, score reward or training result.",
    "Input key, cache lifetime and cost assumptions are authored; no real benchmark defect or universal remedy implied.",
    "Setup is separate from invocation comparison, with complete full-model totals retained."
  ]
}
