{
  "schema": "nodus.output-lifetime-result.v1",
  "evidence_kind": "Original finite standard-library CPU demonstration",
  "runtime": {
    "implementation": "CPython",
    "python": "3.9.6"
  },
  "bindings": {
    "source_sha256": "4a18eac1bb48e536dcdb54bcd1447ca41e2e0c1e673d7e119ce722e7ad2bab98",
    "fixture_sha256": "f832458175e5d48b7576b39cf9a1028c5dce0cf508e70ca2e9be9857822c1d60",
    "protocol_sha256": "619d15b76bc972513fccc9627761ac5aceb2513997fd46317eab71716bd81f1b"
  },
  "contract": "For this example only: each call returns a newly owned flat integer list containing twice the immutable input values. Earlier returned lists must retain their values through later candidate calls unless the caller itself writes to them. A reusable-buffer API with an explicitly shorter lifetime is a different legitimate contract. The harness never writes to a returned list.",
  "cases": [
    {
      "id": "a",
      "input": [
        1,
        2
      ],
      "expected": [
        2,
        4
      ]
    },
    {
      "id": "b",
      "input": [
        4,
        -1
      ],
      "expected": [
        8,
        -2
      ]
    },
    {
      "id": "c",
      "input": [
        0,
        3
      ],
      "expected": [
        0,
        6
      ]
    }
  ],
  "runs": [
    {
      "candidate": "fresh_correct",
      "call_count": 3,
      "calls": [
        {
          "call_id": "a",
          "input": [
            1,
            2
          ],
          "expected": [
            2,
            4
          ],
          "input_unchanged": true,
          "immediate_values": [
            2,
            4
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [],
          "object_group": "object-1",
          "prior_retained_before_call": [],
          "all_retained_after_call": [
            [
              2,
              4
            ]
          ],
          "prior_outputs_changed_this_call": []
        },
        {
          "call_id": "b",
          "input": [
            4,
            -1
          ],
          "expected": [
            8,
            -2
          ],
          "input_unchanged": true,
          "immediate_values": [
            8,
            -2
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [
            false
          ],
          "object_group": "object-2",
          "prior_retained_before_call": [
            [
              2,
              4
            ]
          ],
          "all_retained_after_call": [
            [
              2,
              4
            ],
            [
              8,
              -2
            ]
          ],
          "prior_outputs_changed_this_call": [
            false
          ]
        },
        {
          "call_id": "c",
          "input": [
            0,
            3
          ],
          "expected": [
            0,
            6
          ],
          "input_unchanged": true,
          "immediate_values": [
            0,
            6
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [
            false,
            false
          ],
          "object_group": "object-3",
          "prior_retained_before_call": [
            [
              2,
              4
            ],
            [
              8,
              -2
            ]
          ],
          "all_retained_after_call": [
            [
              2,
              4
            ],
            [
              8,
              -2
            ],
            [
              0,
              6
            ]
          ],
          "prior_outputs_changed_this_call": [
            false,
            false
          ]
        }
      ],
      "end_observations": [
        {
          "call_id": "a",
          "expected": [
            2,
            4
          ],
          "values_at_end": [
            2,
            4
          ],
          "values_at_end_equal_expected": true,
          "later_calls_observed": 2,
          "unchanged_through_observed_later_calls": true,
          "adapter_saved_snapshot": [
            2,
            4
          ],
          "adapter_snapshot_equal_expected": true
        },
        {
          "call_id": "b",
          "expected": [
            8,
            -2
          ],
          "values_at_end": [
            8,
            -2
          ],
          "values_at_end_equal_expected": true,
          "later_calls_observed": 1,
          "unchanged_through_observed_later_calls": true,
          "adapter_saved_snapshot": [
            8,
            -2
          ],
          "adapter_snapshot_equal_expected": true
        },
        {
          "call_id": "c",
          "expected": [
            0,
            6
          ],
          "values_at_end": [
            0,
            6
          ],
          "values_at_end_equal_expected": true,
          "later_calls_observed": 0,
          "unchanged_through_observed_later_calls": null,
          "adapter_saved_snapshot": [
            0,
            6
          ],
          "adapter_snapshot_equal_expected": true
        }
      ],
      "return_identity_matrix": [
        [
          true,
          false,
          false
        ],
        [
          false,
          true,
          false
        ],
        [
          false,
          false,
          true
        ]
      ],
      "summary": {
        "immediate_correct": 3,
        "end_values_correct": 3,
        "prior_outputs_exposed_to_later_calls": 2,
        "exposed_outputs_unchanged": 2,
        "adapter_snapshots_correct": 3
      },
      "adapter_scope": "The adapter copies the already returned flat integer values immediately. It changes the retention pipeline, makes no extra candidate call, and does not repair the candidate stable-output contract."
    },
    {
      "candidate": "reused_buffer",
      "call_count": 3,
      "calls": [
        {
          "call_id": "a",
          "input": [
            1,
            2
          ],
          "expected": [
            2,
            4
          ],
          "input_unchanged": true,
          "immediate_values": [
            2,
            4
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [],
          "object_group": "object-1",
          "prior_retained_before_call": [],
          "all_retained_after_call": [
            [
              2,
              4
            ]
          ],
          "prior_outputs_changed_this_call": []
        },
        {
          "call_id": "b",
          "input": [
            4,
            -1
          ],
          "expected": [
            8,
            -2
          ],
          "input_unchanged": true,
          "immediate_values": [
            8,
            -2
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [
            true
          ],
          "object_group": "object-1",
          "prior_retained_before_call": [
            [
              2,
              4
            ]
          ],
          "all_retained_after_call": [
            [
              8,
              -2
            ],
            [
              8,
              -2
            ]
          ],
          "prior_outputs_changed_this_call": [
            true
          ]
        },
        {
          "call_id": "c",
          "input": [
            0,
            3
          ],
          "expected": [
            0,
            6
          ],
          "input_unchanged": true,
          "immediate_values": [
            0,
            6
          ],
          "immediate_equal_expected": true,
          "same_object_as_prior_returns": [
            true,
            true
          ],
          "object_group": "object-1",
          "prior_retained_before_call": [
            [
              8,
              -2
            ],
            [
              8,
              -2
            ]
          ],
          "all_retained_after_call": [
            [
              0,
              6
            ],
            [
              0,
              6
            ],
            [
              0,
              6
            ]
          ],
          "prior_outputs_changed_this_call": [
            true,
            true
          ]
        }
      ],
      "end_observations": [
        {
          "call_id": "a",
          "expected": [
            2,
            4
          ],
          "values_at_end": [
            0,
            6
          ],
          "values_at_end_equal_expected": false,
          "later_calls_observed": 2,
          "unchanged_through_observed_later_calls": false,
          "adapter_saved_snapshot": [
            2,
            4
          ],
          "adapter_snapshot_equal_expected": true
        },
        {
          "call_id": "b",
          "expected": [
            8,
            -2
          ],
          "values_at_end": [
            0,
            6
          ],
          "values_at_end_equal_expected": false,
          "later_calls_observed": 1,
          "unchanged_through_observed_later_calls": false,
          "adapter_saved_snapshot": [
            8,
            -2
          ],
          "adapter_snapshot_equal_expected": true
        },
        {
          "call_id": "c",
          "expected": [
            0,
            6
          ],
          "values_at_end": [
            0,
            6
          ],
          "values_at_end_equal_expected": true,
          "later_calls_observed": 0,
          "unchanged_through_observed_later_calls": null,
          "adapter_saved_snapshot": [
            0,
            6
          ],
          "adapter_snapshot_equal_expected": true
        }
      ],
      "return_identity_matrix": [
        [
          true,
          true,
          true
        ],
        [
          true,
          true,
          true
        ],
        [
          true,
          true,
          true
        ]
      ],
      "summary": {
        "immediate_correct": 3,
        "end_values_correct": 1,
        "prior_outputs_exposed_to_later_calls": 2,
        "exposed_outputs_unchanged": 0,
        "adapter_snapshots_correct": 3
      },
      "adapter_scope": "The adapter copies the already returned flat integer values immediately. It changes the retention pipeline, makes no extra candidate call, and does not repair the candidate stable-output contract."
    },
    {
      "candidate": "fresh_wrong",
      "call_count": 3,
      "calls": [
        {
          "call_id": "a",
          "input": [
            1,
            2
          ],
          "expected": [
            2,
            4
          ],
          "input_unchanged": true,
          "immediate_values": [
            3,
            5
          ],
          "immediate_equal_expected": false,
          "same_object_as_prior_returns": [],
          "object_group": "object-1",
          "prior_retained_before_call": [],
          "all_retained_after_call": [
            [
              3,
              5
            ]
          ],
          "prior_outputs_changed_this_call": []
        },
        {
          "call_id": "b",
          "input": [
            4,
            -1
          ],
          "expected": [
            8,
            -2
          ],
          "input_unchanged": true,
          "immediate_values": [
            9,
            -1
          ],
          "immediate_equal_expected": false,
          "same_object_as_prior_returns": [
            false
          ],
          "object_group": "object-2",
          "prior_retained_before_call": [
            [
              3,
              5
            ]
          ],
          "all_retained_after_call": [
            [
              3,
              5
            ],
            [
              9,
              -1
            ]
          ],
          "prior_outputs_changed_this_call": [
            false
          ]
        },
        {
          "call_id": "c",
          "input": [
            0,
            3
          ],
          "expected": [
            0,
            6
          ],
          "input_unchanged": true,
          "immediate_values": [
            1,
            7
          ],
          "immediate_equal_expected": false,
          "same_object_as_prior_returns": [
            false,
            false
          ],
          "object_group": "object-3",
          "prior_retained_before_call": [
            [
              3,
              5
            ],
            [
              9,
              -1
            ]
          ],
          "all_retained_after_call": [
            [
              3,
              5
            ],
            [
              9,
              -1
            ],
            [
              1,
              7
            ]
          ],
          "prior_outputs_changed_this_call": [
            false,
            false
          ]
        }
      ],
      "end_observations": [
        {
          "call_id": "a",
          "expected": [
            2,
            4
          ],
          "values_at_end": [
            3,
            5
          ],
          "values_at_end_equal_expected": false,
          "later_calls_observed": 2,
          "unchanged_through_observed_later_calls": true,
          "adapter_saved_snapshot": [
            3,
            5
          ],
          "adapter_snapshot_equal_expected": false
        },
        {
          "call_id": "b",
          "expected": [
            8,
            -2
          ],
          "values_at_end": [
            9,
            -1
          ],
          "values_at_end_equal_expected": false,
          "later_calls_observed": 1,
          "unchanged_through_observed_later_calls": true,
          "adapter_saved_snapshot": [
            9,
            -1
          ],
          "adapter_snapshot_equal_expected": false
        },
        {
          "call_id": "c",
          "expected": [
            0,
            6
          ],
          "values_at_end": [
            1,
            7
          ],
          "values_at_end_equal_expected": false,
          "later_calls_observed": 0,
          "unchanged_through_observed_later_calls": null,
          "adapter_saved_snapshot": [
            1,
            7
          ],
          "adapter_snapshot_equal_expected": false
        }
      ],
      "return_identity_matrix": [
        [
          true,
          false,
          false
        ],
        [
          false,
          true,
          false
        ],
        [
          false,
          false,
          true
        ]
      ],
      "summary": {
        "immediate_correct": 0,
        "end_values_correct": 0,
        "prior_outputs_exposed_to_later_calls": 2,
        "exposed_outputs_unchanged": 2,
        "adapter_snapshots_correct": 0
      },
      "adapter_scope": "The adapter copies the already returned flat integer values immediately. It changes the retention pipeline, makes no extra candidate call, and does not repair the candidate stable-output contract."
    }
  ],
  "candidate_calls": 9,
  "selected_checks": [
    {
      "name": "nine_complete_candidate_calls",
      "passed": true
    },
    {
      "name": "explicit_anchor_arithmetic",
      "passed": true
    },
    {
      "name": "immutable_inputs_unchanged",
      "passed": true
    },
    {
      "name": "fresh_correct_immediate_three",
      "passed": true
    },
    {
      "name": "fresh_correct_end_three",
      "passed": true
    },
    {
      "name": "reused_immediate_three",
      "passed": true
    },
    {
      "name": "reused_end_one",
      "passed": true
    },
    {
      "name": "reused_two_exposed_outputs_changed",
      "passed": true
    },
    {
      "name": "fresh_two_exposed_outputs_stable",
      "passed": true
    },
    {
      "name": "reused_all_return_references_alias",
      "passed": true
    },
    {
      "name": "fresh_return_references_distinct",
      "passed": true
    },
    {
      "name": "fresh_wrong_fails_values_but_stable",
      "passed": true
    },
    {
      "name": "copying_adapter_preserves_three_reused_results",
      "passed": true
    },
    {
      "name": "last_return_lifetime_not_exercised",
      "passed": true
    }
  ],
  "all_checks_passed": true,
  "limits": [
    "Nine deliberately authored calls, not random sampling or a universal validity result.",
    "The stable-output ownership contract is chosen for this teaching task. Explicit reusable-buffer or view APIs can legitimately use different lifetimes.",
    "Inputs and expected answers are immutable tuples during execution; outputs are flat Python integer lists. No tensor or GPU execution.",
    "Python is checks and copied snapshots are trusted teaching instrumentation, not GPU storage identity, memory-safety or secure execution attestation.",
    "The copying adapter changes the retention pipeline; it does not show that the reused-buffer candidate meets the original contract. Shallow copying general nested mutable structures may not preserve independent values.",
    "The last output has no later call in this fixture; its lifetime is unexercised, reported null rather than counted as stable.",
    "No real benchmark defect, prevalence, physical memory measurement, timing, performance, economics, model call, reward improvement or training uplift is established."
  ]
}
