Run the tests
From the repository root:Replay the progress-aware fixtures
examples/v02_labeled_traces.json
contains seven labeled runs:
- An exact search loop with empty output.
- Healthy polling with changing status.
- A rate-limit failure followed by success.
- Repeated authentication failure.
- Alternating search/summarize actions without progress.
- A closed planner/researcher/reviewer handoff cycle.
- Healthy pagination with advancing pages.
expected_decision value.
You can inspect the same runs directly:
Run the detector evaluation
The evaluation module needspython-dotenv, which is included in the demo extra:
OPENAI_API_KEY unset in both the environment and .env, the command runs
the offline exact-detector evaluation and prints illustrative convergence scores.
If that key is set, it also runs provider-backed comparisons and a judge example,
which need the relevant SDKs and can incur API charges.
The exact-detector evaluation uses a separate six-case in-code dataset. It measures
whether detector evidence fires, not whether the runtime policy reaches STOP.
That matters because repetition can be a warning while useful work continues.
These results come from
LoopDetector(threshold=3) on the six-case fixture:
two true positives, zero false positives, one false negative, and three true
negatives. The missed case is a paraphrase loop, which exact signatures don’t catch.
These are small fixture results, not production benchmarks or whole-policy accuracy.
The printed convergence examples use fixed step-count lists. They illustrate a
scoring function; the command does not measure real agent latency or token savings.