# Prep receipt store

**Schema:** `aziel.unseal-site.v1`  
**Anchor:** `aziel.lattice.anchor.v1`  
**Author:** Aziel Eliab  
**Carrier:** AzielTether  
**Kind:** `timetounsealthebook.test_run`  
**License:** Apache-2.0  

This directory is the local, append-only store the static shell reads in prep. It is not a launch of TimeToUnsealTheBook.net. Domain purchase, DNS, and deploy have not been done. The public domain tip stays `open`.

The prep-store tip is the latest `ledger_entry_hash`:

`a37da60e11c0a716f8fb1fb67c8f39bc4b1ff1826ce9258cddacf3b88e52f7c1`

36 unique sources are chained. 4 exact sha256 duplicates were skipped and were not copied.

## Files

| Path | Role |
| --- | --- |
| `receipts/index.json` | Ordered receipt list, prep tip, and the skipped-duplicate log. Grows when a test is appended. |
| `receipts/chain.jsonl` | Append-only lattice. One anchor per line. Earlier lines are not rewritten. |
| `receipts/entries/<test_id>.json` | One public test record per kept source. |
| `receipts/sources/` | Raw bytes, one file per sha256, original attachment name. |
| `receipts/append.py` | Init, check, and append tool. |

`confidence_pct` is structural progress only. A quoted `FAIL`, `PASS`, or `REAL SIGNAL` line is the source outcome. It is not a claim that the manuscript was decrypted. Every record keeps `decryption_complete: false`.

## How a line is hashed

The anchor is `aziel.lattice.anchor.v1` with author `Aziel Eliab` and carrier `AzielTether`. `ledger_entry_hash` is SHA-256 of the UTF-8 JSON of that object with `ledger_entry_hash` omitted, keys sorted, and no extra whitespace. The first line uses 64 zero hex digits as `previous_hash` after the tool checks that no earlier prep receipt exists. Each later line sets `previous_hash` to the previous `ledger_entry_hash` and lists those earlier receipts in `prior_receipts` with `reread: true`.

## Skipped duplicates

One copy is kept per sha256. The skipped attachment is not stored.

| Skipped attachment | Winning attachment | Winning test | Winning receipt |
| --- | --- | --- | --- |
| `01M64AJ2A4XKEQEEK7ECNNH2KA.json` | `01M64AJ13VY8KRCNK4SNWP4QF4.json` | `abad-zd30-v2-6-page-moderator` | `1cfe5ecc256fbe5107532fddbe77e5302aceda2944904e4b7ea3ab7727bfbf15` |
| `01M64AJ41FXGBDZCP0TA09V2XX.json` | `01M64AC42N0EQYJKKSHZCHJK9G.json` | `abad-zd30-v2-8-cross-currier` | `71d58ed89cce7b87d5a618f40008e980f06c3d63887943bd61c80dcd6c48fd89` |
| `01M64AK4YEJQ38DAM9YS6BZV33.json` | `01M64AK3G3NXFNMV6HQ102P9XF.json` | `abad-zd30-v2-7-section-transport` | `204253d1ee6c9fda9253f1a9cf8983f0d7e86c6f65690012518e5c8c4139c3d7` |
| `01M64AK6R3TTDAZ5KFK4722ENA.json` | `01M64ACP5HQSZY0G0DYBSQ98PA.json` | `abad-zd30-v1-7-candidate-spec` | `78c9a7ace4724c8ce0721b53dbe384f4d94c339494f785e6b666fd2a4fd7060e` |

`01M64AK5V400X3VCHFND55P0CQ.bin` is kept. Its bytes start with `%PDF-1.3`, and the receipt records `media_kind: pdf`.

## Append a new test

From the repo root, after the new bytes are in a file that is not already stored:

```bash
python3 receipts/append.py --append-file path/to/new-source.json \
  --test-id abad-zd30-next-real-slug \
  --title "Short public title" \
  --outcome "Quoted structural outcome" \
  --confidence 40 \
  --basis "Name the source figure. Structural progress only."
```

Omit `--confidence` when the source has no structural percent. The tool then:

1. Re-reads every earlier entry and source blob and checks the stored sha256 and ledger hash.
2. Refuses the append when the new sha256, test id, or file name is already present.
3. Copies the blob into `receipts/sources/`.
4. Writes `receipts/entries/<test_id>.json`.
5. Appends one line to `receipts/chain.jsonl`. It does not rewrite earlier lines.
6. Updates `receipts/index.json`: the receipt list grows by one, and `tip` becomes the new ledger hash.

The new card names `abad-zd30-next-append` as the next suggestion because a run already exists. That suggestion is not an execution. A later append must use a different `test_id`.

Check the chain without writing:

```bash
python3 receipts/append.py --check
```

## Read the store in the shell

`file://` usually blocks `receipts/index.json`. From the repo root:

```bash
python3 -m http.server 43123
```

Open `http://127.0.0.1:43123/TimeToUnsealTheBook.html`.

The page loads the prep index and chain for the receipt tip, the receipt tree, the cross-test, and the prior-list citations. Nodes and Live Nodes are read from the runtime mesh. Site views and downloads stay empty until `GET /v1/unseal-counters` returns `complete: true`. Those tallies are not written into a test receipt. A counter snapshot staged from the Aziel tab is a local file with `tab` `voynich` and `wrap_sent` false. A staged test receipt carries `corpus_tab` `voynich`. Active-node counts are never invented.

## Do not

- Do not launch the site, buy the domain, change DNS, or deploy.
- Do not add an IP gate, a Node Gate panel, or operator tooling.
- Do not set `decryption_complete` to true.
- Do not invent user counts.
- Do not store a second copy of a sha256.

## A test staged in the shell

The Tests tab can download a `staged_test_receipt` (`aziel.unseal-site.v1.1`). That file is not on the chain. The public domain tip stays `open`. The browser copy is the source blob. `append.py` does not read the JSON fields by itself. Repeat them on the command line.

From the repo root, after the download is saved somewhere outside `receipts/sources/`:

```bash
python3 receipts/append.py --append-file path/to/staged-<test_id>.json \
  --test-id <test_id> \
  --title "Short public title" \
  --outcome "Quoted structural outcome" \
  --basis "Name the source figure. Structural progress only."
```

Add `--confidence` only when the staged object has an integer `confidence_pct` from 0 to 100. Omit it when that field is null.

The tool re-reads every earlier entry and source blob, refuses a repeated sha256 or `test_id`, and appends one line. Earlier lines stay as they are. The shell refuses to stage a title or outcome that asserts the manuscript is cracked, solved, or decrypted. The overclaim cap still applies to the appended card.

Theories in [`data/theories.json`](data/theories.json) point at these `test_id` values as related reading. They are hypotheses. A source outcome stored on a card stays a source outcome.
