# Authenticate an unchanged historical receipt

This reproduction uses the original public Ministral 3 8B BF16-to-Q5_K_M GGUF evidence and signed receipt. It compares three report-package commands in InvarLock 0.17.4: attaching the receipt, authenticating it against the supplied reference expectations, and deliberately expecting a different verifier key. It does not run models, change the score policy, or issue a new signed receipt.

## Run

Use Python 3.12 or later. Download [the reproduction ZIP](https://www.invarlock.ai/evidence/receipt-authentication/reproduction.zip) and extract it into a working directory, then run:

```sh
python -m venv .venv
.venv/bin/python -m pip install 'invarlock==0.17.4'
.venv/bin/python reproduce.py --output reproduced
```

On Windows, use `.venv\Scripts\python.exe`. The output directory must not already exist. Installation and the initial source downloads require network access. The script downloads only the 26 evidence files and one original receipt from the pinned public repository, checks every SHA-256 digest, then runs the local report commands. No provider account or signing key is used. Do not add files inside `reproduced/evidence`: the signed inventory is closed.

If you already have the public comparison directory, pass `--source-directory PATH`. That directory must contain `evidence/` and `verification.receipt.json`; all 27 files are still checked against `source-hashes.json` before use.

The underlying commands, run inside the output directory, are:

```sh
python -m invarlock report evidence --review-context review-context.json \
  --retained-receipt verification.receipt.json --package attachment --json

python -m invarlock report evidence --review-context review-context.json \
  --retained-receipt verification.receipt.json \
  --receipt-expectations receipt-expectations.json --package authenticated --json

python -m invarlock report evidence --review-context review-context.json \
  --retained-receipt verification.receipt.json \
  --receipt-expectations wrong-verifier-expectations.json --package wrong-verifier --json
```

The script creates `wrong-verifier-expectations.json` by changing only `expected_verifier_fingerprint` to `sha256:` followed by 64 zeroes. The last command is expected to fail. Do not replace your own approved expectations with values from a submission to make an authentication failure disappear.

## Expected observations

| Reference inputs | Exit | JSON recipient result | Package |
| --- | --- | --- | --- |
| No receipt expectations | 0 | `not_performed` | Written; receipt is an unverified attachment |
| Published reference expectations | 0 | `authenticated_acceptance` | Written with authentication snapshot |
| Different expected verifier key | 2 | Absent | Not written |

The failure message is `receipt authentication failed: receipt verifier key does not match caller expectation`. An exit of zero establishes successful packaging; use the recipient result and snapshot to understand whether authentication occurred. A successful rendering command can also display an authenticated rejection for other evidence; this example exercises only the historical passing receipt.

`observations.json` retains the measured outcomes. `source-hashes.json` and `hash-table.tsv` identify the unchanged 26 evidence files and receipt. The authenticated package's `verification-snapshot.json` identifies the exact receipt and reference inputs. Its `receipt_check_time` is the time of this local authentication. `original_verification_time` is null because this receipt contract has no authenticated verification timestamp. `current_authorization` and `freshness` remain `not established`.

## Where the reference expectations come from

The publisher recovered the expected verifier fingerprint and trust-profile digest from a separate August 15, 2026 trusted-input record, which also retained a successful signature check of this receipt. The original session record is not part of this public download. The nonsecret values are published here as the publisher's reference inputs so readers can reproduce the same check; they do not independently establish that a reader's organization authorizes this verifier. The script never derives its expected key from the submitted receipt.

The verifier identity comes from the original public integration source. Policy, evidence-signer, model-artifact, schedule, runtime and normalized-request identities come from the released reference anchors. `acceptance-policy.json` preserves the released policy bytes. `review-context.json` is explanatory prose for this reproduction, with a pending owner decision; it grants no deployment approval.

The evidence and receipt are pinned to public source commit `1fbe9a45d353fb92bf35e9b2c467ef2d54bff8c9`. They are historical records, not November 2026 observations. Rendering and receipt authentication use release 0.17.4, source commit `5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5`.

## Scope and limits

- This checks one actual historical receipt and one deliberate wrong-key control. It does not measure model behavior or establish all failure cases.
- The publisher's reference inputs make this example reproducible. Current recipient trust and deployment authorization require separately approved inputs and decisions.
- Hashes establish file identity, not correct original execution, representative questions, or an authenticated collection time.
- A newer authentication time does not make the underlying evidence newer. No original receipt bytes or signed evidence bytes are changed.

## Sources

Website documentation explains the maintained workflow. This reproduction preserves the historical public evidence and receipt while using the 0.17.4 report-package implementation.

- [Client handoff guide](https://www.invarlock.ai/docs/user-guide/client-handoff)
- [Original public evidence and receipt](https://github.com/invarlock/invarlock/tree/1fbe9a45d353fb92bf35e9b2c467ef2d54bff8c9/public_evidence/evidence/ministral3-8b-bf16-to-q5-k-m-gguf)
- [Original verifier identity](https://github.com/invarlock/invarlock/blob/e4e69610dff1ad1127e8e16c5b3c244f800c4ba4/examples/integrations/gguf_deployment.py)
- [Released independent acceptance anchors](https://github.com/invarlock/invarlock/blob/5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5/scripts/release/reference_evidence/ministral3-8b-bf16-to-q5-k-m-gguf-anchors.json)
- [Released policy bytes](https://github.com/invarlock/invarlock/blob/5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5/scripts/release/reference_evidence/qwen38-27b-policy.json)
- [Pinned report-package guide](https://github.com/invarlock/invarlock/blob/5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5/docs/user-guide/client-handoff.md)
- [Receipt authentication implementation](https://github.com/invarlock/invarlock/blob/5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5/src/invarlock/report_verification.py)
- [Signature and binding checks](https://github.com/invarlock/invarlock/blob/5c926bd91f4a5e125d22d2ee44b4f7a8e99e50c5/src/invarlock/evidence_receipt.py)
