# SQLite space accounting: reproduce the measurement boundaries

Original evidence recorded 2 November 2026; publication preparation 3 November 2026.
Four synthetic databases and eight ordered states each. This is a controlled
native experiment, not a field sample, benchmark, durability test or new SQLite defect.

## Result

In the 4,096-byte-page/NONE case, PASSIVE returned (0,100,50) while the main
file remained byte-identical to its 8,192-byte baseline. After FULL and a later
one-page update, the WAL retained 412,032 bytes but only one valid committed
current-generation frame. Physical slots, valid frames, checkpoint progress
and device-write traffic are different quantities.

In the 512-byte-page/NONE case, the old reader saw 96 rows and 300 dbstat pages,
while the current reader saw 24 rows and 77 dbstat pages against identical
captured main/WAL bytes. The snapshot is part of the measurement definition.

Read the synthesis:
https://hesela.com/analyses/sqlite-wal-checkpoint-starvation/#space-accounting

## Download and replay

Download package.zip beside this file and extract it into a fresh directory.
The archive preserves the original dated research packet unchanged, including
its historical review-status wording. It contains 64 raw main/WAL images,
observations.json, source receipts, the full method, code and tests.
Every payload is listed in SHA256SUMS.json.

Archive SHA-256:
d8e26a832d7ae128094a25caa52552129052a374a74b3a2924ca4fc21c2a208c

From the extracted directory:

    python3 -B verify.py native
    python3 -B -m unittest -v test_accounting
    python3 -B -O -m unittest -v test_accounting
    python3 -B probe.py fresh-output
    python3 -B verify.py fresh-output

Linux and Python with SQLite ENABLE_DBSTAT_VTAB are required. No third-party
Python dependency is required for these commands. The output directory must
not exist. Only newly created private temporary databases are modified.
Layout-exact replay checks the recorded configuration; investigate a mismatch
rather than overwriting the original captures.

## Evidence and interpretation

summary.json contains 32 generated semantic/format rows; byte counts are integers.
replication.json records the second environment and full compared summary.
sources.json preserves eight original URLs, locators, access times and fetched-byte hashes.

SQLite 3.45.1 and 3.53.1 summary rows agreed after explicitly setting
secure_delete=ON. The initial comparison failed because the default differed;
the original method documents the discrepancy. This policy is a fixture control,
not a sanitization recommendation. The exact builds and compile options are
recorded; two environments operated by the same investigator are not peer review.

Calls are serialized and one reader is deliberately retained. Sequential captures
are not an atomic snapshot suitable for monitoring concurrent production writes.
No system-call or physical-device-write trace was collected. Identical file bytes
do not establish zero physical writes. The 32 states are dependent observations,
not independent machines. SHM lengths/allocation are recorded, but SHM bytes were
not retained. The parser is bounded to these small, unencrypted fixtures.

Never delete a live WAL to reclaim space. A checkpoint is not a backup.
Original synthetic evidence and code: CC0-1.0; cited upstream material retains
its own terms. No third-party source snapshots are redistributed.
