Home/Docs/CI integration

CI integration

A turn-taking regression fails CI: Hotato exits non-zero, like a failing unit test.

Exit codes

CodeMeaning
0Passed (or --no-fail set).
1An event failed.
2Usage or I/O error: bad args, missing file.
bash
# fails the job on a turn-taking regression
uvx hotato run --stereo call.wav --stack vapi --expect yield --format json
echo $?   # 0 green · 1 red

The GitHub PR check

One workflow file gives every pull request a turn-taking gate and a running comment. Copy .github/workflows/hotato.yml from the repo into yours at the same path; that is the whole setup.

  • Scores on every PR: installs the package and scores the suite to a JSON envelope.
  • Posts one sticky comment: a pass/fail line, a per-scenario results table (expect, yielded, time to yield, talk over, result), and a regressions section. It updates in place on every push, found by a hidden marker, so it never spams the thread.
  • Deltas against the base branch: when the base is scorable, any scenario that started overlapping more or yielding slower is listed with its delta. Best effort; the gate holds either way.
  • Fails the job on a regression, read straight from the scored envelope.
The workflow ships in the repo

Rendering is scripts/pr_comment.py, stdlib only, so you can preview the comment locally: hotato run --suite barge-in --format json | python3 scripts/pr_comment.py. See the workflow →

Gate on your agent, keep the plumbing

The bundled suite is a self-test of the harness. Replace one step, Score turn-taking (head), with your own capture and score; the envelope shape and exit codes are identical, so the comment and the gate stay as they are.

bash
# play each corpus *.caller.wav into your agent, record its reply, then:
hotato run --stereo your_call.wav --expect yield --format json --no-fail > head.json

Already running pytest?

One flag adds the same gate to the test run you already have: pytest --hotato-suite scores the battery after your tests and fails the session on a regression. Details: Pytest plugin.

Richer artifacts on a red build

hotato report renders the visual report (attach it as a CI artifact), and hotato team turns a directory of nightly envelopes into a trend.

Keeping a run green on purpose

--no-fail always exits 0 (reports, doesn't fail). --max-talk-over / --max-time-to-yield set pass/fail bounds per recording.