# Open Annie replay structure audit

This companion inspects two public JSON files from Open Annie. It counts recorded
decision rows and session events without running a model, playing audio, rendering
an avatar, or applying motion decisions. The audit and tests are original code;
they do not copy or execute Open Annie's implementation.

## Files

- [audit.py](audit.py): Python 3 standard-library audit with mandatory pinned-input SHA-256 checks.
- [test_audit.py](test_audit.py): offline synthetic-fixture tests.
- [report.json](report.json): computed totals, source hashes, and evidence limits.
- [decision-structure.csv](decision-structure.csv): one row per recorded decision, omitting transcript text,
  probability vectors, timing, tokens, and audio.

`clip_choice` in the CSV means a model-selected candidate. It does not mean the
clip passed a gate, started playback, or appeared in a rendered frame. Partial and
final rows can repeat the same pick. They are intentionally not deduplicated.

## Reproduce

Run the commands from a directory containing this companion's Python files.
Download the inputs directly from the pinned upstream revision into a separate
directory. These are public, read-only requests. No API keys or package installs
are needed. Do not use the moving `main` branch for this reproduction.

```sh
mkdir -p source-inputs audit-output
curl --fail --location 'https://raw.githubusercontent.com/rehan-remade/open-annie/1a3aebfe32343b119263c8b7eba3b7cb1d4e4507/demo/live/decisions.json' --output source-inputs/decisions.json
curl --fail --location 'https://raw.githubusercontent.com/rehan-remade/open-annie/1a3aebfe32343b119263c8b7eba3b7cb1d4e4507/demo/live/session.json' --output source-inputs/session.json
python3 -B -m unittest -v test_audit.py
python3 -B audit.py source-inputs/decisions.json source-inputs/session.json --output audit-output
```

The script refuses input bytes with a mismatched hash, including files whose line
endings changed. Both output files are deterministic for these inputs.

| Input | Bytes | SHA-256 |
| --- | ---: | --- |
| decisions.json | 66037 | 055d9d985c4ca8b7199a5af887efb9e47b4e4a31d289bf7124618fffc9828f62 |
| session.json | 34384 | 2adffbdb166019463f60842c2c24eb31c3793f075d5a4c00fd805a947a957ac8 |

## What the checks establish

The decisions file has 51 rows: 22 listening decisions and 29 reply decisions.
All 29 reply rows include a clip choice. The session has 195 chronologically
ordered transcript/audio events and six user-play entries. Equal timestamps are
allowed: two different events can occur at the same recorded clock value.

The audit checks required structural fields, finite timestamps within the
recorded duration, chronological order, and exact source bytes. It reports
unknown event types rather than silently treating them as transcript/audio events.
It is a deliberately narrow structural audit, not a full upstream schema validator.

## What the checks do not establish

- The files do not expose applied animation events in the session bus. A pick
  count is not an animation count or a count of unique gestures.
- This audit does not reconstruct the runtime's `partialActed`, reaction cooldown,
  fallback, playback, interruption, or rendering state.
- The recorded duration is a field in an upstream fixture. The source's latency
  measurements are not reproduced here and are not reported as a benchmark.
- Correct transcript/decision structure does not prove that another avatar has
  the required expression mappings, skeleton, or playable clips.
- No live network model calls, audio synchronization, visual quality, collision,
  or game-engine compatibility were tested.

## Provenance and reuse boundaries

The pinned upstream revision is
[1a3aebfe32343b119263c8b7eba3b7cb1d4e4507](https://github.com/rehan-remade/open-annie/tree/1a3aebfe32343b119263c8b7eba3b7cb1d4e4507).
Its [NOTICE](https://github.com/rehan-remade/open-annie/blob/1a3aebfe32343b119263c8b7eba3b7cb1d4e4507/NOTICE)
separates Apache-2.0 code from separately governed assets. Do not assume the code
license covers audio, avatars, or every other file. This companion redistributes
none of the upstream transcript, audio, avatar, or motion assets. It contains only
original analysis code and derived structural counts/labels. Consult the original
asset manifests and applicable terms before reusing upstream assets.
