# PHH privacy workbench evidence

- Published: 2026-09-03
- Profile: Poker Hand History v0.0.2, one TOML-derived `.phh` document
- Fixture: synthetic; no real player or hand data

## Files

- `phh-privacy-example-original.phh`: rich source fixture with deliberately identifying-looking synthetic metadata.
- `phh-privacy-example-minimized.phh`: deterministic default transformation.
- `phh-privacy-policy.json`: machine-readable field policy and guarantee boundary.
- `phh-privacy-field-matrix.csv`: portable field-by-field policy table.
- `phh-privacy-transform-report.json`: field counts and SHA-256 hashes for the fixture pair.
- `phh-privacy-verifier.py`: standard-library TOML, sentinel, strategic-payload, and hash checks.
- `phh-privacy-pokerkit-verifier.py`: optional pinned PokerKit replay comparison.
- `phh-privacy-requirements.txt`: exact optional replay dependency.

## Reproduce

From a directory containing all files, use Python 3.11 or later:

```console
python phh-privacy-verifier.py
python -m venv .venv
.venv/Scripts/python -m pip install -r phh-privacy-requirements.txt
.venv/Scripts/python phh-privacy-pokerkit-verifier.py
```

On macOS or Linux, replace `.venv/Scripts/python` with `.venv/bin/python`.

The first verifier uses only Python's standard library. The second path must print a match for 18 actions, 19 successive game states, and final stacks `[86, 98, 116]`. PokerKit 0.7.5 warns that `time_zone_abbreviation` is unexpected in the rich input even though the field is listed in the tagged PHH v0.0.2 specification; the minimized copy removes it. The warning is reported, not hidden.

The browser workbench uses `smol-toml` 1.8.0 and a separate structural profile. That parser advertises TOML 1.1.0 support but documents exceptions such as accepting certain invalid dates, so this is not a strict TOML conformance path. The workbench separately rejects decimal literals that browser-number serialization would round, overflow, or underflow. It does not run PokerKit on visitor input. Passing these fixtures does not prove anonymity, universal PHH conformance, or legality under every poker rule. Removing action commentary can also remove decision context that was never encoded as PHH action tokens.

The editor itself is an inline-only bundle embedded in an opaque-origin sandbox without `allow-same-origin`. Its content security policy sets `connect-src 'none'` and blocks external scripts, frames, workers, fonts, and form actions. The parent page receives no hand text or transform callback. On the configured GTO Gecko deployment, the exact-path response also applies `sandbox allow-scripts allow-downloads`, preserving the opaque/storage-blocked boundary when the fallback opens the editor directly; copied or differently hosted HTML does not inherit that response header automatically.

## Primary sources

- PHH v0.0.2 tag: https://github.com/uoftcprg/phh-std/tree/v0.0.2
- PHH required/action fields: https://github.com/uoftcprg/phh-std/blob/v0.0.2/required.rst
- PHH optional fields: https://github.com/uoftcprg/phh-std/blob/v0.0.2/optional.rst
- PHH validation notes: https://github.com/uoftcprg/phh-std/blob/v0.0.2/validation.rst
- PHH paper: https://arxiv.org/abs/2312.11753
- PokerKit: https://github.com/uoftcprg/pokerkit
- NIST SP 800-188: https://doi.org/10.6028/NIST.SP.800-188
- Open Hand History: https://hh-specs.handhistory.org/
- Open Hand History version history: https://hh-specs.handhistory.org/change-log/change-log
- TOML 1.1.0: https://toml.io/en/v1.1.0
- smol-toml 1.8.0: https://github.com/squirrelchat/smol-toml/tree/v1.8.0
