{
  "schemaVersion": 1,
  "generatedAt": "2026-10-17T14:23:26.358054+00:00",
  "evidenceType": "executed-software-experiment-on-constructed-data",
  "environment": {
    "sqlite": "3.45.1",
    "sqliteSourceId": "2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1",
    "python": "3.12.3",
    "platform": "Linux-6.8.0-146-generic-x86_64-with-glibc2.39",
    "compileOptions": [
      "ATOMIC_INTRINSICS=1",
      "COMPILER=gcc-13.3.0",
      "DEFAULT_AUTOVACUUM",
      "DEFAULT_CACHE_SIZE=-2000",
      "DEFAULT_FILE_FORMAT=4",
      "DEFAULT_JOURNAL_SIZE_LIMIT=-1",
      "DEFAULT_MMAP_SIZE=0",
      "DEFAULT_PAGE_SIZE=4096",
      "DEFAULT_PCACHE_INITSZ=20",
      "DEFAULT_RECURSIVE_TRIGGERS",
      "DEFAULT_SECTOR_SIZE=4096",
      "DEFAULT_SYNCHRONOUS=2",
      "DEFAULT_WAL_AUTOCHECKPOINT=1000",
      "DEFAULT_WAL_SYNCHRONOUS=2",
      "DEFAULT_WORKER_THREADS=0",
      "DIRECT_OVERFLOW_READ",
      "ENABLE_COLUMN_METADATA",
      "ENABLE_DBSTAT_VTAB",
      "ENABLE_FTS3",
      "ENABLE_FTS3_PARENTHESIS",
      "ENABLE_FTS3_TOKENIZER",
      "ENABLE_FTS4",
      "ENABLE_FTS5",
      "ENABLE_LOAD_EXTENSION",
      "ENABLE_MATH_FUNCTIONS",
      "ENABLE_PREUPDATE_HOOK",
      "ENABLE_RTREE",
      "ENABLE_SESSION",
      "ENABLE_STMTVTAB",
      "ENABLE_UNLOCK_NOTIFY",
      "ENABLE_UPDATE_DELETE_LIMIT",
      "HAVE_ISNAN",
      "LIKE_DOESNT_MATCH_BLOBS",
      "MALLOC_SOFT_LIMIT=1024",
      "MAX_ATTACHED=10",
      "MAX_COLUMN=2000",
      "MAX_COMPOUND_SELECT=500",
      "MAX_DEFAULT_PAGE_SIZE=32768",
      "MAX_EXPR_DEPTH=1000",
      "MAX_FUNCTION_ARG=127",
      "MAX_LENGTH=1000000000",
      "MAX_LIKE_PATTERN_LENGTH=50000",
      "MAX_MMAP_SIZE=0x7fff0000",
      "MAX_PAGE_COUNT=0xfffffffe",
      "MAX_PAGE_SIZE=65536",
      "MAX_SCHEMA_RETRY=25",
      "MAX_SQL_LENGTH=1000000000",
      "MAX_TRIGGER_DEPTH=1000",
      "MAX_VARIABLE_NUMBER=250000",
      "MAX_VDBE_OP=250000000",
      "MAX_WORKER_THREADS=8",
      "MUTEX_PTHREADS",
      "SECURE_DELETE",
      "SOUNDEX",
      "SYSTEM_MALLOC",
      "TEMP_STORE=1",
      "THREADSAFE=1",
      "USE_URI"
    ]
  },
  "scriptSha256": "d1842575edcbcd80fef2717c5ecb21b9a6b0125866507e8d2041fb4b0a2fcb04",
  "method": {
    "sourceJournalModes": [
      "DELETE",
      "WAL"
    ],
    "casesPerMode": 5,
    "parentRowsPerCase": 2,
    "childRowsPerCase": 1,
    "backupDatabase": "main",
    "backupPagesPerStep": 1,
    "acceptanceRule": "Child row 1 must reference parent 1 and retain the exact payload.",
    "acceptanceOrigin": "Fixed fixture expectation defined before constructing or reading databases.",
    "sourceSynchronous": "FULL",
    "automaticWalCheckpoint": 0,
    "validation": "Close and reopen destination read-only; compare all rows, integrity_check and foreign_key_check."
  },
  "limits": [
    "Designed schedules on one installed library, not a failure-rate sample.",
    "No crash, power loss, concurrent writer, performance or full application recovery test.",
    "Nullable foreign key is deliberate; the application rule is stricter than this schema.",
    "No claim that undeclared application rules can be inferred by a database checker.",
    "Library version identifies the observation, not an upgrade or security recommendation."
  ],
  "sources": [
    "https://www.sqlite.org/pragma.html#pragma_integrity_check",
    "https://www.sqlite.org/pragma.html#pragma_foreign_key_check",
    "https://www.sqlite.org/foreignkeys.html",
    "https://www.sqlite.org/backup.html"
  ],
  "sourceAccessed": "2026-10-17",
  "cases": [
    {
      "sourceMode": "DELETE",
      "case": "valid",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "delete",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            1,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            1,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e8b81f487243287e671c865a2b902f0a8f39974b1ebf2a83b4786afbd67db906",
      "destinationLogicalSha256": "e8b81f487243287e671c865a2b902f0a8f39974b1ebf2a83b4786afbd67db906",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": true
    },
    {
      "sourceMode": "DELETE",
      "case": "orphan-off",
      "foreignKeysDuringInsert": 0,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "delete",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "destinationLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [
        [
          "child",
          1,
          "parent",
          0
        ]
      ],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "DELETE",
      "case": "enable-in-transaction",
      "foreignKeysDuringInsert": 0,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "delete",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "destinationLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [
        [
          "child",
          1,
          "parent",
          0
        ]
      ],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "DELETE",
      "case": "wrong-parent",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "delete",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            2,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            2,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "91a378e6737392a7665e10765205c1c6ad07a49533f44288614f5c765183ea05",
      "destinationLogicalSha256": "91a378e6737392a7665e10765205c1c6ad07a49533f44288614f5c765183ea05",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "DELETE",
      "case": "nullable",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "delete",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            null,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            null,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "ad4ae2c15b66d43de15cfaa764b058442085d7160ef7438847482349ae499ea6",
      "destinationLogicalSha256": "ad4ae2c15b66d43de15cfaa764b058442085d7160ef7438847482349ae499ea6",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "WAL",
      "case": "valid",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "wal",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            1,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            1,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e8b81f487243287e671c865a2b902f0a8f39974b1ebf2a83b4786afbd67db906",
      "destinationLogicalSha256": "e8b81f487243287e671c865a2b902f0a8f39974b1ebf2a83b4786afbd67db906",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": true
    },
    {
      "sourceMode": "WAL",
      "case": "orphan-off",
      "foreignKeysDuringInsert": 0,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "wal",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "destinationLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [
        [
          "child",
          1,
          "parent",
          0
        ]
      ],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "WAL",
      "case": "enable-in-transaction",
      "foreignKeysDuringInsert": 0,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "wal",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            999,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "destinationLogicalSha256": "e1701b3d6ec20ba0e457cba9ffe25f3524fa317b7efc7c4ef9530da7a8820ec1",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [
        [
          "child",
          1,
          "parent",
          0
        ]
      ],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "WAL",
      "case": "wrong-parent",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "wal",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            2,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            2,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "91a378e6737392a7665e10765205c1c6ad07a49533f44288614f5c765183ea05",
      "destinationLogicalSha256": "91a378e6737392a7665e10765205c1c6ad07a49533f44288614f5c765183ea05",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    },
    {
      "sourceMode": "WAL",
      "case": "nullable",
      "foreignKeysDuringInsert": 1,
      "foreignKeysAfterCommit": 1,
      "newInvalidInsertError": {
        "code": 787,
        "name": "SQLITE_CONSTRAINT_FOREIGNKEY"
      },
      "backupProgress": [
        [
          0,
          2,
          3
        ],
        [
          0,
          1,
          3
        ],
        [
          101,
          0,
          3
        ]
      ],
      "destinationJournalMode": "wal",
      "sourceRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            null,
            "constructed recovery record"
          ]
        ]
      },
      "destinationRows": {
        "parents": [
          [
            1,
            "required owner"
          ],
          [
            2,
            "other existing owner"
          ]
        ],
        "children": [
          [
            1,
            null,
            "constructed recovery record"
          ]
        ]
      },
      "fullRowsEqual": true,
      "sourceLogicalSha256": "ad4ae2c15b66d43de15cfaa764b058442085d7160ef7438847482349ae499ea6",
      "destinationLogicalSha256": "ad4ae2c15b66d43de15cfaa764b058442085d7160ef7438847482349ae499ea6",
      "integrityCheck": [
        "ok"
      ],
      "foreignKeyCheck": [],
      "applicationExpectedChildren": [
        [
          1,
          1,
          "constructed recovery record"
        ]
      ],
      "applicationAccepted": false
    }
  ]
}
