Files
paperspec/fixtures/README.md
T
alexm 8b2df58266
check / check (default, macos-latest) (push) Canceled after 0s
check / check (default, ubuntu-latest) (push) Canceled after 0s
check / check (py310, macos-latest) (push) Canceled after 0s
check / check (py310, ubuntu-latest) (push) Canceled after 0s
feat: documents and session tokens
2026-10-12 01:07:50 -04:00

54 lines
4.1 KiB
Markdown

# Fixtures
Example data for learning the formats and for testing implementations.
All text here is synthetic, written for these files and dedicated CC0; license fields inside the fixtures describe fictional works.
## Packages
| Package | What it shows |
| --- | --- |
| `packages/hale2026harmonic/` | The main example, followed step by step in [the walkthrough](../docs/walkthrough.md): a chemistry paper read once with mistakes and fixed by twelve corrections. It has a table with two levels of column headers and grouped rows, an equation inside a sentence, a footnote, a figure with text inside its panels and a real image, references, legacy aliases, boxes on fingerprinted pages, receipts in every state (counting, partly invalidated, spot-checked, revoked and suspended), the roster that signed them, a dataset taken from the table, and derived MathML. |
| `packages/hale2026harmonic.checks-only/` | The same document prepared for another of the team's machines: text withheld, every hash an HMAC under the team key in `keys/`. |
| `packages/okafor2025open/` | An open-access paper established from a JATS file and a PDF that agree, so every sentence is corroborated. |
| `packages/smithlab2027charges/` | A short draft written in Typst, whose sentences cite sentences of the main example by address. |
| `packages/tiny2026example/` | A small document, the starting point of the correction vectors and the broken packages. |
## Records
`records/` holds a valid example of every other format: anchors (a span, a leaf, a cell, a paragraph, and one keyed for a public layer), rights records, a team policy, backend declarations, team profiles, a layer with its annotations and the receipt that confirms them, submissions and grades, a project, a digitization with its confirmation and the dataset it yields, a view, a QA report, a draft snapshot and a draft's sentence IDs.
## Broken packages
Each folder in `invalid/` holds a package that breaks exactly one rule, and `expect.json` names it.
A conforming implementation refuses every one of them and should report that rule.
| Case | What is wrong | Rule |
| --- | --- | --- |
| `alias-dangling/` | An alias whose node does not exist. | `doc.id.successor` |
| `bad-id/` | IDs use Crockford base32, which has no i, l, o or u. | `package.schema` |
| `checks-only-plain/` | A checks-only package that still carries text and plain hashes. | `doc.policy.withheld` |
| `cite-not-reference/` | A cite run names a node that is not a reference. | `doc.run.cite` |
| `empty-optional-file/` | An optional JSONL file with no records. | `package.file.empty` |
| `hash-mismatch/` | A node_hash that does not recompute. | `doc.hash.node-hash` |
| `heading-not-first/` | A heading must be a section's first child. | `doc.tree.child` |
| `location-unknown-page/` | A location on a page no witness has. | `doc.location.page` |
| `manifest-hash/` | A file changed after the manifest was written. | `package.manifest.hash` |
| `not-canonical/` | A line that is valid JSON but not canonical JSON. | `package.file.canonical` |
| `receipt-root/` | A receipt whose Merkle root does not recompute. | `doc.receipt.root` |
| `receipt-signature/` | A receipt changed after it was signed. | `doc.receipt.signature` |
| `root-mismatch/` | document.json's root is not the root node's node_hash. | `doc.hash.root` |
| `style-sup-sub/` | A run cannot be both a subscript and a superscript. | `doc.run.style` |
| `text-edited/` | Text changed without its hashes. | `doc.hash.text-hash` |
| `unknown-kind/` | Kinds outside the list are refused. | `package.schema` |
| `unlisted-file/` | A file the manifest does not list. | `package.manifest.unlisted` |
## Keys
`keys/` holds the Ed25519 secret keys that signed the fixtures' receipts, and the team secret of the checks-only package.
They are published so that anyone can reproduce the signatures; never use them for anything else.
## Sources
`src/` holds the hand-written descriptions of the three main documents, as first read; see [src/README.md](src/README.md).
Everything else here is generated by `python3 tools/build.py`, so change the sources or the builder, never the generated files.