Files
hermes-agent/tests
teknium1 1d6b56c6e0 fix(tests): drive the lookaround strip-and-retry through recover_after_classification
The lookaround regression test only exercised classify_api_error, so the
production branch it exists to protect (turn_recovery._recover_format_errors
-> strip_pattern_and_format(agent.tools) for llama_cpp_grammar_pattern) could
be disabled without any test going red.

Replace it with a test that runs the real entry point,
recover_after_classification, against a fake agent whose tool schema carries
a lookaround ``pattern``: the pattern must be stripped from agent.tools and
the result must request an immediate retry. Still asserts the classifier
mapping and the generic-schema-400 negative control. A/B: sabotaging the
grammar branch (``if False:``) turns this test red; restoring it goes green.
2026-09-19 10:16:27 -07:00
..
…
…