Offset Ledger: portable arithmetic checker

Requires Python 3.8 or newer. Uses the Python standard library only.
No JavaScript engine, package installation, account, network access or repository
checkout is needed. The checker reads one local JSON file and writes no files.

Try the invented example after extracting this archive into an empty folder:

    python3 check_report.py example-report.json

Then copy a report exported by Offset Ledger into this folder and run:

    python3 check_report.py your-report.json

The example is generated by the actual browser report builder from its invented
demo. Its source is synthetic; all user declarations are false. It is not a bank
record, a test against a lender account, or evidence of any financial entitlement.

What a successful check establishes

The checker independently uses exact rational arithmetic to reproduce the report's
whole explicit daily model: every date, balance, daily fraction, daily rounding,
period total, selected rounding candidate, difference and conditional status.
It also checks the complete report's SHA-256 self-digest. Altering an input or a
reported daily result without consistently recomputing the report is rejected.

What it cannot establish

The checker cannot authenticate bank records, confirm account linkage, establish
that declarations are true, determine lender rules, or establish compensation.
A SHA-256 self-digest is not a signature. A person can replace inputs, declarations
and results with another self-consistent report and compute a new digest.

Exit 0 means arithmetic and internal consistency were reproduced. Read the printed
status: even an insufficient-evidence or differs-under-selected-model report can
pass this check. A match to a selected model does not prove it is a lender's model.
Exit 1 means invalid/unreadable report. Exit 2 means incorrect command-line usage.

Supported model and bounds

One complete inclusive daily snapshot for every date; fixed divisor 365, full
eligible offsets, net principal clamped at zero, nonnegative loan/offset/rate,
and explicit period-end-half-up and/or daily-half-up cent rounding. No bank files
are inferred, transaction ledgers reconstructed, or unknown dates filled in.
The no-offset comparison keeps the supplied loan balance path; it is not a
simulation of a different repayment history or lifetime savings.

At most 3,660 days and 16 MiB per report. Monetary and rate inputs are plain decimal
strings, at most 32 characters and 12 decimal places. Observed charge must resolve
to whole cents. Dates are Gregorian YYYY-MM-DD in years 0001 through 9999.
The strict version-1 schema rejects duplicate/unknown/missing keys, nulls, floats,
non-ASCII strings, malformed dates, noncanonical result fractions and false status.

The report includes financial amounts and dates. Keep your reports private or share
them deliberately. Nothing in this archive uploads a report.

Files

check_report.py       Standalone independent Python checker.
example-report.json   Invented example from the production report builder.
README.txt            These instructions.

The archive is reproducible: fixed entry order, fixed metadata, no source timestamps
and no compression dependency. Rebuild with research/offset-ledger/package-checker.py
in the source repository; add --check to verify the existing artifacts without
rewriting them. Reproducibility is not authorship or record authentication.
