{
  "kind": "executed synthetic Python/SQLite model",
  "run_on": "2026-11-05",
  "runtime": "Python standard library; no Odoo, n8n, network, PostgreSQL or AI model invoked",
  "cases": [
    {
      "case": "blind_retry_after_commit",
      "expected": 2,
      "observed": 2,
      "meaning": "Two draft orders for one intended operation; duplicate reproduced in the model."
    },
    {
      "case": "mark_processed_before_effect",
      "expected": 0,
      "observed": 0,
      "meaning": "A duplicate gate can lose work if receipt is treated as completion."
    },
    {
      "case": "search_then_create_interleaving",
      "expected": 2,
      "observed": 2,
      "meaning": "A prior search alone does not serialize competing writers."
    },
    {
      "case": "target_atomic_ledger_lost_response",
      "expected": {
        "orders": 1,
        "same_id": true,
        "state": "draft"
      },
      "observed": {
        "orders": 1,
        "same_id": true,
        "state": "draft"
      },
      "meaning": "Replay returns the original draft record; it does not confirm, invoice, post or send it."
    },
    {
      "case": "same_key_changed_payload",
      "expected": {
        "conflict": true,
        "orders": 1,
        "amount_unchanged": true
      },
      "observed": {
        "conflict": true,
        "orders": 1,
        "amount_unchanged": true
      },
      "meaning": "Changed business content requires explicit review or a new approved revision, not an unnoticed replay."
    },
    {
      "case": "same_source_id_different_company",
      "expected": 2,
      "observed": 2,
      "meaning": "Company is part of the operation namespace; the fixture explicitly authorizes A and B."
    },
    {
      "case": "replay_after_authority_revoked",
      "expected": true,
      "observed": true,
      "meaning": "An existing result does not bypass the current authorization check."
    },
    {
      "case": "failure_before_commit",
      "expected": {
        "before_retry": 0,
        "after_retry": 1
      },
      "observed": {
        "before_retry": 0,
        "after_retry": 1
      },
      "meaning": "The local atomic transaction rolls back the uncommitted order and receipt together."
    },
    {
      "case": "two_concurrent_target_requests",
      "expected": {
        "orders": 1,
        "same_id": true
      },
      "observed": {
        "orders": 1,
        "same_id": true
      },
      "meaning": "SQLite serializes this fixture transaction; production Odoo/PostgreSQL concurrency still needs its own test."
    },
    {
      "case": "unresolved_client_only_receipt",
      "expected": "unknown",
      "observed": "unknown",
      "meaning": "Do not infer that no target write happened from a missing local result or an inconclusive lookup."
    }
  ],
  "case_count": 10,
  "all_expected_observations_matched": true,
  "production_limits": [
    "SQLite locking is not PostgreSQL/Odoo concurrency behavior.",
    "The target-side ledger and order commit share one model database; a separate n8n data table does not create that atomicity.",
    "No permissions, accounting posting, stock reservations, node retry semantics or external side effects were tested in Odoo."
  ]
}
