# seqdiff

> **Tool `tools/verify/seqdiff.py`** (program, Verify). Compare two traces line by line and show the first place they differ.

Run it with `./gameframe run seqdiff ARGS` or `python3 tools/verify/seqdiff.py`. [Source on GitHub](https://github.com/tanepiper/game-frame/blob/main/tools/verify/seqdiff.py).

## Its own help

This is the help text in the tool itself, as `./gameframe tool seqdiff` prints it.

```text
Compare two traces line by line and show the first place they differ.

Usage: seqdiff.py ORIGINAL.trace PORT.trace [--context N] [--field N]

A trace has one event per line, `label<TAB>where` (tools/emu/call_trace.py writes the
original's; make the port write the same format, with its own file:line as `where`). By default
only the first field (the label and arguments) is compared, since the call sites differ by
nature; `--field 0` compares whole lines. Prints the matching count, then the first divergence
with N lines of context (default 5) from both sides, so you can see which call site in the
original and which line in the port disagree. Exit status 1 when they differ.
```

## Named by

Skills: [re-emulate](/skills/re-emulate), [re-verify](/skills/re-verify).

Agents: [re-verifier](/agents/re-verifier), [re-randomiser](/agents/re-randomiser).
