| name | verify-in-playground |
| description | Visually verify extraction changes against real PDFs using the embedded playground before opening a PR. Use after any change to extraction geometry, grouping, granularity shapes, or the playground itself. |
Verifying changes in the playground
Unit tests and goldens pin known fixtures; the playground is how you check a
change against real documents — coordinate bugs that pass synthetic
fixtures are obvious the moment boxes don't sit on the ink.
Procedure
./scripts/fetch-pdfium.sh
cargo build -p docray-cli
cargo run -p docray-server
Drop in PDFs that exercise your change (use your own local PDFs — never
commit them). Then check:
- boxes lens vs source lens: boxes must sit exactly on the rendered
ink. Off-by-scale or flipped-axis bugs are instantly visible here.
- Rotated pages: if your change touches coordinates, test a rotated
document specifically — rotation is where coordinate bugs hide.
- Granularity selector: flip char/word/element on the same document;
the boxes should tell the same story at every level.
- Warnings: the status line reports the count; document JSON shows
them. New unexplained warnings on documents that were clean before =
regression.
- json lens + click-through: click a box you changed the handling of,
confirm the JSON element matches expectations.
For playground code changes, additionally verify: upload a second document
mid-render (generation guard), an encrypted/garbage file (error surface),
and a 50+ page document (lazy rendering, memory).
This is a verification step, not a substitute for tests — anything you
confirm visually that could regress silently should also gain an assertion
if one doesn't exist.