# Receipt file round-trip — local import, recompute, export, recheck

**11 November 2026 · Research-only · Existing MEOK public lab**

## What is implemented

The numerical replay checker now accepts a real locally selected JSON file as well as pasted text. A successful check can export an unsigned **verification bundle** containing the exact submitted receipt text and the result of recomputing it. The same page can reopen that bundle: it reruns the underlying numerical check rather than trusting the stored success flag.

The existing pinned numerical checker, source lock, model checkpoints and data banks are unchanged. The extension packages their output; it does not create a new signature scheme, trusted-boot chain, model, approval service or training pipeline.

## End-user path

1. Open the single-model lab or six-checkpoint research page, run a comparison/replay, and use **Export receipt**.
2. In **Quality and evidence guide → Recompute an exported research receipt**, select that downloaded file. The file is read by the browser, not uploaded by this checker.
3. Select **Recompute and verify**. An accepted comparison/replay is recomputed from the fixed source artifacts.
4. Use **Export verification bundle**. The JSON contains the exact submitted receipt and an unsigned recomputation record. Export only material you intend to share.
5. Select the bundle in the same page or recheck it offline. The embedded result is compared with a new replay; merely changing a score and calculating a new checksum is insufficient.

Input edits, new files, example selection and **Clear receipt and result** invalidate the previous result and disable export. A delayed file read cannot overwrite more recent input. Selecting the same file again works because the file input is reset after capture. The content determines validity; a `.json` extension or MIME label alone is not trusted.

## Input and output limits

A receipt or bundle is limited to 1 MiB of UTF-8. Empty files, malformed UTF-8, byte-order marks, duplicate JSON keys, excess nesting, unsupported schemas and oversized documents are explicitly refused. Rejecting a BOM avoids silently changing the imported bytes; save a supported document as UTF-8 without a BOM. Bundles cannot contain bundles. Export can also refuse when wrapping a near-limit receipt would exceed 1 MiB.

Successful results remain `NUMERICAL_REPLAY_MATCH`, with declared source revision, artifact lock, counts and limitations. Verification bundles additionally carry a checksum and explicit false flags for signing, execution authority, GSPC admission and server persistence. No user-supplied path or URL is used to choose model or data artifacts.

## Offline batch recheck

From a downloaded repository with Node 22 or later:

```sh
node release-quality/recheck-receipt-files.mjs receipt.json verification-bundle.json
```

The runner accepts 1–16 explicit local files with a combined input bound of 4 MiB. It checks them sequentially using the same pinned numerical checker, reports each accepted/refused item separately, and exits nonzero when any item refuses. It neither launches a job nor installs dependencies. CLI output omits full local paths. This is a bounded, user-invoked batch, not a background agent or scheduler.

The earlier checksum-only verifier and single-receipt numerical CLI remain unchanged. Their historical results are not upgraded into independent audits.

## Qualification and evidence

`file-roundtrip-evidence/qualification.json` records the new module/CLI controls. `local-browser.json` records the prepublication Chromium desktop/mobile-viewport round trip with actual file selection and downloads. The release's hosted record is retained separately after publication. The original 37-test numerical suite is rerun without changing its retained evidence files.

Controls cover genuine comparison, 560-row replay and 1,200-row/six-checkpoint replay; mutated wrappers; rehashed false numerical results; false signature/authority flags; invalid bytes and sizes; duplicate keys; nested bundles; same-file reselection; read/edit/clear races; and successful/refused CLI batches. Tests execute real deterministic CPU replay; no LLM provider or GPU is called.

A previously unavailable detailed hosted report from the prior quality release was recovered on M4. Its 49 checks and six downloaded-file hashes were verified against the original files. `recovered-prior-hosted-journeys.json` is the unchanged raw report, with `prior-evidence-recovery.json` recording the recovery. These are historical results, not additional new tests.

## Trust and privacy boundaries

An unsigned bundle is a portable claim with a reproducible check, not a trusted attestation. A person who controls the verifier and its source can lie. Obtain the verifier/source through a trusted channel. Reusing the same numerical implementation is not an independently written verifier or independent organisational review.

Matching the synthetic calculation does not prove producer identity, original input capture, execution time/location, current external source truth, human permission, training-data rights or real-world validity. The trusted-host/current-source and authenticated human approval-to-effect gates remain separate and unimplemented by this extension.

The selected receipt stays in the browser unless the user exports or otherwise shares it. The exported bundle intentionally includes its exact receipt text; it is not a redaction tool. No selected-file contents are sent by this checker in the tested network flows. The CLI reads only user-specified local input files plus the verifier's fixed repository assets.

All work in this pass uses the existing Apple M4 and public research Space. No new paid Hugging Face Job, model training, private saved-data read, private-runtime modification, signing, protected merge or GSPC admission.

## Reproduce

```sh
node release-quality/test-file-roundtrip.mjs
node release-quality/test-numerical-replay.mjs
```

The test scripts write generated synthetic examples/results under their evidence directories; use a scratch checkout when preserving a release snapshot. `browser-file-roundtrip.py` requires an existing Playwright/Chromium installation and can run against a local checkout or a specified public base. It uses file-input selection and actual downloads, not a pasted-text proxy. Chromium desktop/mobile viewport qualification is not all-browser, physical-phone or assistive-technology certification.

Primary implementation references: https://playwright.dev/python/docs/input#upload-files ; https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer ; https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/fatal .

## Post-publication acceptance

The public application completed **60 Chromium checks** on the M4 at desktop and mobile-sized viewports. **Twelve actual files were downloaded**: six original comparison/replay receipts and six verification bundles. Each original file was selected through the file input, numerically replayed, exported as a bundle, reimported and replayed again. The three bundles from each viewport also passed the offline batch CLI. Valid/invalid mixed batches reported one match and one refusal, with nonzero exit status.

The hosted checks refused malformed UTF-8, empty/oversized documents, duplicate JSON keys, rehashed false original metrics and rehashed false bundle results. They covered same-file reselection, edit invalidation, clear/recovery, and delayed file reads that must not overwrite later typed input. Normal journeys recorded no JavaScript errors, no network write requests and no horizontal overflow at the two tested viewport sizes. This is not a physical-phone, all-browser or assistive-technology certification.

The raw hosted report and a real browser-produced six-checkpoint bundle are retained beside the module and local browser reports. All twelve saved download hashes were rechecked before this evidence publication. The recovered earlier 49-check raw report remains clearly historical.

An additional fresh-download source execution was blocked by the tool safety check and was not retried through another route. It is recorded as NOT RUN, not inferred from the earlier numerical checker's separate fresh-download reproduction. This limitation does not erase the actual completed local and hosted executions; see `additional-test-limitation.json` for the exact scope.
