# SQLite MATCH FULL: reproduce the complete-reference controls

SQLite accepts MATCH FULL syntax but does not enforce its requested match mode.
The supplied controls distinguish incomplete references from complete orphans,
check enforcement explicitly and reopen completed backup images.

## Run offline

Extract sqlite-match-full.zip into an empty directory. Use Python 3.11+ with
SQLite 3.37+ (the STRICT fixture requires that version). No Python package or
network access is needed.

```sh
python3 -B verify.py evidence/sqlite-system evidence/sqlite-provider
python3 -B -m unittest -v test_match_full
python3 -B -O -m unittest -v test_match_full
```

The tests also run the native schedule in a temporary directory and remove only
their own temporary files. To retain a new run, choose a nonexistent directory:

```sh
python3 -B capture.py new-run
python3 -B verify.py evidence/sqlite-system new-run
```

A new engine can behave differently. Preserve the original evidence and
investigate disagreements instead of overwriting the historical captures.
Run summarize.py only in a scratch extraction to regenerate summary.json/table.md.

## Evidence and limits

Five schemas receive nine ordered INSERT/UPDATE attempts on each of SQLite
3.45.1 and 3.54.1: 90 recorded attempts, not 90 independent incidents.
The bundle includes 24 source/backup images and two deliberately orphaned
controls. The verifier checks full typed states, diagnostics, rejection
categories, effective settings, capture-source hashes and backup completion.

The three unguarded variants retain partial keys (7,NULL), (99,NULL) and
(NULL,11) while integrity_check returns ok and foreign_key_check returns no rows.
The all-or-none CHECK rejects mixed nullness; NOT NULL on both components also
rejects entirely absent references.

Single writer, DELETE journal, integer keys, immediate NO ACTION constraints.
No power interruption, concurrent writer, PostgreSQL execution, performance or
incident-frequency measurement. The CHECK is not a full deferred-MATCH-FULL
emulation. This is a reproduction of documented semantics, not a new SQLite defect.

summary.json and table.md are generated from the retained observations.
sources.json maps seven primary sources to specific claims; source-receipts.json
records retrieval timestamps and hashes, without redistributing external pages.
runtime-provenance.json identifies the captured engines.
manifest.json, supplied alongside the archive, identifies all downloadable bytes.
Archive timestamps are fixed for reproducibility, not research capture dates.

The existing analysis connects this result to parent-key lifetime and recovery:
https://hesela.com/analyses/sqlite-index-runtime-dependencies/#composite-reference-nullness

The corpus entry is:
https://hesela.dev/terms/sqlite-foreign-key-check/

Original code/data follows the repository's existing reuse policy; no new
license is granted. The databases contain only constructed fixture values.
