Choose what the case should prove
Keep healthy and unhealthy behavior together. If you add an empty-result loop, also retain healthy polling where the tool repeats but the output advances. Write down the expected policy decision before tuning the implementation. Do not label every repeated call as stuck, or assume acontinue decision proves that the
agent answered correctly. Answer quality needs separate checks.
Add a labeled run
examples/v02_labeled_traces.json is a list of runs. Each includes a run_id,
label, expected_decision, a short explanation in why, and the recorded steps.
For example, a healthy polling case can look like this:
label, why, and expected_decision are test annotations; the trace analyzer
does not use them to choose its decision. The existing test compares the replayed
final decision with expected_decision.
Replay and compare
From the source checkout:Use check mode for a different question
A labeled fixture deliberately includes runs that should stop. Those are passing regression tests when the expected stop happens. Running this command against that same fixture will normally fail:check asks whether any run violates the selected failure rules;
it does not compare results with expected_decision annotations. Use it to gate a
collection of runs expected to meet your application’s pass/fail rules.
Keep the two checks distinct:
Saved-trace flags and exit codes explain how to select those
failure rules. Contributing and maintenance explains
how the repository runs its checks on pull requests.