{
  "schemaVersion": 1,
  "modelVersion": "1.0.0",
  "stage": "native-sqlite-verified",
  "firstFlow": {
    "id": "edit-draft-order",
    "cases": [
      "draft-graph",
      "note-value",
      "note-null",
      "note-not-loaded",
      "note-empty",
      "draft-edit",
      "invalid-quantity",
      "restart-readback"
    ],
    "status": "verified",
    "scope": "native console plus SQLite for every runtime; ecosystem integration follows independently"
  },
  "cases": [
    {
      "id": "draft-graph",
      "priority": "P0",
      "title": "Draft order with two items",
      "acceptance": "Load one full order and its complete bounded item list; verify stable business keys, exact quantities and USD total 3850.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "note-value",
      "priority": "P0",
      "title": "Loaded note value",
      "acceptance": "Selected order_note evaluates to Leave at reception; a null-only default preserves it.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "note-null",
      "priority": "P0",
      "title": "Loaded database null",
      "acceptance": "Persist SQL NULL, select order_note, observe Null and apply the default No note; empty text is not null.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "note-not-loaded",
      "priority": "P0",
      "title": "Unselected note",
      "acceptance": "Omit order_note from a minimal projection; both evaluation and null-only default report NotLoaded with the missing field path.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "note-empty",
      "priority": "P0",
      "title": "Loaded empty text",
      "acceptance": "Persist and select an empty string; both evaluation and null-only default preserve the empty string.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "draft-edit",
      "priority": "P0",
      "title": "Edit a draft item and total",
      "acceptance": "Reload full order and item state; change Notebook quantity 2 to 3, line total to 3750 and order total to 5100 in one provider transaction.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "invalid-quantity",
      "priority": "P0",
      "title": "Reject invalid quantities",
      "acceptance": "Reject zero, negative, fractional and over-limit quantities before save; compare the entire unchanged persisted snapshot.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "restart-readback",
      "priority": "P0",
      "title": "Read committed edit after restart",
      "acceptance": "A new process reads the exact order and item versions; an independent read-only SQLite oracle checks all persisted fields and unaffected rows.",
      "status": "verified",
      "modelRequirement": "v1"
    },
    {
      "id": "stale-order",
      "priority": "P1",
      "title": "Reject stale order editing",
      "acceptance": "Advance the authoritative version, reject the stale write and verify that the winner remains intact.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "child-conflict-rollback",
      "priority": "P1",
      "title": "Roll back a multi-entity edit",
      "acceptance": "Prove an order write precedes the failing stale item write; all earlier writes and timestamps roll back.",
      "status": "covered-by-first-flow-gate",
      "modelRequirement": "v1"
    },
    {
      "id": "concurrent-same",
      "priority": "P1",
      "title": "Two writers edit one order",
      "acceptance": "Synchronize two native processes after both read version 1; require one winner and one optimistic conflict, never a busy/locked error.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "concurrent-distinct",
      "priority": "P1",
      "title": "Two writers edit different orders",
      "acceptance": "Synchronize independent order edits; both commit with no cross-order state contamination.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "explicit-item-removal",
      "priority": "P1",
      "title": "Explicit line removal",
      "acceptance": "Omission from a projection must not delete a line; explicit audited removal updates the total and survives readback.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "state-transitions",
      "priority": "P1",
      "title": "Confirm and cancel an order",
      "acceptance": "Allow DRAFT to CONFIRMED or CANCELLED and CONFIRMED to CANCELLED; reject edits outside DRAFT and transitions out of CANCELLED; no payment or stock side effects.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "order-list",
      "priority": "P2",
      "title": "Bounded order search",
      "acceptance": "Stable sort with ID tie-breaker, parent and child limits, exact totals and empty-tail behavior on an expanded fixture.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "continuous-pages",
      "priority": "P2",
      "title": "Sequential order export",
      "acceptance": "Prove the native cursor plan, no duplicate or missing orders, stable context and counted fallback when the cursor cannot be used.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "retained-id-pages",
      "priority": "P2",
      "title": "Jump within an order result set",
      "acceptance": "Prove retained-ID use, overflow lower bounds, predicate isolation, expiry and invalidation with explicit store observations.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "order-analytics",
      "priority": "P2",
      "title": "Order summaries and empty buckets",
      "acceptance": "Filtered status counts, same-currency totals, per-parent item previews and empty buckets use the same governed filter.",
      "status": "planned",
      "modelRequirement": "v1"
    },
    {
      "id": "trusted-policy",
      "priority": "P2",
      "title": "Buyer and tenant isolation",
      "acceptance": "Add trusted actor and tenant fixtures; reject forged scope, forbidden fields and over-limit requests. A buyer_reference predicate alone is not authorization.",
      "status": "planned",
      "modelRequirement": "extension-required"
    },
    {
      "id": "inventory-reservation",
      "priority": "P2",
      "title": "Reserve stock with an order",
      "acceptance": "Extend the model with Inventory and reservation identity; prove create/stock rollback, no overselling and duplicate-request behavior.",
      "status": "planned",
      "modelRequirement": "extension-required"
    },
    {
      "id": "transaction-lifecycle",
      "priority": "P2",
      "title": "Cancellation and provider failures",
      "acceptance": "Inject cancellation, provider/commit faults and sustained concurrency; retain failure-specific database and resource-lifecycle evidence.",
      "status": "planned",
      "modelRequirement": "v1"
    }
  ],
  "runtimes": [
    {
      "id": "java",
      "label": "Java",
      "cliKey": "java",
      "nativeStatus": "verified",
      "integration": {
        "title": "Spring service order editing",
        "candidateTarget": "java-web-spring-boot",
        "focus": "HTTP validation and service boundaries; verify provider enlistment before claiming framework transactions.",
        "status": "planned"
      }
    },
    {
      "id": "rust",
      "label": "Rust",
      "cliKey": "rust",
      "nativeStatus": "verified",
      "integration": {
        "title": "Async order command handler",
        "candidateTarget": "rust-web-axum",
        "focus": "Typed transaction scope, ownership of modified entities and request cancellation.",
        "status": "planned"
      }
    },
    {
      "id": "typescript",
      "label": "TypeScript",
      "cliKey": "typescript",
      "nativeStatus": "verified",
      "integration": {
        "title": "Order API and client projection",
        "candidateTarget": "typescript-web-hono",
        "focus": "Request validation, async error propagation and loaded-null versus unselected JSON fields; browser/TFP is a separate gate.",
        "status": "planned"
      }
    },
    {
      "id": "python",
      "label": "Python",
      "cliKey": "python",
      "nativeStatus": "verified",
      "integration": {
        "title": "Batch order import and export",
        "candidateTarget": "python-app-console",
        "focus": "Per-record validation, bounded batches and partial failure reporting; API integration can follow separately.",
        "status": "planned"
      }
    },
    {
      "id": "go",
      "label": "Go",
      "cliKey": "golang",
      "nativeStatus": "verified",
      "integration": {
        "title": "Concurrent order handler",
        "candidateTarget": "golang-web-gin",
        "focus": "Request context lifetime, optimistic conflict classification and cancellation without leaked workers.",
        "status": "planned"
      }
    },
    {
      "id": "dotnet",
      "label": "C# / .NET",
      "cliKey": "dotnet",
      "nativeStatus": "verified",
      "integration": {
        "title": "Order application service",
        "candidateTarget": "dotnet-web-aspnet",
        "focus": "Dependency-injection scope, async lifetime and cancellation with exact provider transaction evidence.",
        "status": "planned"
      }
    },
    {
      "id": "swift",
      "label": "Swift",
      "cliKey": "swift",
      "nativeStatus": "verified",
      "integration": {
        "title": "Local order draft editing",
        "candidateTarget": "swift-app-console",
        "focus": "Native async reads and local SQLite draft state; Apple UI and TFP client integration each require separate evidence.",
        "status": "planned"
      }
    }
  ],
  "comparisonPolicy": "Compare common business outcomes and evidence; do not equate page counts, exception spellings or framework-specific integration scenarios.",
  "nativeReceipt": "evidence/native-sqlite-2026-10-27.json"
}
