{
  "schemaVersion": 1,
  "modelChanged": false,
  "cases": [
    {
      "id": "pagination",
      "phase": "query",
      "priority": "baseline",
      "title": "Filtered pagination",
      "description": "Active schools with capacity at least 500 have total 3. Offset 1, limit 2 returns Riverside then West.",
      "excerpt": true
    },
    {
      "id": "relations",
      "phase": "query",
      "priority": "baseline",
      "title": "Two loaded relations",
      "description": "Riverside resolves to PRIMARY and Campus Learning Platform through selected child requests.",
      "excerpt": true
    },
    {
      "id": "groups",
      "phase": "query",
      "priority": "baseline",
      "title": "Grouped analytics",
      "description": "PRIMARY: count 3, sum 1600, average 533.3333333333334; SECONDARY: count 2, sum 1700, average 850.",
      "excerpt": true
    },
    {
      "id": "relation-metrics",
      "phase": "query",
      "priority": "baseline",
      "title": "Relation metrics",
      "description": "SchoolType parents return the same counts and sums without loading their child lists.",
      "excerpt": true
    },
    {
      "id": "facets",
      "phase": "query",
      "priority": "baseline",
      "title": "Two Facets and zero buckets",
      "description": "Filtering to Riverside yields PRIMARY: 1 and SECONDARY: 0 with include-all, only PRIMARY: 1 with matched-only, and platform count 1.",
      "excerpt": true
    },
    {
      "id": "top-n",
      "phase": "query",
      "priority": "baseline",
      "title": "Top-N for two parents",
      "description": "PRIMARY returns Riverside and West; SECONDARY returns Lakeside and Hill. The child limit applies independently to each parent.",
      "excerpt": true
    },
    {
      "id": "page-boundaries",
      "phase": "query",
      "priority": "P1",
      "title": "Multiple pages and stable ties",
      "description": "Traverse all five Schools with page size 2 and a final empty page. Capacity descending, name ascending and ID ascending order the two capacity-500 rows as Hill then West. Every page, including the empty tail, reports total 5. This is offset paging, not a continuous cursor.",
      "excerpt": true
    },
    {
      "id": "empty-page",
      "phase": "query",
      "priority": "P1",
      "title": "No-match page",
      "description": "A filter matching no School returns an empty page and exact total 0, even with a nonzero offset.",
      "excerpt": true
    },
    {
      "id": "empty-facets",
      "phase": "query",
      "priority": "P1",
      "title": "Facets with no matching rows",
      "description": "A no-match query retains both zero-count SchoolType buckets with include-all. Matched-only type and platform Facets are empty, and the result page is empty.",
      "excerpt": true
    },
    {
      "id": "relation-predicates",
      "phase": "query",
      "priority": "P0",
      "title": "Positive, negative and nested relation predicates",
      "description": "Matching PRIMARY yields North, Riverside and West; excluding it yields Hill and Lakeside. A two-level School \u2192 SchoolType \u2192 Platform predicate returns the same three primary Schools. Predicates do not require loading the relation.",
      "excerpt": true
    },
    {
      "id": "filtered-children",
      "phase": "query",
      "priority": "P0",
      "title": "Filtered children and an empty parent bucket",
      "description": "Select only inactive child Schools. Both SchoolType parents remain present: PRIMARY has a loaded empty list and SECONDARY contains Hill. Filtering a selected child list must not filter out its parent.",
      "excerpt": true
    },
    {
      "id": "filtered-groups",
      "phase": "query",
      "priority": "P1",
      "title": "Filtered aggregates",
      "description": "Active Schools with capacity at least 500 produce PRIMARY: count 2, sum 1300, average 650; SECONDARY: count 1, sum 1200, average 1200. The aggregate request carries the filters itself.",
      "excerpt": true
    },
    {
      "id": "blank-intent",
      "phase": "query",
      "priority": "P0",
      "title": "Reject blank query intent",
      "description": "Separate bounded queries supply a blank comment or a blank purpose. Both must reject execution with an intent-related diagnostic; a successful query or an unrelated error fails this case.",
      "excerpt": true
    },
    {
      "id": "update",
      "phase": "update",
      "priority": "baseline",
      "title": "Audited update",
      "description": "Riverside changes from capacity 800 to 950 and from version 1 to 2.",
      "excerpt": false
    },
    {
      "id": "stale-write",
      "phase": "update",
      "priority": "baseline",
      "title": "Stale write rejection",
      "description": "A separately loaded version-1 copy cannot overwrite capacity with 999.",
      "excerpt": false
    },
    {
      "id": "read-update",
      "phase": "read-update",
      "priority": "baseline",
      "title": "Update after restart",
      "description": "A fresh process reads capacity 950 and version 2.",
      "excerpt": false
    },
    {
      "id": "delete",
      "phase": "delete",
      "priority": "baseline",
      "title": "Soft deletion",
      "description": "Hill disappears from ordinary queries and remains stored at version -2.",
      "excerpt": false
    },
    {
      "id": "read-delete",
      "phase": "read-delete",
      "priority": "baseline",
      "title": "Deleted row after restart",
      "description": "A fresh process reads zero normal Hill rows and exactly one deleted-only row.",
      "excerpt": false
    },
    {
      "id": "deleted-groups",
      "phase": "read-delete",
      "priority": "P0",
      "title": "Group analytics after deletion",
      "description": "After Riverside is updated and Hill is deleted, PRIMARY has count 3 and sum 1750; SECONDARY has count 1 and sum 1200. Tombstones must not inflate ordinary aggregates.",
      "excerpt": true
    },
    {
      "id": "deleted-metrics",
      "phase": "read-delete",
      "priority": "P0",
      "title": "Relation metrics after deletion",
      "description": "SchoolType relation counts and sums must agree with the surviving School rows: PRIMARY 3/1750, SECONDARY 1/1200.",
      "excerpt": true
    },
    {
      "id": "deleted-facets",
      "phase": "read-delete",
      "priority": "P0",
      "title": "Facet totals after deletion",
      "description": "Ordinary type Facets count PRIMARY: 3 and SECONDARY: 1; platform count is 4. The two-row page is Lakeside then Riverside, so facet totals must ignore the page limit and exclude the tombstone.",
      "excerpt": true
    },
    {
      "id": "deleted-children",
      "phase": "read-delete",
      "priority": "P0",
      "title": "Ordinary children after deletion",
      "description": "After restart, PRIMARY returns Riverside and West; SECONDARY returns only Lakeside. A deleted child cannot appear in an ordinary selected relation.",
      "excerpt": true
    },
    {
      "id": "deleted-child-tombstones",
      "phase": "read-delete",
      "priority": "P0",
      "title": "Deleted-only children preserve live parents",
      "description": "Explicit deleted-only child selection yields an empty PRIMARY list and Hill under SECONDARY. Both live parents remain visible; the child version filter cannot change parent visibility.",
      "excerpt": true
    },
    {
      "id": "continuous-ascending",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "Continuous pages in ascending ID order",
      "description": "Read offsets 0, 2 and 4 in one trusted context. The first page uses OFFSET; the next two report CURSOR_SEEK without duplicates or omissions.",
      "excerpt": true
    },
    {
      "id": "continuous-descending",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "Continuous pages in descending ID order",
      "description": "Traverse the same five Schools in reverse ID order and observe two CURSOR_SEEK plans.",
      "excerpt": true
    },
    {
      "id": "continuous-cache-miss",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "Continuous cursor miss and recovery",
      "description": "Start at offset 2 without a cursor: observe CACHE_MISS, then reuse its boundary at offset 4.",
      "excerpt": true
    },
    {
      "id": "id-set-jump",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "Retained ID-set random page jumps",
      "description": "Build at offset 4, then jump to 0, 2 and 6. Preserve capacity/name/ID order, exact total 5 and ID_SET_HIT even for the empty tail.",
      "excerpt": true
    },
    {
      "id": "id-set-empty",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "Retained empty ID set",
      "description": "Run the same unmatched predicate twice. Retain the empty set, report total 0 and transition from ID_SET_BUILD to ID_SET_HIT.",
      "excerpt": true
    },
    {
      "id": "id-set-overflow",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "ID-set safety-limit fallback",
      "description": "Set maxIds to 3 for five matching Schools. Observe LIMIT_EXCEEDED with a retained-count lower bound of 4; ordinary counted pagination still returns the correct page and exact total 5.",
      "excerpt": true
    },
    {
      "id": "id-set-isolation",
      "phase": "query",
      "priority": "P1",
      "stage": "pagination",
      "title": "ID-set predicate isolation",
      "description": "Use one namespace with capacity thresholds 500, 1000 and 500. Distinct predicates build separate sets; returning to 500 hits its original set with exact total 4.",
      "excerpt": true
    },
    {
      "id": "transaction-commit",
      "phase": "transaction",
      "priority": "P1",
      "stage": "transactions",
      "title": "Atomic Platform and School commit",
      "description": "Commit Platform name and School capacity 810 together, both at version 2.",
      "excerpt": false
    },
    {
      "id": "transaction-rollback",
      "phase": "transaction",
      "priority": "P1",
      "stage": "transactions",
      "title": "Rollback an earlier Platform write",
      "description": "Advance School to capacity 801/version 2; reject its stale graph and restore the earlier Platform write, including version and timestamp.",
      "excerpt": false
    },
    {
      "id": "concurrent-same",
      "phase": "transaction",
      "priority": "P1",
      "stage": "transactions",
      "title": "Concurrent writes to one School",
      "description": "Two processes read version 1 before one release barrier. Exactly one commits; the other reports an optimistic conflict.",
      "excerpt": false
    },
    {
      "id": "concurrent-distinct",
      "phase": "transaction",
      "priority": "P1",
      "stage": "transactions",
      "title": "Concurrent writes to different Schools",
      "description": "Two processes update Riverside and North from version 1. Both persist their own values with no lost update.",
      "excerpt": false
    }
  ],
  "remainingGaps": [
    {
      "id": "transaction-lifecycle",
      "priority": "P2",
      "status": "not-verified",
      "scope": "Cancellation, injected provider/commit faults, cross-provider transactions, delete/create rollback and sustained concurrency stress still require separate evidence."
    },
    {
      "priority": "P1",
      "id": "projection-load-states",
      "status": "not-verified",
      "scope": "A dedicated cross-language check of Value, loaded Null and NotLoaded, including null-only defaults. The current non-null fixture verifies loaded empty child lists only."
    },
    {
      "priority": "P2",
      "id": "trusted-policy",
      "status": "not-verified",
      "scope": "Tenant/identity policy, forbidden fields and request hard-limit enforcement through a configured trusted context. Blank intent rejection is not authorization coverage."
    },
    {
      "priority": "P2",
      "id": "provider-and-transport",
      "status": "not-verified",
      "scope": "PostgreSQL/MySQL, schema migration and browser/TFP paths. This receipt covers local SQLite console execution."
    },
    {
      "id": "pagination-lifecycle",
      "priority": "P2",
      "status": "not-verified",
      "scope": "Retained-state TTL expiry, explicit invalidation, store failure, concurrent construction, mutation during a retained snapshot, and tenant/policy isolation need separate School evidence."
    }
  ]
}
