{
  "schemaVersion": 1,
  "kind": "synthetic-finite-domain-contract-examples",
  "license": "CC0-1.0",
  "generatedAt": "2026-10-20T11:46:18.644Z",
  "runtime": "v24.21.0",
  "source": {
    "url": "https://hesela.dev/research/prefix-order.mjs",
    "sha256": "4e7a951f7eec3b22078cc8373503739853141fe2797bfe1279259a66cb549f7b"
  },
  "reference": {
    "url": "https://github.com/facebook/rocksdb/blob/v9.7.3/include/rocksdb/options.h",
    "symbol": "ColumnFamilyOptions::prefix_extractor",
    "accessed": "2026-10-20"
  },
  "assumptions": [
    "Deterministic transforms; null denotes an out-of-domain key",
    "Comparator strictly orders distinct sampled keys",
    "Intervals include lower and exclude upper bounds"
  ],
  "limits": [
    "Passing a finite sample does not prove compatibility over unseen keys",
    "Not a RocksDB execution, benchmark, corruption experiment or false-positive estimate",
    "Comparator-equivalent distinct keys are rejected, not analyzed"
  ],
  "results": [
    {
      "id": "bytewise",
      "label": "Bytewise order, first three bytes",
      "compatible": true,
      "ordered": [
        "cat:1",
        "cat:3",
        "dog:2"
      ],
      "prefixes": [
        "636174",
        "636174",
        "646f67"
      ],
      "witness": null
    },
    {
      "id": "suffix-first",
      "label": "Numeric suffix first, first three bytes",
      "compatible": false,
      "ordered": [
        "cat:1",
        "dog:2",
        "cat:3"
      ],
      "prefixes": [
        "636174",
        "646f67",
        "636174"
      ],
      "witness": {
        "lower": "cat:1",
        "middle": "dog:2",
        "upper": "cat:3",
        "prefix": "636174",
        "middlePrefix": "646f67"
      }
    },
    {
      "id": "outside-domain",
      "label": "Out-of-domain key before the group",
      "compatible": true,
      "ordered": [
        "a",
        "cat:1",
        "cat:3",
        "dog:2"
      ],
      "prefixes": [
        null,
        "636174",
        "636174",
        "646f67"
      ],
      "witness": null
    },
    {
      "id": "inside-domain",
      "label": "Out-of-domain key inside the group",
      "compatible": false,
      "ordered": [
        "cat:1",
        "!",
        "cat:3"
      ],
      "prefixes": [
        "636174",
        null,
        "636174"
      ],
      "witness": {
        "lower": "cat:1",
        "middle": "!",
        "upper": "cat:3",
        "prefix": "636174",
        "middlePrefix": null
      }
    },
    {
      "id": "suffix-groups",
      "label": "Numeric suffix first, suffix as group",
      "compatible": true,
      "ordered": [
        "cat:1",
        "dog:2",
        "cat:3"
      ],
      "prefixes": [
        "1",
        "2",
        "3"
      ],
      "witness": null
    }
  ],
  "skippedResult": {
    "stored": [
      "dog:2"
    ],
    "lower": "cat:1",
    "upper": "cat:3",
    "comparator": "Numeric suffix first, bytewise tie-break",
    "testedPrefixHex": "636174",
    "prefixPresent": false,
    "rangeResults": [
      "dog:2"
    ]
  }
}
